diff options
author | Aamir Khan <syst3m.w0rm@gmail.com> | 2012-08-11 11:35:43 +0530 |
---|---|---|
committer | Aamir Khan <syst3m.w0rm@gmail.com> | 2012-08-11 11:35:43 +0530 |
commit | 8a681b27fb1e2644a1330ed6e5581232ee1eb107 (patch) | |
tree | 961237b5309d10e6fb652481a91c03894c3fdcdb /hyperkitty/views | |
parent | 276b6ec8e34695bb7ddb0a2bf5ea6470b355b499 (diff) | |
download | hyperkitty-8a681b27fb1e2644a1330ed6e5581232ee1eb107.tar.gz hyperkitty-8a681b27fb1e2644a1330ed6e5581232ee1eb107.tar.xz hyperkitty-8a681b27fb1e2644a1330ed6e5581232ee1eb107.zip |
Issue 15: Add pagination next | prev in web interface
Diffstat (limited to 'hyperkitty/views')
-rw-r--r-- | hyperkitty/views/list.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/hyperkitty/views/list.py b/hyperkitty/views/list.py index b68d220..a0856a0 100644 --- a/hyperkitty/views/list.py +++ b/hyperkitty/views/list.py @@ -104,12 +104,21 @@ def archives(request, mlist_fqdn, year=None, month=None, day=None): c = RequestContext(request, { 'list_name' : list_name, + 'objects': threads.object_list, + 'page': pageNo, + 'has_previous': threads.has_previous(), + 'has_next': threads.has_next(), + 'previous': threads.previous_page_number(), + 'next': threads.next_page_number(), + 'is_first': pageNo == 1, + 'is_last': pageNo == paginator.num_pages, 'list_address': mlist_fqdn, 'search_form': search_form, 'month': month_string, 'month_participants': len(participants), 'month_discussions': len(threads), 'threads': threads, + 'pages' : paginator.object_list, 'archives_length': archives_length, }) return HttpResponse(t.render(c)) |