[PATCH] notifications: ensure paginator's links remain correct after Mark All Read

Andrew Shadura andrew at shadura.me
Thu Sep 10 21:31:11 UTC 2015


# HG changeset patch
# User Andrew Shadura <andrew at shadura.me>
# Date 1441920590 -7200
#      Thu Sep 10 23:29:50 2015 +0200
# Node ID 7a3677a677e363e5ce1184f2451c73c26c100ad1
# Parent  c9bb2d6186ba8b86a2a0695bc90ac8c8009e420c
notifications: ensure paginator's links remain correct after Mark All Read

Paginator is loaded together with the dynamic page content, so when it's
generated, a wrong URL may be used for its links.

diff --git a/kallithea/templates/admin/notifications/notifications_data.html b/kallithea/templates/admin/notifications/notifications_data.html
--- a/kallithea/templates/admin/notifications/notifications_data.html
+++ b/kallithea/templates/admin/notifications/notifications_data.html
@@ -32,7 +32,7 @@ unread = lambda n:{False:'unread'}.get(n
 
 <div class="notification-paginator">
   <div class="pagination-wh pagination-left">
-  ${c.notifications.pager('$link_previous ~2~ $link_next',**request.GET.mixed())}
+  ${c.notifications.pager('$link_previous ~2~ $link_next',controller='admin/notifications',**request.GET.mixed())}
   </div>
 </div>
 


More information about the kallithea-general mailing list