Sha256: 36a495d67ac68c51af5a64c6d25e96b1c09332a9a652a831a15e8d60117e8788

Contents?: true

Size: 1.72 KB

Versions: 3

Compression:

Stored size: 1.72 KB

Contents

<div class="btn-group">

  <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button" id="dropdownMenu_<%= file_set.id %>" aria-haspopup="true">
    <span class="sr-only">Press to </span>
    Select an action
    <span class="caret" aria-hidden="true"></span>
  </button>

  <ul role="menu" class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu_<%= file_set.id %>">
  <% if can?(:edit, file_set.id) %>
    <li role="menuitem" tabindex="-1">
      <%= link_to 'Edit', edit_polymorphic_path([main_app, file_set]),
        { title: "Edit #{file_set}" } %>
    </li>

    <li role="menuitem" tabindex="-1">
      <%= link_to 'Versions',  edit_polymorphic_path([main_app, file_set], anchor: 'versioning_display'),
        { title: "Display previous versions" } %>
    </li>
  <% end %>

  <% if can?(:destroy, file_set.id) %>
    <li role="menuitem" tabindex="-1">
      <%= link_to 'Delete', polymorphic_path([main_app, file_set]),
        method: :delete, title: "Delete #{file_set}",
        data: {confirm: "Deleting #{file_set} from #{application_name} is permanent. Click OK to delete this from #{application_name}, or Cancel to cancel this operation"} %>
    </li>
  <% end %>

  <% if can?(:download, file_set.id) %>
    <li role="menuitem" tabindex="-1">
      <%= link_to 'Download', hyrax.download_path(file_set),
        title: "Download #{file_set.to_s.inspect}", target: "_blank" %>
    </li>
    <% NewspaperWorks::Data::WorkDerivatives.new(file_set.id).keys.each do |name| %>
      <li role="menuitem" tabindex="-1">
        <a href="<%= "/downloads/#{file_set.id}?locale=en&file=#{name}" %>">
          Download <em>(as <%= name %>)</em>
        </a>
      </li>
    <% end %>
  <% end %>

  </ul>
</div>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
newspaper_works-1.0.1 app/views/hyrax/file_sets/_actions.html.erb
newspaper_works-1.0.0 app/views/hyrax/file_sets/_actions.html.erb
newspaper_works-0.1.0 app/views/hyrax/file_sets/_actions.html.erb