]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/templatetags/node_tags.py
'show N more' comments rather than 'show all'
[osqa.git] / forum / templatetags / node_tags.py
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