app/views/admin/advice_pages/index.html.erb
<% content_for :page_title, "Manage Advice Pages" %>
<h1>Manage advice pages</h1>
<p>
Use this page to manage the configuration of the new school advice pages.
</p>
<table class="table table-striped">
<thead>
<tr>
<th>Key</th>
<th>Restricted?</th>
<th>Manage</th>
</tr>
</thead>
<tbody>
<% @advice_pages.each do |advice_page| %>
<tr>
<td><%= advice_page.key %></td>
<td><%= y_n(advice_page.restricted) %></td>
<td>
<%= link_to 'Edit', edit_admin_advice_page_path(advice_page), class: 'btn'%>
<%= link_to "Activity types (#{advice_page.activity_types.count})", admin_advice_page_activity_types_path(advice_page), class: 'btn' %>
<%= link_to "Actions (#{advice_page.intervention_types.count})", admin_advice_page_intervention_types_path(advice_page), class: 'btn' %>
</td>
</tr>
<% end %>
</tbody>
</table>