app/views/admin/calendars/index.html.erb
<h1>Calendars</h1>
<p>Click on show to select a calendar. You can then edit any events on the calendar, or add new ones.</p>
<h2>National calendars</h2>
<p>These calendars hold the bank holidays, adding a bank holiday to one of the national calendars will automatically update any dependent calendars.</p>
<% if @national_calendars.any? %>
<%= render 'national_calendars', calendars: @national_calendars, title: 'National calendars' %>
<% else %>
<h2>There are no National calendars</h2>
<% end %>
<h2>Regional calendars</h2>
<p>These calendars get their bank holidays from the calendar they are based on. Adding any terms to these calendars will automatically update any dependent school calendars.</p>
<p><%= link_to 'New regional calendar', new_admin_calendar_path(calendar_type: :regional), class: 'btn' %></p>
<% if @regional_calendars.any? %>
<%= render 'regional_calendars', calendars: @regional_calendars %>
<% else %>
<h2>There are no Regional calendars</h2>
<% end %>
<% if @school_calendars.any? %>
<h2>School calendars</h2>
<%= render 'school_calendars', calendars: @school_calendars %>
<% else %>
<h2>There are no Customised Calendars </h2>
<% end %>