]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/templates/question_list/count.html
Merge pull request #26 from udacity/remove_dj_version
[osqa.git] / forum / skins / default / templates / question_list / count.html
index 5108a8431c4338e48d729af3c253b4b0b0da6161..1e806dd66a181aaab7d8999fb5baff8d022fca81 100644 (file)
@@ -1,22 +1,26 @@
-{% load i18n %}\r
-{% load humanize %}\r
-\r
-<div class="boxC">\r
-    <div class="questions-count">\r
-        {{ questions_count }}<span style="color:black;font-size:14px;margin-left:5px">{{ list_description }}</span>\r
-    </div>\r
-\r
-\r
-    {% if answer_count %}\r
-    <div class="questions-count" style="color:green">\r
-        {{ answer_count }}<span style="color:black;font-size:14px;margin-left:5px">answers</span>\r
-    </div>\r
-\r
-    {% endif %}\r
-\r
-    <div>\r
-        <p class="nomargin">\r
-            {{ sort_description|safe }}\r
-        </p>\r
-    </div>\r
-</div>
\ No newline at end of file
+{% spaceless %}
+{% load i18n humanize extra_tags %}
+{% declare %}
+    answer_count = questions.children_count('answer')
+{% enddeclare %}
+
+<div class="boxC">
+    <div class="questions-count">
+        {{ questions.paginator.count }}<span style="color:black;font-size:14px;margin-left:5px">{{ list_description }}</span>
+    </div>
+
+
+    {% if answer_count %}
+    <div class="questions-count">
+        {{ answer_count }}<span style="color:black;font-size:14px;margin-left:5px">{% trans "answers" %}</span>
+    </div>
+
+    {% endif %}
+
+    <div>
+        <p class="nomargin">
+            {{ questions.paginator.sort_description }}
+        </p>
+    </div>
+</div>
+{% endspaceless %}
\ No newline at end of file