.qi_header
  .right
    = link_to i(:"shopping-cart"), stock_admin_product_path(@product), :data => {:remote => true}
    = link_to i(:pencil), edit_admin_product_path(@product), :data => {:remote => true}
  %h1 

    Boutique
    %span
      Détail d'un produit :
      =@product.lang("fr").title

  

.qi_row

  
  
  .qi_pannel.qi_plain.padding
    =simple_format @product.lang("fr").description
    .qi_sub_header
      %h2 Images du produit
  
    %p
      =link_to "Ajouter des images", "#", :onclick => "select_product_images_from_manager('#{@product.id.to_s}');return false;", :class => "btn btn-primary"
    %br
    #product_images  
      =render :collection => @product.product_images.order("position"), :partial => "admin/product_images/product_image"
      %p{:style => "clear:both;"}
  
  :coffeescript
  
    adjustment = ""
    
    $('#product_images').sortable({
      
      stop: () ->
        result = []
        $(this).find(".product_image").each ->
          result.push $(this).data("id")
        
        $.ajax({
          url:"/admin/product_images/reorder.js", 
          type: "GET",
          data: { 
            order : result
            } 
    
        })
    });