X-Git-Url: https://git.openstreetmap.org/osqa.git/blobdiff_plain/6b9b8579ab09beb19c0956bcd3938047c900bd61..48da83177329ce1b7d3dfcfc83600e067120c7e2:/forum/skins/default/templates/question.html diff --git a/forum/skins/default/templates/question.html b/forum/skins/default/templates/question.html index fceff20..8757469 100644 --- a/forum/skins/default/templates/question.html +++ b/forum/skins/default/templates/question.html @@ -1,280 +1,331 @@ -{% extends "base.html" %} - -{% load node_tags %} -{% load extra_tags %} -{% load extra_filters %} -{% load smart_if %} -{% load humanize %} -{% load i18n %} -{% load cache %} -{% block title %}{% spaceless %}{{ question.headline }}{% endspaceless %}{% endblock %} -{% block forejs %} - - - - {% if not question.closed %} - - - - {% endif %} - - - -{% endblock %} - -{% block content %} -
- {{ question.headline }} -
-
-
- - - - - -
-
- {% vote_buttons question request.user %} - {% favorite_mark question request.user %} -
-
-
-
- {{ question.html|safe }} -
-
-
- {% for tag in question.tagname_list %} - - {% endfor %} -
- {% post_controls question request.user %} -
-
- {% contributors_info question %} -
- {% comments question request.user %} -
- -
- {% if question.marked %} -
-

- {% 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 %} -

-
- {% endif %} - {% if answers %} -
-
- -
- {% blocktrans count answers|length as counter %} - One Answer: - {% plural %} - {{counter}} Answers: - {% endblocktrans %} -
- -
- {% cnprog_paginator context %} - - {% for answer in answers %} - -
- - - - - -
-
- {% vote_buttons answer request.user %} - {% accept_button answer request.user %} -
-
-
-
- {{ answer.html|safe }} -
-
- {% post_controls answer request.user %} -
-
- {% contributors_info answer %} -
- {% comments answer request.user %} -
-
-
- {% endfor %} -
- {% cnprog_paginator context %} -
- {% endif %} -
-
-
- - {% if not question.closed %} -
- {% spaceless %} -
- {% if answers %} - {% trans "Your answer" %} - {% else %} - {% trans "Be the first one to answer this question!" %} - {% endif %} -
- {% endspaceless %} -
- {% if not request.user.is_authenticated %} -
{% trans "you can answer anonymously and then login" %}
- {% else %} -

- {% ifequal request.user question.author %} - {% trans "answer your own question only to give an answer" %} - {% else %} - {% trans "please only give an answer, no discussions" %} - {% endifequal %} -

- {% endif %} - -
-
- {{ answer.text }} -
- - - - {% if settings.WIKI_ON %} - - {% endif %} - - -
- - {% trans "toggle preview" %} - - - {{ answer.wiki }} - - {{ answer.wiki.label_tag }} - -
-
-
- {{ answer.text.errors }} -
-

- - {% endif %} -
-
-
-{% endblock %} - -{% block sidebar %} -
- {% include "subscription_status.html" %} -
-{% cache 60 questions_tags settings.APP_URL question.id %} -
-

- {% trans "Question tags" %}: -

-

- {% for tag in tags %} - ×{{ tag.used_count|intcomma }}
- {% endfor %} -

-

- {% trans "question asked" %}: {% diff_date question.added_at %} -

-

- {% trans "question was seen" %}: {{ question.view_count|intcomma }} {% trans "times" %} -

-

- {% trans "last updated" %}: {% diff_date question.last_activity_at %} -

-
-{% endcache %} -
-

{% trans "Related questions" %}

- -
- -{% endblock %} - -{% block endjs %} -{% endblock %} - +{% extends "base.html" %} + +{% 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.meta_description }}{% endblock %} +{% block metakeywords %}{{question.tagname_meta_generator}}{% endblock %} +{% block meta %} + + +{% endblock %} +{% block title %}{% spaceless %}{{ question.headline }}{% endspaceless %}{% endblock %} +{% block forejs %} + {% if not question.nis.closed %} + + + + + + + + {% if embed_youtube_videos %} + + + + {% endif %} + {% endif %} + + + +{% endblock %} + +{% block content %} +
+

{{ question.headline }}

+
+
+
+ + + + + +
+
+ {% vote_buttons question request.user %} + {% favorite_mark question request.user %} +
+
+
+
+ {{ question.html|safe }} +
+
+ {% for tag in question.tagname_list %} + + {% endfor %} +
+
+ {% post_controls question request.user %} + {% wiki_symbol request.user question %} +
+
+ {% contributors_info question %} +
+ {% comments question request.user %} +
+ +
+ {% if question.nis.closed %} +
+

+ {% 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 %} + {% if answers %} +
+
+ +
+ {% blocktrans count answers.paginator.count as counter %}One Answer:{% plural %}{{counter}} Answers:{% endblocktrans %} +
+ {{ answers.paginator.sort_tabs }} +
+ {{ answers.paginator.page_numbers }} + + {% for answer in answers.paginator.page %} + +
+ + + + + +
+
+ {% vote_buttons answer request.user %} + {% accept_button answer request.user %} +
+
+
+
+ {{ answer.html|safe }} +
+
+ {% post_controls answer request.user %} + {% wiki_symbol request.user answer %} +
+
+ {% contributors_info answer %} +
+ {% comments answer request.user %} +
+
+
+ {% endfor %} +
+ {{ answers.paginator.page_numbers }} +
+ {% endif %} +
+ {% csrf_token %} +
+
+ + {% if not question.closed %} +
+ {% spaceless %} +
+ {% if answers %} + {% trans "Your answer" %} + {% else %} + {% trans "Be the first one to answer this question!" %} + {% endif %} +
+ {% endspaceless %} +
+ {% comment %} + {% if not request.user.is_authenticated %} +
{% trans "You can answer anonymously and then login." %}
+ {% else %} +

+ {% ifequal request.user question.author %} + {% trans "Answer your own question only to give an answer." %} + {% else %} + {% 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 %} + +
+
+ {{ answer.text }} +
+ + + + + {% if settings.WIKI_ON %} + + {% endif %} + + +
+ + {% trans "toggle preview" %} + + + {{ answer.wiki }} + + {{ answer.wiki.label_tag }} + +
+
+ {{ answer.text.errors }} +
+
+ + {% if answer.recaptcha %} +
+ {{ answer.recaptcha.errors }} + {{ answer.recaptcha }} +
+
+ {% endif %} + +

+ + {% endif %} +
+
+
+{% endblock %} + +{% block sidebar %} +
+ {% include "subscription_status.html" %} +
+ +{% markdown_help %} + +{% sidebar_upper %} + +{% cache 60 questions_tags settings.APP_URL question.id %} +
+

+ {% trans "Question tags" %}: +

+

+ {% for tag in question.tags.all %} + ×{{ tag.used_count|intcomma }}
+ {% endfor %} +

+

+ {% trans "question asked" %}: {% diff_date question.added_at %} +

+

+ {% trans "question was seen" %}: {{ question.view_count|intcomma }} {% trans "times" %} +

+

+ {% trans "last updated" %}: {% diff_date question.last_activity_at %} +

+
+{% endcache %} +{% sidebar_lower %} +
+

{% trans "Related questions" %}

+ +
+ +{% endblock %} + +{% block endjs %} +{% endblock %} +