<% document ||= @document %>
<% if document_downloadable? %>
  <div class='btn-group' itemprop='distribution' itemscope='itemscope' itemtype='http://schema.org/DataDownload'>
    <%= render 'downloads_primary' %>
    <%= render 'downloads_secondary' %>
  </div>
  <% elsif document.restricted? && document.same_institution? %>
    <div class='panel-body'>
      <%= link_to t('geoblacklight.tools.login_to_view'), new_user_session_path(referrer: request.original_url) %>
    </div>
<% end %>
