commit:     c83b0bd2b30111043ba96b296a76b50abd8dfd9d
Author:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 22 04:38:22 2015 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Sun Feb 22 04:38:22 2015 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=proj/ag-web.git;a=commit;h=c83b0bd2

Include a count of mails.

Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>

---
 views/index.erb | 13 ++++++++++---
 1 file 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>

Reply via email to