Sha256: ad431b0afc6a831be48447f2d3f0bcb2c0fd043d1c000e24526420f3be90924c

Contents?: true

Size: 1.53 KB

Versions: 4

Compression:

Stored size: 1.53 KB

Contents

.classification_form
  =form_for Classification.new(:asset_id => @content.asset.id), :url => main_app.classifications_path do |f|
    %p
      %label{:for => 'catalog_id'} New:
      =select("classification", "catalog_id", Catalog.all.inject([]){|m,c| m << [c.title, c.id]})
    =hidden_field_tag "classification[asset_id]", @content.asset.id.to_s
    =submit_tag "Create", :class => "classification_create"


.classification_sidebar
  .title Classifications
  %ul.collection
    -catalogs = []
    -@content.asset.classifications.each do |classification|
      -catalogs << classification.catalog_id
      %li.classification
        .content
          =form_for classification, :remote => true , :url => main_app.classification_path(classification) do |f|
            .classification_header
              =link_to classification.catalog.title, main_app.catalog_path(classification.catalog), :class => "classification_title"
              =submit_tag "Drop", :class => "classification_drop", :classification_id => classification.id
            .classification_facets
              -classification.catalog.facets.each do |facet|
                .facet{:class => "#{facet.color}_lite"}
                  .caption{:class => facet.color}
                    =facet.caption
                  %ul
                    -facet.labels.each do |label|
                      %li.label
                        =check_box_tag "labels[]", label.id, classification.label_ids.include?(label.id)
                        =link_to label.caption
                  =submit_tag "Save"

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fassets_core-0.4.0 app/views/assets/_classification.html.haml
fassets_core-0.3.1 app/views/assets/_classification.html.haml
fassets_core-0.3.0 app/views/assets/_classification.html.haml
fassets_core-0.2.0 app/views/assets/_classification.html.haml