summaryrefslogtreecommitdiffstats
path: root/hyperkitty/views/index.py
diff options
context:
space:
mode:
authorAurélien Bompard <aurelien@bompard.org>2013-11-14 17:49:47 +0100
committerAurélien Bompard <aurelien@bompard.org>2013-11-20 19:15:40 +0100
commit4c13d0ea5f429d2361e04ef013d65f28c29af2ac (patch)
tree03740886d453bdfa485bb4503e855d48443310aa /hyperkitty/views/index.py
parentcdf8249b4cb0a05e88c181674aa0a70f25019e00 (diff)
downloadhyperkitty-4c13d0ea5f429d2361e04ef013d65f28c29af2ac.tar.gz
hyperkitty-4c13d0ea5f429d2361e04ef013d65f28c29af2ac.tar.xz
hyperkitty-4c13d0ea5f429d2361e04ef013d65f28c29af2ac.zip
Improve front page appearance
Diffstat (limited to 'hyperkitty/views/index.py')
-rw-r--r--hyperkitty/views/index.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/hyperkitty/views/index.py b/hyperkitty/views/index.py
index 0954ee8..7f61a1e 100644
--- a/hyperkitty/views/index.py
+++ b/hyperkitty/views/index.py
@@ -57,12 +57,15 @@ def index(request):
# sorting
sort_mode = request.GET.get('sort')
if sort_mode == "active":
- lists.sort(key=lambda l: l.recent_threads_count)
+ lists.sort(key=lambda l: l.recent_threads_count, reverse=True)
elif sort_mode == "popular":
- lists.sort(key=lambda l: l.recent_participants_count)
+ lists.sort(key=lambda l: l.recent_participants_count, reverse=True)
+ else:
+ sort_mode = None
context = {
'view_name': 'all_lists',
'all_lists': lists,
+ 'sort_mode': sort_mode,
}
return render(request, "index.html", context)