X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/f72b9230d9bb36b1bd752df22ef9a25136b972d1..094acc5f44c3a7779f42b3d84c86213ba6a1003c:/forum/skins/default/templates/question.html diff --git a/forum/skins/default/templates/question.html b/forum/skins/default/templates/question.html index 47e654a..430a304 100644 --- a/forum/skins/default/templates/question.html +++ b/forum/skins/default/templates/question.html @@ -3,16 +3,18 @@ {% load node_tags %} {% load extra_tags %} {% load extra_filters %} +{% load general_sidebar_tags %} {% load smart_if %} {% load humanize %} {% load i18n %} {% load cache %} +{% block metadescription %}{{question.summary}}{% endblock %} +{% block metakeywords %}{{question.tagname_meta_generator}}{% endblock %} {% block title %}{% spaceless %}{{ question.headline }}{% endspaceless %}{% endblock %} {% block forejs %} - - - {% if not question.closed %} + + {% if not question.nis.closed %} @@ -22,7 +24,10 @@ $().ready(function(){ $("#nav_questions").attr('className',"on"); var answer_sort_tab = "{{ tab_id }}"; - $("#" + answer_sort_tab).attr('className',"on"); + + if (answer_sort_tab) { + $("#" + answer_sort_tab).attr('className',"on"); + } $('#editor').TextAreaResizer(); @@ -55,11 +60,11 @@ {% block content %}
- {{ question.headline }} +

{{ question.headline }}

- +
@@ -72,14 +77,15 @@
{{ question.html|safe }}
-
-
- {% for tag in question.tagname_list %} - - {% endfor %} -
+
+ {% for tag in question.tagname_list %} + + {% endfor %} +
+
{% post_controls question request.user %} + {% wiki_symbol request.user question %}
{% contributors_info question %} @@ -90,14 +96,12 @@
- {% if question.marked %} + {% if question.nis.closed %}

- {% blocktrans with question.closed.extra as close_reason %} - The question has been closed for the following reason "{{ close_reason }}" by - {% endblocktrans %} - {{ question.closed.by.username }} - {% diff_date question.closed.at %} + {% blocktrans with question.nstate.closed.extra as close_reason %}The question has been closed for the following reason "{{ close_reason }}" by{% endblocktrans %} + {{ question.nstate.closed.by.username }} + {% diff_date question.nstate.closed.at %}

{% endif %} @@ -106,26 +110,15 @@
- {% blocktrans count answers|length as counter %} - One Answer: - {% plural %} - {{counter}} Answers: - {% endblocktrans %} -
-
- {% trans "oldest answers" %} - {% trans "newest answers" %} - {% trans "popular answers" %} + {% blocktrans count answers.paginator.count as counter %}One Answer:{% plural %}{{counter}} Answers:{% endblocktrans %}
+ {{ answers.paginator.sort_tabs }}
- {% cnprog_paginator context %} + {{ answers.paginator.page_numbers }} - {% for answer in answers %} + {% for answer in answers.paginator.page %} -
+
@@ -141,6 +134,7 @@
{% post_controls answer request.user %} + {% wiki_symbol request.user answer %}
{% contributors_info answer %} @@ -153,7 +147,7 @@
{% endfor %}
- {% cnprog_paginator context %} + {{ answers.paginator.page_numbers }}
{% endif %}
@@ -172,17 +166,23 @@ {% endspaceless %} + {% comment %} {% if not request.user.is_authenticated %} -
{% trans "you can answer anonymously and then login" %}
+
{% trans "You can answer anonymously and then login." %}
{% else %}

{% ifequal request.user question.author %} - {% trans "answer your own question only to give an answer" %} + {% trans "Answer your own question only to give an answer." %} {% else %} - {% trans "please only give an answer, no discussions" %} + {% trans "Please only give an answer, no discussions." %} {% endifequal %} + {% if not request.user.email_valid_and_can_answer %} + {% blocktrans %}Remember, your answer will not be published until you validate your email.{% endblocktrans %} + {% trans "Send me a validation link." %} + {% endif %}

{% endif %} + {% endcomment %}
@@ -209,8 +209,8 @@
-
{{ answer.text.errors }} +

{% include "subscription_status.html" %}
+{% sidebar_upper %} {% cache 60 questions_tags settings.APP_URL question.id %}

{% trans "Question tags" %}:

- {% for tag in tags %} + {% for tag in question.tags.all %} ×{{ tag.used_count|intcomma }}
@@ -257,6 +258,7 @@

{% endcache %} +{% sidebar_lower %}

{% trans "Related questions" %}