<% document ||= @document %>
Tools
    <%= render_show_doc_actions @document, wrapping_class: 'list-group-item' %> <% if @document.respond_to?( :to_email_text ) %> <%= link_to email_helper, email_catalog_path(:id => @document), {:id => 'emailLink', :data => {:ajax_modal => "trigger"}, :class => 'list-group-item'} %> <%- end -%> <%- if @document.respond_to?( :to_sms_text ) -%> <%= link_to sms_helper, sms_catalog_path(:id => @document), {:id => 'smsLink', :data => {:ajax_modal => "trigger"}, :class => 'list-group-item'} %> <%- end -%>  Cite This
<% if document_downloadable? %>
<% unless document.direct_download.blank? %> <%= link_to("Download #{@document[:dc_format_s]}", document.direct_download[:download], class: 'btn btn-default', 'contentUrl' => document.direct_download[:download]) %> <% else %> <%= link_to("Download #{document.download_types.first[0].capitalize}", '', data: { download_path: "#{download_path(document[:layer_slug_s], type: document.download_types.first[0])}"}, class: 'btn btn-default') %> <% end %>
<% elsif document.restricted? && document.same_institution? %> <%= link_to t('geoblacklight.tools.login_to_view'), new_user_session_path(referrer: request.original_url) %> <% end %>