Sha256: d7b4fb81ac2e37afef2c1c28c86679380f509dadc5ac1f296b61dbf2026432c2

Contents?: true

Size: 1.58 KB

Versions: 6

Compression:

Stored size: 1.58 KB

Contents

<% include_works_link ||= can_ever_create_works? %>
<% include_collections_link ||= can?(:create, Collection) %>
<% if include_works_link || include_collections_link %>
  <div class="btn-group add-content">
    <%= link_to worthwhile.new_classify_concern_path, id: "add-content", class: "btn btn-primary dropdown-toggle", data: { toggle: "dropdown"} do %>
      <span class="icon icon-white glyphicon-plus"></span><span class="visuallyhidden">Add</span>
    <% end %>
    <ul class="dropdown-menu quick-create">
      <% if include_works_link %>
        <li>
          <strong class="menu-heading item-with-options">Add a Work</strong>
          <ul class="item-options quick-classify">
            <% Worthwhile::QuickClassificationQuery.each_for_context(current_user) do |concern| %>
              <li><%= link_to(
                    "New #{concern.human_readable_type}",
                    main_app.new_polymorphic_path([:curation_concern, concern]),
                    class: "item-option contextual-quick-classify #{dom_class(concern, 'new').gsub('_', '-')}",
                    role: 'menuitem'
                  ) %>
              </li>
            <% end %>
            <li><%= link_to 'More Options', worthwhile.new_classify_concern_path, class: 'item-option link-to-full-list', role: 'menuitem' %></li>
          </ul>
        </li>
        <li class="divider"></li>
      <% end %>
      <% if include_collections_link %>
        <li><%= link_to 'Add a Collection', collections.new_collection_path, class: 'menu-heading new-collection', role: 'menuitem' %></li>
      <% end %>
    </ul>
  </div>
<% end %>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
worthwhile-0.1.2 app/views/shared/_add_content.html.erb
worthwhile-0.1.1 app/views/shared/_add_content.html.erb
worthwhile-0.1.0 app/views/shared/_add_content.html.erb
worthwhile-0.0.3 app/views/shared/_add_content.html.erb
worthwhile-0.0.2 app/views/shared/_add_content.html.erb
worthwhile-0.0.1 app/views/shared/_add_content.html.erb