You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2021/08/27 21:18:58 UTC

[allura] branch master updated: page and limit url params are now being included in threaded comments links

This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/allura.git


The following commit(s) were added to refs/heads/master by this push:
     new 54c0890  page and limit url params are now being included in threaded comments links
54c0890 is described below

commit 54c08909fe4cd81437564bfeb33f7609a51f749a
Author: Guillermo Cruz <gu...@slashdotmedia.com>
AuthorDate: Wed Aug 18 11:05:51 2021 -0600

    page and limit url params are now being included in threaded comments links
---
 Allura/allura/templates/widgets/post_widget.html | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Allura/allura/templates/widgets/post_widget.html b/Allura/allura/templates/widgets/post_widget.html
index 0d1e6ee..8fc7c24 100644
--- a/Allura/allura/templates/widgets/post_widget.html
+++ b/Allura/allura/templates/widgets/post_widget.html
@@ -17,11 +17,11 @@
        under the License.
 -#}
 {% import 'allura:templates/jinja_master/lib.html' as lib with context %}
-
-{% if page == 0 %}
-  {% set params = '' %}
-{% else %}
-  {% set params = '?page={}&limit={}'.format(page, limit) %}
+{% set page = request.params.get('page','0') %}
+{% set limit = request.params.get('limit','0') %}
+{% set params = '' %}
+{% if page != '0' %}
+    {% set params = '?page={}&limit={}'.format(page, limit) %}
 {% endif %}
 {% set shortlink_url = h.absurl(request.path + params + '#' + value.slug) %}
 
@@ -68,7 +68,7 @@
             {% if (h.has_access(value.thread, 'post')() and value.status == 'ok') or moderator %}
                 <a class="icon reply_post btn" href="#" style="" title="Reply" role="button"><span class="ui-button-text"><i class="fa fa-reply"></i></span></a>
             {% endif %}
-            <a href="{{shortlink_url}}" title="Shortlink" class="little_link shortlink icon btn ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"{%if value.status == 'pending'%} style="display:none"{%endif%}>
+            <a href="{{shortlink_url}}" title="Link" class="little_link shortlink icon btn ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"{%if value.status == 'pending'%} style="display:none"{%endif%}>
               <span><i class="fa fa-link" aria-hidden="true"></i></span></a>
 
             {% if h.has_access(value, 'moderate')()%}