app/views/admin/reports/meter_reports/index.html.erb
<% content_for :page_title, 'Meter data reports' %>
<h1>School group meter data reports </h1>
<% if @school_groups.any? %>
<table class="table table-condensed">
<thead>
<tr>
<th>Name</th>
<th></th>
</tr>
</thead>
<tbody>
<% @school_groups.each do |school_group| %>
<tr>
<td><%= school_group.name %></td>
<td>
<div class='btn-group'>
<%= render 'admin/school_groups/email_meter_report_button', school_group: school_group, class: 'btn' %>
<%= link_to 'Download meter collections', admin_schools_meter_collections_path(anchor: "school-group-#{school_group.id}"), class: 'btn' %>
</div>
</td>
</tr>
<% end %>
</tbody>
</table>
<% else %>
<h2>There are no School groups</h2>
<% end %>
<%= link_to 'All Reports', admin_reports_path, class: 'btn btn-primary' %>