.collapsible %h2.title New Label =form_for [@catalog, @facet, Label.new], :url => catalog_facet_labels_path(@catalog,@facet) do |f| =render :partial => "labels/form", :object => f =submit_tag "Create" .collapsible %h2.title Labels %ol.collection{:class => @facet.label_order == 'position' ? "sortable" : nil, :id => "catalogs.#{@catalog.id}.facets.#{@facet.id}.labels.sort"} -@facet.ordered_labels.each do |label| %li{:id => "label_#{label.id}"} =label.caption .content =form_for [@catalog, @facet, label], :url => catalog_facet_label_path(@catalog, @facet, label) do |f| =render :partial => "labels/form", :object => f =submit_tag "Save" =button_to "Drop", catalog_facet_label_path(@catalog, @facet, label), :confirm => 'Are you sure?', :method => "delete", :remote => true, :disable_with => 'loading...'