summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorAlex Legler <alex@a3li.li>2015-02-22 12:29:49 +0100
committerAlex Legler <alex@a3li.li>2015-02-22 12:29:49 +0100
commit72b8c84b55e84a0f5287b417d256db4d10aec095 (patch)
treef719172e0b319e9343764db700bedc3b48a65966 /views
parentResponsiveness fix #4: Message tables (diff)
downloadfrontend-72b8c84b55e84a0f5287b417d256db4d10aec095.tar.gz
frontend-72b8c84b55e84a0f5287b417d256db4d10aec095.tar.bz2
frontend-72b8c84b55e84a0f5287b417d256db4d10aec095.zip
Fix mail count
Diffstat (limited to 'views')
-rw-r--r--views/index.erb21
1 files changed, 11 insertions, 10 deletions
diff --git a/views/index.erb b/views/index.erb
index 77eda4c..d1454ea 100644
--- a/views/index.erb
+++ b/views/index.erb
@@ -6,7 +6,11 @@
<div class="col-xs-12 col-md-6">
<div class="list-group">
<% $config['active_lists'].each do |list| %>
- <a href="<%= h list %>/" class="list-group-item"><span class="fa fa-fw fa-archive"></span> <%= h list %></a>
+ <a href="<%= h list %>/" class="list-group-item">
+ <span class="fa fa-fw fa-archive"></span>
+ <%= h list %>
+ <span class="badge"><%= get_message_count(list) %></span>
+ </a>
<% end %>
</div>
</div>
@@ -24,15 +28,12 @@
<div class="row">
<div class="col-xs-12 col-md-6">
<div class="list-group">
- <% $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>
+ <% $config['frozen_lists'].each do |list| %>
+ <a href="<%= h list %>/" class="list-group-item">
+ <span class="fa fa-fw fa-archive"></span>
+ <%= h list %>
+ <span class="badge"><%= get_message_count(list) %></span>
+ </a>
<% end %>
</div>
</div>