noesya/osuny

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

Summary

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

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

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

<% content_for :action_bar_left do %>
  <%= link_to t('import_btn'),
              new_admin_university_organizations_import_path,
              class: button_classes if can? :create, University::Organization %>
  <%= link_to t('export'),
              request.params.merge(format: "xlsx"),
              class: button_classes %>
<% end %>

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