]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/templates/question.html
Adds feeds for answers or comments to questions.
[osqa.git] / forum / skins / default / templates / question.html
index 20fdf1c313ab0f5d279cdfdadd2f6d2b89edfb97..4d5ff090009aa196a96087b217d76ed45a975e27 100644 (file)
@@ -13,6 +13,7 @@
 {% block title %}{% spaceless %}{{ question.headline }}{% endspaceless %}{% endblock %}\r
 {% block forejs %}\r
         <link rel="canonical" href="{{settings.APP_URL}}{{question.get_absolute_url}}" />\r
+        <link rel="alternate" type="application/rss+xml" title="RSS" href="{{ question.get_absolute_url }}?type=rss">\r
         {% if not question.nis.closed %}\r
         <script type='text/javascript' src='{% media  "/media/js/wmd/showdown.js" %}'></script>\r
         <script type='text/javascript' src='{% media  "/media/js/wmd/wmd.js" %}'></script>\r
                 <div class="tabBar">\r
                     <a name="sort-top"></a>\r
                     <div class="headQuestions">\r
-                    {% blocktrans count answers|length as counter %}\r
+                    {% blocktrans count answers.paginator.count as counter %}\r
                     One Answer:\r
                     {% plural %}\r
                     {{counter}} Answers:\r
                     {% endblocktrans %}\r
                     </div>\r
-                    <div class="tabsA">\r
-                         <a id="oldest" href="{{ question.get_absolute_url }}?sort=oldest#sort-top"\r
-                            title="{% trans "oldest answers will be shown first" %}">{% trans "oldest answers" %}</a>\r
-                        <a id="latest" href="{{ question.get_absolute_url }}?sort=latest#sort-top"\r
-                            title="{% trans "newest answers will be shown first" %}">{% trans "newest answers" %}</a>\r
-                        <a id="votes" href="{{ question.get_absolute_url }}?sort=votes#sort-top" \r
-                            title="{% trans "most voted answers will be shown first" %}">{% trans "popular answers" %}</a>   \r
-                    </div>\r
+                    {{ answers.paginator.sort_tabs }}\r
                 </div>\r
-                {% cnprog_paginator context %}\r
+                {{ answers.paginator.page_numbers }}\r
   \r
-                {% for answer in answers %}\r
+                {% for answer in answers.paginator.page %}\r
                     <a name="{{ answer.id }}"></a>\r
                     <div id="answer-container-{{ answer.id }}" class="answer {% if answer.nis.accepted %}accepted-answer{% endif %} {% ifequal answer.author_id question.author_id %} answered-by-owner{% endifequal %} {% if answer.nis.deleted %}deleted{% endif %}">\r
                         <table style="width:100%;">\r
                     </div>\r
                 {% endfor %}\r
                 <div class="paginator-container-left">\r
-                    {% cnprog_paginator context %}\r
+                    {{ answers.paginator.page_numbers }}\r
                 </div>\r
             {% endif %}\r
         <form id="fmanswer" action="{% url answer question.id %}" method="post">\r