]> git.openstreetmap.org Git - osqa.git/blobdiff - forum/skins/default/templates/question.html
Visual indication of community wiki, and made the markddown_help use base_content...
[osqa.git] / forum / skins / default / templates / question.html
index 47e654a68d70168209ba70fc75d7da6178f87c34..9a3384621d281d72f5f9f001a8737f3f507646f6 100644 (file)
@@ -3,6 +3,7 @@
 {% load node_tags %}\r
 {% load extra_tags %}\r
 {% load extra_filters %}\r
 {% load node_tags %}\r
 {% load extra_tags %}\r
 {% load extra_filters %}\r
+{% load general_sidebar_tags %}\r
 {% load smart_if %}\r
 {% load humanize %}\r
 {% load i18n %}\r
 {% load smart_if %}\r
 {% load humanize %}\r
 {% load i18n %}\r
         $().ready(function(){\r
             $("#nav_questions").attr('className',"on");\r
             var answer_sort_tab = "{{ tab_id }}";\r
         $().ready(function(){\r
             $("#nav_questions").attr('className',"on");\r
             var answer_sort_tab = "{{ tab_id }}";\r
-            $("#" + answer_sort_tab).attr('className',"on");\r
+\r
+            if (answer_sort_tab) {\r
+                $("#" + answer_sort_tab).attr('className',"on");\r
+            }\r
 \r
             $('#editor').TextAreaResizer();\r
             \r
 \r
             $('#editor').TextAreaResizer();\r
             \r
@@ -59,7 +63,7 @@
 </div>\r
 <div id="main-body" class="">\r
     <div id="askform">\r
 </div>\r
 <div id="main-body" class="">\r
     <div id="askform">\r
-            <table style="width:100%;" id="question-table" {% if question.deleted %}class="deleted"{%endif%}>\r
+            <table style="width:100%;" id="question-table" {% if question.nis.deleted %}class="deleted"{%endif%}>\r
                 <tr>\r
                     <td style="width:30px;vertical-align:top">\r
                         <div class="vote-buttons">\r
                 <tr>\r
                     <td style="width:30px;vertical-align:top">\r
                         <div class="vote-buttons">\r
                             <div class="question-body">\r
                                 {{ question.html|safe }}\r
                             </div>\r
                             <div class="question-body">\r
                                 {{ question.html|safe }}\r
                             </div>\r
-                            <div id="question-controls" class="post-controls">\r
-                                <div id="question-tags" class="tags">\r
-                                    {% for tag in question.tagname_list %}\r
-                                        <a href="{% url tag_questions tag|urlencode %}" class="post-tag"\r
-                                            title="{% blocktrans with tag as tagname %}see questions tagged '{{ tagname }}'{% endblocktrans %}" rel="tag">{{ tag }}</a>\r
-                                    {% endfor %}\r
-                                </div>\r
+                            <div id="question-tags" class="tags-container tags">\r
+                                {% for tag in question.tagname_list %}\r
+                                    <a href="{% url tag_questions tag|urlencode %}" class="post-tag"\r
+                                        title="{% blocktrans with tag as tagname %}see questions tagged '{{ tagname }}'{% endblocktrans %}" rel="tag">{{ tag }}</a>\r
+                                {% endfor %}\r
+                            </div>\r
+                            <div id="question-controls" class="post-controls">                            \r
                                 {% post_controls question request.user %}\r
                                 {% post_controls question request.user %}\r
+                                {% wiki_symbol request.user question %}\r
                             </div>\r
                             <div class="post-update-info-container">\r
                                     {% contributors_info question %}\r
                             </div>\r
                             <div class="post-update-info-container">\r
                                     {% contributors_info question %}\r
                     </td>\r
                 </tr>\r
             </table>\r
                     </td>\r
                 </tr>\r
             </table>\r
-            {% if question.marked %}\r
+            {% if question.nis.closed %}\r
             <div class="question-status" style="margin-bottom:15px">\r
             <h3>\r
             <div class="question-status" style="margin-bottom:15px">\r
             <h3>\r
-                {% blocktrans with question.closed.extra as close_reason %}\r
+                {% blocktrans with question.nstate.closed.extra as close_reason %}\r
                     The question has been closed for the following reason "{{ close_reason }}" by\r
                 {% endblocktrans %}\r
                     The question has been closed for the following reason "{{ close_reason }}" by\r
                 {% endblocktrans %}\r
-                <a href="{{ question.closed.by.get_profile_url }}">{{ question.closed.by.username }}</a>\r
-                 {% diff_date question.closed.at %}\r
+                <a href="{{ question.nstate.closed.by.get_profile_url }}">{{ question.nstate.closed.by.username }}</a>\r
+                 {% diff_date question.nstate.closed.at %}\r
             </h3>\r
             </div>\r
             {% endif %}\r
             </h3>\r
             </div>\r
             {% endif %}\r
   \r
                 {% for answer in answers %}\r
                     <a name="{{ answer.id }}"></a>\r
   \r
                 {% for answer in answers %}\r
                     <a name="{{ answer.id }}"></a>\r
-                    <div id="answer-container-{{ answer.id }}" class="answer {% if answer.accepted %}accepted-answer{% endif %} {% ifequal answer.author_id question.author_id %} answered-by-owner{% endifequal %} {% if answer.deleted %}deleted{% endif %}">\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
                             <tr>\r
                                 <td style="width:30px;vertical-align:top">\r
                         <table style="width:100%;">\r
                             <tr>\r
                                 <td style="width:30px;vertical-align:top">\r
                         \r
                         </table>  \r
                     </div>\r
                         \r
                         </table>  \r
                     </div>\r
-                    <div id="previewer" class="wmd-preview"></div>\r
                     {{ answer.text.errors }}\r
                     {{ answer.text.errors }}\r
+                    <div id="previewer" class="wmd-preview"></div>                    \r
                 </div>\r
                 <p><span class="form-error"></span></p>\r
                 <input type="submit" \r
                 </div>\r
                 <p><span class="form-error"></span></p>\r
                 <input type="submit" \r
 <div class="boxC" id="subscription_box">\r
     {% include "subscription_status.html" %}\r
 </div>\r
 <div class="boxC" id="subscription_box">\r
     {% include "subscription_status.html" %}\r
 </div>\r
+{% sidebar_upper %}\r
 {% cache 60 questions_tags settings.APP_URL question.id %}\r
 <div class="boxC">\r
     <p>\r
                {% trans "Question tags" %}:\r
     </p>\r
     <p class="tags" >\r
 {% cache 60 questions_tags settings.APP_URL question.id %}\r
 <div class="boxC">\r
     <p>\r
                {% trans "Question tags" %}:\r
     </p>\r
     <p class="tags" >\r
-        {% for tag in tags %}\r
+        {% for tag in question.tags.all %}\r
                <a href="{% url tag_questions tag.name|urlencode %}" \r
                        title="{% trans "see questions tagged"%}'{{tag.name}}'{% trans "using tags" %}" \r
                        rel="tag">{{ tag.name }}</a> <span class="tag-number">&#215;{{ tag.used_count|intcomma }}</span><br/>\r
                <a href="{% url tag_questions tag.name|urlencode %}" \r
                        title="{% trans "see questions tagged"%}'{{tag.name}}'{% trans "using tags" %}" \r
                        rel="tag">{{ tag.name }}</a> <span class="tag-number">&#215;{{ tag.used_count|intcomma }}</span><br/>\r
     </p>\r
 </div>\r
 {% endcache %}\r
     </p>\r
 </div>\r
 {% endcache %}\r
+{% sidebar_lower %}\r
 <div class="boxC">\r
     <h3 class="subtitle">{% trans "Related questions" %}</h3>\r
     <div class="questions-related">\r
 <div class="boxC">\r
     <h3 class="subtitle">{% trans "Related questions" %}</h3>\r
     <div class="questions-related">\r