sul-dlss/argo

View on GitHub
app/views/catalog/show.html.erb

Summary

Maintainability
Test Coverage
<div class="row search-links">
  <div class="col-md-10">
    <%= render(Blacklight::SearchContextComponent.new(search_context: @search_context, search_session:)) if search_session['document_id'] == @document.id %>
  </div>
  <div class="col-md-2">
    <%= link_back_to_catalog label: 'Back to search', class: 'btn btn-default' %>
  </div>
</div>

<% @page_title = t('blacklight.search.show.title', document_title: document_presenter(@document).html_title, application_name:).html_safe %>
<% content_for(:head) { render_link_rel_alternates } %>
<%= render (blacklight_config.view_config(:show).document_component || Blacklight::DocumentComponent).new(presenter: document_presenter(@document), component: :div, title_component: :h1, show: true) do |component| %>
  <% component.footer do %>
    <% if @document.respond_to?(:export_as_openurl_ctx_kev) %>
      <!--
           // COinS, for Zotero among others.
           // This document_partial_name(@document) business is not quite right,
           // but has been there for a while.
      -->
      <span class="Z3988" title="<%= @document.export_as_openurl_ctx_kev(Deprecation.silence(Blacklight::RenderPartialsHelperBehavior) { document_partial_name(@document) }) %>"></span>
    <% end %>
  <% end %>
  <%# Use :body for complete backwards compatibility (overriding the component body markup),
        but if the app explicitly  opted-in to components, make the partials data available as :partials to ease migrations pain %>
  <% component.public_send(blacklight_config.view_config(:show).document_component.blank? && blacklight_config.view_config(:show).partials.any? ? :body : :partial) do %>
    <div id="doc_<%= @document.id.to_s.parameterize %>">
      <%= render_document_partials @document, blacklight_config.view_config(:show).partials, component: %>
    </div>
  <% end %>
<% end %>

<div id="edit-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="modal menu" aria-hidden="true">
  <div class="modal-dialog modal-xl">
    <div class="modal-content">
    </div>
  </div>
</div>