noesya/osuny

View on GitHub
app/views/admin/university/people/index.html.erb

Summary

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

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

<%= render 'admin/university/people/list', people: @people %>
<%= paginate @people %>

<% content_for :action_bar_left do %>
  <%= link_to t('university.person.import_btn'),
              new_admin_university_people_import_path,
              class: button_classes if can? :create, University::Person %>
  <%= link_to t('university.person.experiences.import_btn'),
              new_admin_university_people_experiences_import_path,
              class: button_classes if can? :create, University::Person::Experience %>
  <%= link_to t('export'),
              request.params.merge(format: "xlsx"),
              class: button_classes %>
<% end %>

<% content_for :action_bar_right do %>
  <%= create_link University::Person %>
<% end %>