.p_product_page .qi_header %h1 =link_to ic(:user)+" Mon compte", public_my_account_path %span =link_to "Mon panier", cart_public_p_orders_path .qi_row .qi_pannel.qi_plain.padding =semantic_form_for [:public, @p_customer_sheet],:url => update_cart_public_p_orders_path(), :html => { :method => :post, :onchange =>""}, :remote => false do |form| .p_sheet_lines_form =form.semantic_fields_for :p_sheet_lines do |form| #p_sheet_line.product_stock_form.field{:id => form.object.id} %hr %table{:style => "width:100%"} %tr %th Produit : %th{:style => "width:15px;"} Quantité %th Prix U %th Prix Tot %th{:style => "width:15px;"} %tr %td =form.object.p_product.name %td.qte =form.object.qte %td.price =number_to_currency form.object.price %td.price_tot =number_to_currency form.object.price_tot %td =link_to_remove_fields ic(:"trash-o"), form = form.hidden_field :p_product_id, :class => "p_product_id" -if form.object.p_product -p_product = form.object.p_product %table.table %tr %th Taille %th Couleur %th Qte -s = "a" -si = 1 -if true -p_product.p_product_stocks.order("p_size_id ASC, p_color_id ASC").each do |ps| -si = p_product.p_product_stocks.where(:p_size_id => ps.p_size_id).count() %tr -if ps.p_size_id != s -s = ps.p_size_id %td{:rowspan => si} =si =ps.p_size.name if ps.p_size %td =ps.p_color.name if ps.p_color %td -p_sheet_line_line = form.object.p_sheet_line_lines.where(:p_product_stock => ps.id).first =form.fields_for(:p_sheet_line_lines, p_sheet_line_line) do |builder| =builder.input :qte,:label => false, :as => :string, :input_html => {:maxlength => 10} %p %strong Totaux -total_with_labels = form.object.total_with_labels_table %table{:style => "width:100%;"} -total_with_labels.each do |index, total| %tr %td{:style => "text-align:right;"} %strong =total[:label] %td.price_td =number_to_currency total[:value] %hr =form.submit "sauvegarder", :class => "btn btn-primary" =link_to "Suivant", particulars_public_p_orders_path :scss .price_emp{ padding: 6px 12px; font-size: 14px; line-height: 1.42857; color: #555555; height:34px; } .price_td{ width:170px; text-align:right; } :scss .product_stock_form{ td{ vertical-align:top; .form-control, .form-group{ margin-bottom:0} } }