Sha256: 0c5862ae6d6e5a636188e71ca58612057880bc848c30914f776e405ef82b3063

Contents?: true

Size: 1.77 KB

Versions: 13

Compression:

Stored size: 1.77 KB

Contents

- @window_title = "Library"
- @page_title = "#{link_to "Asset Library", admin_asset_category_path(:category => 'all' , :page => 1 )} > Collections"

.row-fluid
  = render :partial => "/gluttonberg/admin/asset_library/shared/sidebar"
  .span9
    .row-fluid
      .page-header
        %h1
          = @page_title.html_safe
      .subnav
        = sub_nav do
          = nav_link("New Collection", new_admin_collection_url )

      - if @collections.empty?
        %p.empty No collections available
      - else
        - unless @collections.empty?
          .accordion#accordion_for_collections
            - for collection in @collections
              - unless @category.blank? || @category.asset_type_ids.blank?
                - assets = collection.assets.where({:asset_type_id => @category.asset_type_ids })
              - else
                - assets = collection.assets
              - if assets.length > 0
                .accordion-group
                  .accordion-heading
                    %a{ :class=>"accordion-toggle no-ajax" , "data-toggle" => "collapse" , "data-parent" => "#accordion_for_collections" , "data-target" => "#collection-#{collection.id}", "href" => "#collection-#{collection.id}"}
                      = "#{collection.name} ( #{pluralize(assets.length,'asset')} )"
                  .accordion-body{:id => "collection-#{collection.id}" , :class => "collapse  in"}
                    .accordion-inner
                      = render :partial => "gluttonberg/admin/shared/asset_panel.html" , :locals => {:assets => assets}
                      /%li= link_to("Edit", edit_admin_collection_url(collection)  )
                      /%li= link_to("Delete", delete_admin_collection_url(collection) )


:javascript
  $(".collapse").collapse({parent: "#accordion_for_collections"})

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
gluttonberg-core-2.6.2 app/views/gluttonberg/admin/asset_library/collections/index.html.haml
gluttonberg-core-2.6.1 app/views/gluttonberg/admin/asset_library/collections/index.html.haml
gluttonberg-core-2.6.0 app/views/gluttonberg/admin/asset_library/collections/index.html.haml
gluttonberg-core-2.5.9 app/views/gluttonberg/admin/asset_library/collections/index.html.haml
gluttonberg-core-2.5.8 app/views/gluttonberg/admin/asset_library/collections/index.html.haml
gluttonberg-core-2.5.7 app/views/gluttonberg/admin/asset_library/collections/index.html.haml
gluttonberg-core-2.5.6 app/views/gluttonberg/admin/asset_library/collections/index.html.haml
gluttonberg-core-2.5.5 app/views/gluttonberg/admin/asset_library/collections/index.html.haml
gluttonberg-core-2.5.4 app/views/gluttonberg/admin/asset_library/collections/index.html.haml
gluttonberg-core-2.5.3 app/views/gluttonberg/admin/asset_library/collections/index.html.haml
gluttonberg-core-2.5.2 app/views/gluttonberg/admin/asset_library/collections/index.html.haml
gluttonberg-core-2.5.1 app/views/gluttonberg/admin/asset_library/collections/index.html.haml
gluttonberg-core-2.5 app/views/gluttonberg/admin/asset_library/collections/index.html.haml