Sha256: 25102248bcac11eb7ef25265ca3232c83d49840d55dfddd82d5d2114fae20388
Contents?: true
Size: 865 Bytes
Versions: 4
Compression:
Stored size: 865 Bytes
Contents
.collapsible %h2.title Add Classification =form_for Classification.new(:asset_id => asset.id) do |f| =select("classification", "catalog_id", Catalog.all.map {|c| [ c.title, c.id ] }) =f.hidden_field :asset_id =submit_tag "Add" %ul.collection{:class => "drawers"} -asset.classifications.each do |classification| %h2.title=classification.catalog.title %li .handle=classification.catalog.title .content =button_to "Drop", [classification], :method => :delete, :confirm => "Sure?" =form_for [classification] do =submit_tag "Save" -facet2label = Hash[*classification.labels.map{|l| [l.facet_id, l.id]}.flatten] .submit -classification.catalog.facets.each do |facet| %p %label=facet.caption =label_select(facet, facet2label[facet.id])
Version data entries
4 entries across 4 versions & 1 rubygems