app/views/banners/index.html.erb
<%= link_to "Create a new message", new_banner_path, class: 'usa-button'%>
<div id="banners">
<% if @banners.any? %>
<% sort_banners_by_timing(@banners).each_pair do |timing, banners| %>
<% if banners.any? %>
<%= render partial: 'table', locals: { timing: timing.to_s, banners: banners } %>
<% else %>
<h2 class="font-heading-xl">No <%= timing %> messages found</h2>
<% end %>
<% end %>
<% else %>
<h2 class="font-heading-xl">No messages found</h2>
<% end %>
</div>