app/views/searches/index.html.erb
<%
page_heading "Search History"
%>
<h2><%= current_group.name %> Search History</h2>
<table id="searches" class="show-table table table-bordered table-striped table-hover">
<%- if @searches.any? -%>
<%- @searches.each do |search| -%>
<tr>
<td>
<%= search.name %>
</td>
<td>
<%= link_to "Show results", [current_group, search], :class => "btn", :id => "results" %>
</td>
<td>
<%= link_to "Download CSV", group_search_path(current_group, search, :format => :csv), :class => "btn" %>
</td>
<td>
<%= link_to "Delete", [current_group, search], :confirm => "Are you sure?", :method => :delete, :class => "btn btn-danger btn-small" %>
</td>
</tr>
<%- end -%>
<%- else -%>
<tr class="center">
<td>
No saved searches for <%= current_group.name %>
</td>
</tr>
<%- end -%>
</table>
<%- if @search_comparison.enough_to_compare? -%>
<div id="search_comparisons" class="padded border margin span5">
<h3>Search comparisons</h3>
<%= render :partial => 'search_comparisons/new' %>
</div>
<%- end -%>