]> git.openstreetmap.org Git - osqa.git/commitdiff
'show N more' comments rather than 'show all'
authorjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Mon, 24 Oct 2011 21:41:35 +0000 (21:41 +0000)
committerjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Mon, 24 Oct 2011 21:41:35 +0000 (21:41 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@1193 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/skins/default/templates/node/comments.html
forum/templatetags/node_tags.py

index 68ebde25aa8251f99f0303e17940bc1f26aa096a..3457aab60491aa5b8a9bafc755b89a5bfa4a4bd4 100644 (file)
@@ -98,7 +98,7 @@
         <span class="comments-showing">\r
             {% blocktrans %}showing {{ showing }} of {{ total }}{% endblocktrans %}\r
         </span>\r
-        <a href="#" class="show-all-comments-link">{% trans "show all" %}</a>\r
+        <a href="#" class="show-all-comments-link">{% blocktrans %}show {{ more_comments_count }} more comments{% endblocktrans %}</a>\r
     {% endifnotequal %}\r
     {% if can_comment %}\r
         <a href="#" class="add-comment-link">{% trans "add new comment" %}</a>\r
index 6fc19cec56dd036d2740a4d60d4d83ca2fdd0f95..5cdd3b05d46aa1ef3a59edc5fbd5f76f9b6be0ed 100644 (file)
@@ -221,6 +221,7 @@ def comments(post, user):
         })\r
         canned_comments.append(t.render(c))\r
 \r
+    total = len(all_comments)\r
     return {\r
         'comments': comments,\r
         'canned_comments': canned_comments,\r
@@ -230,7 +231,8 @@ def comments(post, user):
         'min_length': settings.FORM_MIN_COMMENT_BODY,\r
         'show_gravatar': settings.FORM_GRAVATAR_IN_COMMENTS,\r
         'showing': showing,\r
-        'total': len(all_comments),\r
+        'total': total,\r
+        'more_comments_count' : int(total - showing),\r
         'user': user,\r
     }\r
 \r