Skip to content

Commit

Permalink
Add search links to stats page
Browse files Browse the repository at this point in the history
  • Loading branch information
Earlopain committed Oct 2, 2023
1 parent 2b6af78 commit cd383a9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions app/views/stats/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@
</thead>
<tbody>
<% @definitions.each do |definition| %>
<% entry = @counts[definition.enum_value] || {} %>
<tr>
<td><%= definition.display_name %></td>
<td><%= @counts[definition.enum_value]&.[]("artist_count") || 0 %></td>
<td><%= @counts[definition.enum_value]&.[]("url_count") || 0 %></td>
<td><%= @counts[definition.enum_value]&.[]("submission_count") || 0 %></td>
<td><%= @counts[definition.enum_value]&.[]("file_count") || 0 %></td>
<td><%= link_to(entry["artist_count"] || 0, artists_path(search: { site_type: definition.enum_value })) %></td>
<td><%= link_to(entry["url_count"] || 0, artist_urls_path(search: { site_type: definition.enum_value })) %></td>
<td><%= link_to(entry["submission_count"] || 0, submission_files_path(search: { site_type: definition.enum_value })) %></td>
<td><%= link_to(entry["file_count"] || 0, submission_files_path(search: { site_type: definition.enum_value })) %></td>
<td>
<% if definition.manually_disabled? %>
Manually disabled
Expand Down

0 comments on commit cd383a9

Please sign in to comment.