summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-02-21 20:38:22 -0800
committerRobin H. Johnson <robbat2@gentoo.org>2015-02-21 20:38:22 -0800
commitc83b0bd2b30111043ba96b296a76b50abd8dfd9d (patch)
tree20fbfa6dee13b757640635f819f1bf302e2f03aa /views
parentCorrectly handle multiple email addreses being handed to the cleanup function. (diff)
downloadfrontend-c83b0bd2b30111043ba96b296a76b50abd8dfd9d.tar.gz
frontend-c83b0bd2b30111043ba96b296a76b50abd8dfd9d.tar.bz2
frontend-c83b0bd2b30111043ba96b296a76b50abd8dfd9d.zip
Include a count of mails.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Diffstat (limited to 'views')
-rw-r--r--views/index.erb13
1 files changed, 10 insertions, 3 deletions
diff --git a/views/index.erb b/views/index.erb
index 4d68cc7..77eda4c 100644
--- a/views/index.erb
+++ b/views/index.erb
@@ -24,8 +24,15 @@
<div class="row">
<div class="col-xs-12 col-md-6">
<div class="list-group">
- <% $config['frozen_lists'].each do |list| %>
- <a href="<%= h list %>/" class="list-group-item"><span class="fa fa-fw fa-archive"></span> <%= h list %></a>
+ <% $config['frozen_lists'].each do |list|
+ begin
+ months = get_month_listing(list)
+ count = months['hits']['total'] + ' mails'
+ rescue => e
+ count = 'mail count unavailable'
+ end
+ %>
+ <a href="<%= h list %>/" class="list-group-item"><span class="fa fa-fw fa-archive"></span> <%= h list %> (<%= count %>)</a>
<% end %>
</div>
</div>
@@ -36,4 +43,4 @@
Archives are provided for future reference.
</div>
</div>
-</div> \ No newline at end of file
+</div>