%h2=gallery_content.name
.description
	=raw gallery_content.description
	
.add_gallery_images=link_to "Ajouter des images", "#", :onclick => "select_gallery_images_from_manager('"+gallery_content.id.to_s+"');return false;", :class => "button"

.gallery_images	
	=render :collection => gallery_content.gallery_images, :partial => "portlet/gallery_images/gallery_image"
	%p{:style => "clear:both;"}
	
:javascript
	$('.gallery_images').sortable({
		cursorAt: 0,
		opacity:0.5,
		update : function () { 
		      var order = $(this).sortable('serialize'); 
		      
			$.ajax({url : "/portlet/gallery_images/reorder.js?"+order});
		    }
	
	});
	

	