emory-libraries/dlp-selfdeposit

View on GitHub
app/views/hyrax/dashboard/collections/_show_descriptions.html.erb

Summary

Maintainability
Test Coverage
<% # [Hyrax-override-v5.0.1] %>
<h2 class="sr-only"><%= t('.descriptions') %></h2>
<dl class="metadata-collections">
  <!-- Persistent URL block start -->
  <div class='metadata-line'>
    <div class='col-xs-12 col-sm-4'><dt >Persistent URL</dt></div>
    <div class='col-xs-12 col-sm-8'><dd>
    <% if @presenter.solr_document['emory_persistent_id_ssi'].present? %>
        <% url = "#{request.base_url}/purl/#{@presenter.solr_document['emory_persistent_id_ssi']}" %>
        <a href="<%= url %>"><%= url %></a>
    <% else %>
        No alternate ID available
    <% end %>
    </dd></div>
  </div>
  <!-- Persistent URL block end -->

  <% @presenter.terms_with_values.each do |field_name| %>
    <div class="row">
      <dt class="col-5 text-right"><%= collection_metadata_label(@presenter, field_name) %></dt>
      <dd class="col-7"><%= collection_metadata_value(@presenter, field_name) %></dd>
    </div>
  <% end %>
</dl>