noesya/osuny

View on GitHub
app/views/admin/research/researchers/index.html.erb

Summary

Maintainability
Test Coverage
<% content_for :title, University::Person::Localization::Researcher.model_name.human(count: 2) %>

<div class="d-flex justify-content-between mb-4">
  <p>
    <%= @researchers.total_count %>
    <%= University::Person::Localization::Researcher.model_name.human(count: @researchers.total_count).downcase %>
  </p>
  <%= render 'filters', current_path: admin_research_researchers_path %>
</div>

<div class="row g-3">
  <% @researchers.each do |person| %>
    <div class="col-6 col-lg-3 col-xxl-2">
      <div class="<%= osuny_card_classes %>">
        <%= osuny_thumbnail_localized person, large: true %>
        <div class="card-body">
          <p class="mb-1">
            <%= osuny_link_localized  person,
                                      admin_research_researcher_path(person),
                                      classes: 'stretched-link'  %>
          </p>
          <% if person.publications.any? %>
            <p class="small text-muted mb-0">
              <%= person.publications.size %>
              <%= Research::Publication.model_name.human(count: person.publications.size).downcase %>
            </p>
          <% end %>
        </div>
      </div>
    </div>
  <% end %>
</div>
<%= paginate @researchers %>