<%= t('tables.school_year', count: 2) %> <% @school_calendars.each do |school_calendar| %> <% end %>
<%= SchoolCalendar.human_attribute_name :year %> <%= SchoolCalendar.human_attribute_name :opened_year %> <%= t('tables.actions')%>
<%= school_calendar.year %> <%= school_calendar.opened_year ? 'Aberto' : 'Fechado' %> <% if policy(@unity).manage_school_calendars? %> <% if school_calendar.opened_year %> <%= link_to "Fechar", close_school_calendar_path(school_calendar), method: :patch, class: 'btn btn-success btn-sm', data: { confirm: t('confirmations.close_school_year', year: school_calendar.year) }, title: t('tooltips.close_school_year') %> <% else %> Fechar <% end %> <% else %> Fechar <% end %>
<%= paginate @school_calendars %>