emory-libraries/dlp-selfdeposit

View on GitHub
app/views/hyrax/file_sets/show.html.erb

Summary

Maintainability
Test Coverage
<!-- Hyrax 5.0.1 override: adds preservation events table after activity log and styles for Emory-->

<% provide :page_title, @presenter.page_title %>

<div class="file-set-show">

  <header>
    <%= render 'file_set_title', presenter: @presenter %>
  </header>

  <div class="row show-actions button-row-top-two-column">
    <div class="col-sm-6">
    <%= render 'show_actions', presenter: @presenter %>
    </div>
    <div class="col-sm-6 text-right">
    <%= render 'single_use_links', presenter: @presenter if @presenter.editor? %>
    </div>
</div>

  <div class="file-set-details card">
    <h2 class="card-header"><%= t(".file_details") %></h2>
    <div class="card-body">
      <div class="row">

        <div itemscope itemtype="<%= @presenter.itemtype %>" class="col-8">
          <% @presenter.show_partials.each do |partial_path| %>
            <%= render partial_path %>
          <% end %>
        </div>
          
        <div class="col-4">
          <%= render media_display_partial(@presenter), file_set: @presenter %>
        </div><!-- /.col-4 -->
          
      </div><!-- /.row -->
      <%= render 'hyrax/users/activity_log', events: @presenter.events %>
    </div><!-- /.card-body -->
  </div><!-- /.card -->
        
  <div class="card">
    <h2 class="card-header"><%= t('.preservation_events') %></h2>
    <div class="event-table" role="region" aria-label="Preservation Events" tabindex="0">
      <%= render 'hyrax/base/preservation_events', presenter: @presenter %>
    </div>

  </div><!-- /card -->

</div><!-- /.file-set-show -->

<% @presenter.member_of_collection_ids.each do |collection_id| %>
  <span class='hide analytics-event' data-category="file-set-in-collection" data-action="file-set-in-collection-view" data-name="<%= collection_id %>" >
<% end %>
<span class='hide analytics-event' data-category="file-set-in-work" data-action="file-set-in-work-view" data-name="<%= @presenter.parent.id %>" >
<span class='hide analytics-event' data-category="file-set" data-action="file-set-view" data-name="<%= @presenter.id %>" >