UNC-Libraries/hy-c

View on GitHub
app/views/hyrax/my/works/_list_works.html.erb

Summary

Maintainability
Test Coverage
<%# [hyc-override] https://github.com/samvera/hyrax/tree/hyrax-v4.0.0/app/views/hyrax/my/works/_list_works.html.erb %>
<tr id="document_<%= document.id %>">

  <td>
    <label for="batch_document_<%= document.id %>" class="sr-only"><%= t("hyrax.dashboard.my.sr.batch_checkbox") %></label>
    <%= render 'hyrax/batch_select/add_button', document: document %>&nbsp;
  </td>

  <td>
    <div class='media'>
      <%= link_to [main_app, document], class: 'mr-2' do %>
        <%= document_presenter(document)&.thumbnail&.thumbnail_tag(
          { class: 'd-none d-md-block file_listing_thumbnail', alt: "#{document.title_or_label} #{t('hyrax.homepage.admin_sets.thumbnail')}" },
          { suppress_link: true } 
        ) %>
      <% end %>

      <div class='media-body'>
        <%= link_to [main_app, document], id: "src_copy_link#{document.id}", class: 'document-title' do %>
            <span class="sr-only">
              <%= t("hyrax.dashboard.my.sr.show_label") %>
            </span>
            <%= document.title_or_label %>
          <% end %>

          <br />
          <%= render_collection_links(document) %>
      </div>
    </div>
  </td>
  <td class="date text-center"><%= document.date_modified %></td>
  <%# [hyc-override] remove highlighted work column %>
  <%# <td class='text-center'> %>
    <%# <span class="fa <%= current_user.trophies.where(work_id: document.id).exists? ? 'fa-star highlighted-work' : 'fa-star-o trophy-off' % >" aria-hidden="true"></span></td> %>
  <td class='text-center'><%= render_visibility_link document %></td>

  <td class='text-center'>
    <%= render 'work_action_menu', document: document %>
  </td>
</tr>