diff options
author | Aurélien Bompard <aurelien@bompard.org> | 2012-10-10 19:12:07 +0200 |
---|---|---|
committer | Aurélien Bompard <aurelien@bompard.org> | 2012-10-10 19:12:07 +0200 |
commit | fbfe8fc7ea6ba91661027ea51dec290823f9e0bb (patch) | |
tree | 0000af97b2ca88ee0b92f5ac666a9a91682f0e7e /hyperkitty/views/list.py | |
parent | 7558ef3a1e4f2625075d8a34b25224f7e595c939 (diff) | |
download | hyperkitty-fbfe8fc7ea6ba91661027ea51dec290823f9e0bb.tar.gz hyperkitty-fbfe8fc7ea6ba91661027ea51dec290823f9e0bb.tar.xz hyperkitty-fbfe8fc7ea6ba91661027ea51dec290823f9e0bb.zip |
Improve styling in headers and thread view
Diffstat (limited to 'hyperkitty/views/list.py')
-rw-r--r-- | hyperkitty/views/list.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/hyperkitty/views/list.py b/hyperkitty/views/list.py index d8ea29a..91caa99 100644 --- a/hyperkitty/views/list.py +++ b/hyperkitty/views/list.py @@ -140,6 +140,14 @@ def archives(request, mlist_fqdn, year=None, month=None, day=None): except: thread.avgdislike = 0 + thread.likestatus = "neutral" + if thread.avglike - thread.avgdislike >= 10: + thread.likestatus = "likealot" + elif thread.avglike - thread.avgdislike > 0: + thread.likestatus = "like" + #elif thread.avglike - thread.avgdislike < 0: + # thread.likestatus = "dislike" + threads[cnt] = thread cnt = cnt + 1 @@ -170,7 +178,8 @@ def archives(request, mlist_fqdn, year=None, month=None, day=None): 'is_last': pageNo == paginator.num_pages, 'list_address': mlist_fqdn, 'search_form': search_form, - 'month': month_string, + 'month': begin_date, + 'month_num': begin_date.month, 'month_participants': len(participants), 'month_discussions': len(threads), 'threads': threads, @@ -256,7 +265,7 @@ def list(request, mlist_fqdn=None): 'mlist' : mlist, 'list_address': mlist_fqdn, 'search_form': search_form, - 'month': 'Recent activity', + 'month': None, 'month_participants': len(participants), 'month_discussions': len(threads), 'top_threads': top_threads[:5], |