Sfoglia il codice sorgente

Fix pagination url for 'view users in a group' (#6880)

Sagar Agarwal 4 anni fa
parent
commit
f9d1ec0bf7

+ 1 - 0
CHANGELOG.txt

@@ -19,6 +19,7 @@ Changelog
  * Fix: Make image chooser "Select format" fields translatable (Helen Chapman, Thibaud Colas)
  * Fix: Move labels above the form field in the image format chooser, to avoid styling issues at tablet size (Helen Chapman)
  * Fix: `{% include_block with context %}` now passes local variables into the block template (Jonny Scholes)
+ * Fix: Fix pagination on 'view users in a group' (Sagar Agarwal)
 
 
 2.12.3 (05.03.2021)

+ 1 - 0
CONTRIBUTORS.rst

@@ -500,6 +500,7 @@ Contributors
 * Lara Thompson
 * Tibor Leupold
 * Joan Eliot
+* Sagar Agarwal
 
 Translators
 ===========

+ 1 - 0
docs/releases/2.13.rst

@@ -38,6 +38,7 @@ Bug fixes
 * StreamField required status is now consistently handled by the ``blank`` keyword argument (Matt Westcott)
 * Show 'required' asterisks for blocks inside required StreamFields (Matt Westcott)
 * Make image chooser "Select format" fields translatable (Helen Chapman, Thibaud Colas)
+* Fix pagination on 'view users in a group' (Sagar Agarwal)
 
 
 Upgrade considerations

+ 2 - 1
wagtail/users/templates/wagtailusers/users/results.html

@@ -14,7 +14,8 @@
 
     {% include "wagtailusers/users/list.html" %}
 
-    {% include "wagtailadmin/shared/pagination_nav.html" with items=users linkurl="wagtailusers_users:index" %}
+    {# call pagination_nav with no linkurl, to generate general-purpose links like <a href="?p=2"> #}
+    {% include "wagtailadmin/shared/pagination_nav.html" with items=users %}
 {% else %}
     {% if is_searching %}
          <h2 role="alert">{% blocktrans %}Sorry, no users match "<em>{{ query_string }}</em>"{% endblocktrans %}</h2>