X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/a9eef437702d5df7a2f97010e6798c689371808c..b97ddb66b6ffc6b7897ae6eb8b82409d66c89827:/forum/skins/default/templates/question.html diff --git a/forum/skins/default/templates/question.html b/forum/skins/default/templates/question.html index 23c2411..81711e0 100644 --- a/forum/skins/default/templates/question.html +++ b/forum/skins/default/templates/question.html @@ -1,46 +1,36 @@ {% extends "base.html" %} +{% load node_tags %} {% load extra_tags %} {% load extra_filters %} +{% load general_sidebar_tags %} {% load smart_if %} {% load humanize %} {% load i18n %} -{% block title %}{% spaceless %}{{ question.get_question_title }}{% endspaceless %}{% endblock %} +{% 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 %} {% endif %} - - + {% endblock %} {% block content %}
- {{ question.get_question_title }} +

{{ question.headline }}

- +
- {% if question_vote %} - {% trans -
- {{ question.score }} -
- {% trans - - {% else %} - {% trans -
- {{ question.score }} -
- {% trans - {% endif %} - {% if favorited %} - {% trans -
- {{ question.favourite_count }} -
- {% else %} - {% trans -
- {% ifnotequal question.favourite_count 0 %}{{ question.favourite_count }}{% endifnotequal %} -
- {% endif %} - + {% vote_buttons question request.user %} + {% favorite_mark question request.user %}
@@ -126,97 +76,34 @@
{{ question.html|safe }}
-
-
- {% for tag in question.tagname_list %} - - {% endfor %} -
- {% joinitems using '|' %} - {% if request.user|can_edit_post:question %} - {% trans 'edit' %} - {% endif %} - {% separator %} - {% if question.closed %} - {% if request.user|can_reopen_question:question %} - {% trans "reopen" %} - {% endif %} - {% else %} - {% if request.user|can_close_question:question %} - {% trans "close" %} - {% endif %} - {% endif %} - {% separator %} - {% if request.user|can_flag_offensive %} - - {% trans "flag offensive" %} - {% if request.user|can_view_offensive_flags and question.offensive_flag_count %} - ({{ question.offensive_flag_count }}) - {% endif %} - - {% endif %} - {% separator %} - {% if request.user|can_delete_post:question %} - {% trans "delete" %} - {% endif %} - {% endjoinitems %} -
-
- {% post_contributor_info question "original_author" %} - {% post_contributor_info question "last_updater" %} +
+ {% for tag in question.tagname_list %} + + {% endfor %}
-
- {% for comment in question.get_comments|slice:":5" %} -

- {{comment.comment}} - - {{comment.user}} - {% spaceless %} - ({% diff_date comment.added_at %}) - {% if request.user|can_delete_comment:comment %} - - {% endif %} - {% endspaceless %} -

- {% endfor %} +
+ {% post_controls question request.user %} + {% wiki_symbol request.user question %}
-
- - {% if request.user|can_add_comments:question or question.comment_count > 5 %} - - {% if request.user|can_add_comments:question %} - {% trans "add comment" %} - {% endif %} - {% if question.comment_count > 5 %} - {% if request.user|can_add_comments:question %}/ - {% blocktrans count question.get_comments|slice:"5:"|length as counter %} - see one more - {% plural %} - see {{counter}} more - {% endblocktrans %} - {% else %} - {% blocktrans count question.get_comments|slice:"5:"|length as counter %} - see one more comment - {% plural %} - see {{counter}} more comments - {% endblocktrans %} - {% endif %} - {% endif %} - {% endif %} +
+ {% contributors_info question %}
+ {% comments question request.user %}
- {% if question.closed %} + {% if question.nis.closed %}
-

{% blocktrans with question.get_close_reason_display as close_reason %}The question has been closed for the following reason "{{ close_reason }}" by{% endblocktrans %} - {{ question.closed_by.username }} - {% blocktrans with question.closed_at as closed_at %}close date {{closed_at}}{% endblocktrans %}

+

+ {% 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 %} @@ -231,11 +118,11 @@ {% endblocktrans %}
- {% trans "oldest answers" %} - {% trans "newest answers" %} - {% trans "popular answers" %}
@@ -243,36 +130,13 @@ {% for answer in answers %} -
+
- {% trans -
- {{ answer.score }} -
- {% trans - - {% ifequal request.user question.author %} - {% trans - {% else %} - {% if answer.accepted %} - {% trans - {% endif %} - {% endifequal %} + {% vote_buttons answer request.user %} + {% accept_button answer request.user %}
@@ -281,83 +145,14 @@ {{ answer.html|safe }}
- {% joinitems using '|' %} - - - {% trans "permanent link" %} - - - {% separator %} - {% if request.user|can_edit_post:answer %} - {% trans 'edit' %} - {% endif %} - {% separator %} - {% if request.user|can_flag_offensive %} - - {% trans "flag offensive" %} - {% if request.user|can_view_offensive_flags and answer.offensive_flag_count %} - ({{ answer.offensive_flag_count }}) - {% endif %} - - {% endif %} - {% separator %} - {% if request.user|can_delete_post:answer %} - {% spaceless %} - - - {% if answer.deleted %}{% trans "undelete" %}{% else %}{% trans "delete" %}{% endif %} - - {% endspaceless %} - {% endif %} - {% endjoinitems %} + {% post_controls answer request.user %} + {% wiki_symbol request.user answer %}
- {% post_contributor_info answer "original_author" %} - {% post_contributor_info answer "last_updater" %} -
-
- {% for comment in answer.get_comments|slice:":5" %} -

- {{comment.comment}} - - {{comment.user}} - {% spaceless %} - ({% diff_date comment.added_at %}) - {% if request.user|can_delete_comment:comment %} - - {% endif %} - {% endspaceless %} -

- {% endfor %} -
-
- - {% if request.user|can_add_comments:answer or answer.comment_count > 5 %} - - {% if request.user|can_add_comments:answer %} - {% trans "add comment" %} - {% endif %} - {% if answer.comment_count > 5 %} - {% if request.user|can_add_comments:answer %}/ - {% blocktrans count answer.get_comments|slice:"5:"|length as counter %} - see one more - {% plural %} - see {{counter}} more - {% endblocktrans %} - {% else %} - {% blocktrans count answer.get_comments|slice:"5:"|length as counter %} - see one more comment - {% plural %} - see {{counter}} more comments - {% endblocktrans %} - {% endif %} - {% endif %} - {% endif %} + {% contributors_info answer %}
+ {% comments answer request.user %} -
@@ -368,32 +163,6 @@
{% endif %}
- {% if request.user.is_authenticated %} -

- {{ answer.email_notify }} - - {% blocktrans with request.user.get_profile_url as profile_url %} - You can always adjust frequency of email updates from your {{profile_url}} - {% endblocktrans %} -

- {% else %} -

- - -

- {% endif %}
@@ -446,8 +215,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 }}
@@ -489,15 +263,18 @@ {% trans "last updated" %}: {% diff_date question.last_activity_at %}

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

{% trans "Related questions" %}