- if params[:controller] == "admin/p_product_ref_specs"
  =semantic_form_for [:admin, @p_product_ref_spec], :remote => true do |f|
    .content
      =f.inputs do
        = f.input :p_product_ref, as: :select, collection: PProductRef.pluck(:cc_name, :id) ,:label => f.object.label_for(:p_product_ref)
        = f.semantic_fields_for :p_spec_type do | form |
          =render :partial => "admin/p_spec_types/form", :locals => {:f => form}
        = f.semantic_fields_for :p_spec_value do | form |
          =render :partial => "admin/p_spec_values/form", :locals => {:f => form}

    .actions=f.submit "sauvegarder", :class => "btn btn-primary"

- else
  .p_product_ref_spec_form.field
    %table
      %tr
        %td
          %h4 spec :

        %td
          -#form.object.p_spec_type = PSpecType.new if !form.object.p_spec_type
          -#form.object.p_spec_value = PSpecValue.new if !form.object.p_spec_value
        
          = form.input :p_spec_type_id, :label => "Type", as: :select, collection: PSpecType.all, :include_blank => false
        %td
          = form.input :p_spec_value_id, :label => "Valeur", as: :select, collection: PSpecValue.all, :include_blank => false, :member_label => :member_label
          
        
          =#form.inputs do
          =# form.semantic_fields_for :p_spec_type do | f |
          =#render :partial => "admin/p_spec_types/form", :locals => {:f => f}
          =# form.semantic_fields_for :p_spec_value do | f |
          =# render :partial => "admin/p_spec_values/form", :locals => {:f => f}
      %tr
        %td
          = link_to_remove_fields ic(:"trash-o"), form
