BathHacked/energy-sparks

View on GitHub
app/views/schools/reports/index.html.erb

Summary

Maintainability
Test Coverage
<h1>Admin batch process reports for <%= @school.name %></h1>

<ul>
  <% if can? :view_content_reports, @school %>
    <li><%= link_to 'Content reports', school_content_reports_path(@school) %> -- view summary of content generation runs</li>
  <% end %>
  <% if can? :view_content_reports, @school %>
    <li><%= link_to 'Alert reports', school_alert_reports_path(@school) %> -- view summary of recent alert runs</li>
  <% end %>
  <% if can? :view_content_reports, @school %>
    <li><%= link_to 'Benchmark reports', school_benchmark_reports_path(@school) %> -- view summary of recent benchmark runs</li>
  <% end %>
  <% if can? :view_content_reports, @school %>
    <li><%= link_to 'Equivalences', school_equivalence_reports_path(@school) %> -- view details of generated equivalences</li>
  <% end %>
  <% if can? :view_content_reports, @school %>
    <li><%= link_to 'Email and SMS reports', school_subscription_generation_runs_path(@school) %> -- view recently sent alerts</li>
  <% end %>
</ul>