{% extends "base.html" %} {% load extra_tags %} {% load extra_filters %} {% load smart_if %} {% load humanize %} {% load i18n %} {% load cache %} {% block title %}{% spaceless %}{{ question.get_question_title }}{% endspaceless %}{% endblock %} {% block forejs %} {% if not question.closed %} {% endif %} {% endblock %} {% block content %}
{{ question.get_question_title }}
{% 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 %}
{{ question.html|safe }}
{% comment %}todo: here we have important case to reset search state{% endcomment %}
{% 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 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 %}
{% 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 %}
{% if question.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 %}

{% endif %} {% if answers %}
{% blocktrans count answers|length as counter %} One Answer: {% plural %} {{counter}} Answers: {% endblocktrans %}
{% cnprog_paginator context %} {% for answer in answers %}
{% trans
{{ answer.score }}
{% trans {% ifequal request.user question.author %} {% trans {% else %} {% if answer.accepted %} {% trans {% endif %} {% endifequal %}
{{ 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_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 %}
{% endfor %}
{% cnprog_paginator context %}
{% 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 %}
{% 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 %} {% cache 600 questions_tags 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 %} {% cache 1800 related_questions question.id %}

{% trans "Related questions" %}

{% endcache %} {% endblock %} {% block endjs %} {% endblock %}