Patchwork notifications: ensure paginator's links remain correct after Mark All Read

login
register
mail settings
Submitter Andrew Shadura
Date Sept. 10, 2015, 9:30 p.m.
Message ID <7a3677a677e363e5ce11.1441920601@nuevo>
Download mbox | patch
Permalink /patch/10474/
State Not Applicable
Headers show

Comments

Andrew Shadura - Sept. 10, 2015, 9:30 p.m.
# HG changeset patch
# User Andrew Shadura <andrew@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.

Patch

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>