emory-libraries/dlp-selfdeposit

View on GitHub
app/views/hyrax/base/_preservation_events.html.erb

Summary

Maintainability
Test Coverage
<% sorted_events = sort_preservation_events(@presenter.solr_document['preservation_events_tesim']) %>
<% if sorted_events.present? %>
    <table id="preservation-event-table" class="table table-striped table-bordered">
        <thead>
        <tr>
            <th class="pet-fit"><%= t('.event') %></th>
            <th class="pet-fit"><%= t('.timestamp') %></th>
            <th class="pet-fit"><%= t('.outcome') %></th>
            <th class="pet-fit"><%= t('.detail') %></th>
            <th class="pet-fit"><%= t('.user') %></th>
            <th class="pet-fit"><%= t('.software') %></th>
        </tr>
        </thead>
        <tbody>
            <% sorted_events.each do |event_data| %>
                <%= render 'event', event_data: event_data %>
            <% end %>
        </tbody>
    </table>
<% else %>
    <p>No preservation events found.</p>
<% end %>