Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
117 lines (111 sloc) 2.47 KB
<section id="stats-main">
<h2>
Overall Stats
</h2>
<table id="general">
<thead>
<tr>
<% @overall_stats.each do | stat | %>
<td><%= stat[0] %></td>
<% end %>
</tr>
</thead>
<tbody>
<tr>
<% @overall_stats.each do | stat | %>
<td><%= number_with_delimiter(stat[1], :delimiter => ',') %></td>
<% end %>
</tr>
</tbody>
</table>
<h2>
Past 7 Days
</h2>
<table id="general">
<thead>
<tr>
<% @past_7_days_stats.each do | stat | %>
<td><%= stat[0] %></td>
<% end %>
</tr>
</thead>
<tbody>
<tr>
<% @past_7_days_stats.each do | stat | %>
<td><%= number_with_delimiter(stat[1], :delimiter => ',') %></td>
<% end %>
</tr>
</tbody>
</table>
<h3>Top Searches</h3>
<ol>
<% @top_past_7_days_searches.each do | key, value | %>
<li><a href='/just/<%= key %>' target='_blank'><%= key.gsub("+", " ") %></a></li>
<% end %>
</ol>
<h2>
Today
</h2>
<table id="general">
<thead>
<tr>
<% @today_stats.each do | stat | %>
<td><%= stat[0] %></td>
<% end %>
</tr>
</thead>
<tbody>
<tr>
<% @today_stats.each do | stat | %>
<td><%= number_with_delimiter(stat[1], :delimiter => ',') %></td>
<% end %>
</tr>
</tbody>
</table>
<h3>Top Searches</h3>
<ol>
<% @top_searches_today.each do | key, value | %>
<li><a href='/just/<%= key %>' target='_blank'><%= key.gsub("+", " ") %></a></li>
<% end %>
</ol>
<h2>
Most Recent Search History
</h2>
<table>
<thead>
<tr>
<td>Artist/Band</td>
<td>Search Type</td>
<td>Date</td>
</tr>
</thead>
<tbody>
<% @recent_searches.each do | search | %>
<tr url="<%= search[:url] %>">
<td><%= search[:what] %></td>
<td><%= search[:type] %></td>
<td><%= search[:date] %></td>
</tr>
<% end %>
</tbody>
</table>
<h2>
Recent User Favorites
</h2>
<table>
<thead>
<tr>
<td>Artist/Band</td>
<td>Date</td>
</tr>
</thead>
<tbody>
<% @recent_favorites.each do | favorite | %>
<tr url="<%= favorite[:url] %>">
<td><%= favorite[:who] + " favorited " + favorite[:what] %></td>
<td><%= favorite[:date] %></td>
</tr>
<% end %>
</tbody>
</table>
</section>
Something went wrong with that request. Please try again.