noesya/osuny

View on GitHub
app/views/admin/education/programs/index.html.erb

Summary

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

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

<%= render 'admin/education/programs/list', programs: @programs %>
<%= paginate @programs %>

<% content_for :action_bar_left do %>
  <%= link_to t('admin.education.programs.view_as_tree'),
              tree_admin_education_programs_path,
              class: button_classes %>
<% end %>

<% content_for :action_bar_right do %>
  <%= create_link Education::Program %>
<% end %>