app/views/location_reports/_location_reports.html.erb
<table class="location_reports sortable detailed table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Created on</th>
<th>Created by</th>
<th>Download</th>
</tr>
</thead>
<tbody>
<% location_reports.each do |location_report| %>
<tr>
<td><%= location_report.name %></td>
<td class="strong faint"><%= location_report.created_at.to_formatted_s(:sortable) %></td>
<td>
<% if location_report.user %>
<%= location_report.user.login %>
<% end %>
</td>
<td>
<% if location_report.report_filename.present? %>
<%= link_to 'Download', location_report_path(location_report), title: "Download report for #{location_report.name}" %>
<% else %>
Processing
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>