Sha256: cda2c39204286d816b886cc2e67b886076aa4732626f6a3947ecfe84ab8ce092

Contents?: true

Size: 1.78 KB

Versions: 12

Compression:

Stored size: 1.78 KB

Contents

<%# Renders the secondary downloads displayed in the split dropdown %>
<% document ||= @document %>

<button type='button' class='btn btn-default dropdown-toggle download-dropdown-toggle' data-toggle='dropdown' aria-expanded='false'>
  <span class='caret'></span>
  <span class='sr-only'>Toggle Download Dropdown</span>
</button>
<ul class='dropdown-menu' role='menu'>
  <% if document.hgl_download.present? %>
    <li role="presentation" class="dropdown-header">Original</li>
    <li>
      <%= link_to(download_text(document.download_types.first[0]),
      download_hgl_path(id: document), data: {ajax_modal: 'trigger', download: 'trigger', download_type: 'harvard-hgl', download_id: document.id }) %>
    </li>
  <% else %>
    <% if document.direct_download.present? %>
      <li role="presentation" class="dropdown-header">Original</li>
      <li>
        <%= link_to(download_text(@document.file_format), document.direct_download[:download], 'contentUrl' => document.direct_download[:download], data: { download: 'trigger', download_type: 'direct', download_id: document.id }) %>
      </li>
    <% end %>
    <% if document.download_types.present? || document.iiif_download.present? %>
      <li role="presentation" class="dropdown-header">Generated</li>
    <% end %>
    <% if document.iiif_download.present? %>
      <li>
        <%= link_to "Download JPG", iiif_jpg_url, download: 'trigger' %>
      </li>
    <% end %>

    <% if document.download_types.present? %>
      <% document.download_types.each do |type| %>
        <%= content_tag(:li) do %>
          <% link_to(download_text(type[0]), '', data: { download_path: "#{download_path(document.id, type: type[0])}", download: 'trigger', download_type: type[0], download_id: document.id }) %>
        <% end %>
      <% end %>
    <% end %>
  <% end %>
</ul>

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
geoblacklight-1.8.0 app/views/catalog/_downloads_secondary.html.erb
geoblacklight-1.7.1 app/views/catalog/_downloads_secondary.html.erb
geoblacklight-1.7.0 app/views/catalog/_downloads_secondary.html.erb
geoblacklight-1.6.0 app/views/catalog/_downloads_secondary.html.erb
geoblacklight-1.5.1 app/views/catalog/_downloads_secondary.html.erb
geoblacklight-1.5.0 app/views/catalog/_downloads_secondary.html.erb
geoblacklight-1.4.0 app/views/catalog/_downloads_secondary.html.erb
geoblacklight-1.3.0 app/views/catalog/_downloads_secondary.html.erb
geoblacklight-1.2.0 app/views/catalog/_downloads_secondary.html.erb
geoblacklight-1.1.2 app/views/catalog/_downloads_secondary.html.erb
geoblacklight-1.1.0 app/views/catalog/_downloads_secondary.html.erb
geoblacklight-1.0.3 app/views/catalog/_downloads_secondary.html.erb