{% extends "questions/base.html" %} {% from "layout/errorlist.html" import errorlist %} {% from "upload/attachments.html" import attachments_form, attachment %} {% from "includes/common_macros.html" import scam_banner, content_editor with context %} {% from "wiki/includes/flag_form.html" import flag_form with context %} {% from "questions/includes/questions.html" import troubleshooting_info %} {% from "questions/includes/macros.html" import mark_spam_form, unmark_spam_form with context %} {% from "questions/includes/aaq_macros.html" import progress_bar, aaq_widget %} {% from "karma/includes/karma_macros.html" import titles %} {% from "users/includes/macros.html" import user_labels %} {% set classes = 'answers' %} {% set product_title = pgettext('DB: products.Product.title', product.title) if product else _('All Products') %} {% set logo = pgettext('DB: products.Product.image_alternate_url', product.image_alternate_url) if product else _('no product specified') %} {# L10n: {q} is the title of the question. #} {% set title = _('{q} | {product} Support Forum')|f(q=question.title, product=product_title) %} {% set crumbs = [(url('questions.home'), _('Support Forums')), (url('questions.list', question.product_slug), product_title), (None, question.title)] %} {% set canonical_url = canonicalize(model_url=question.get_absolute_url()) %} {% if answers.number > 1 %} {% set canonical_url = canonical_url|urlparams(page=answers.number) %} {% endif %} {% if robots_noindex %} {% set meta = (('robots', 'noindex'),) %} {% endif %} {% set ga_content_group = "support-forum-question-details" %} {% if product %} {% set ga_products = "/" + product.slug + "/" %} {% endif %} {% if topic %} {% set ga_topics = "/" + topic.slug + "/" %} {% endif %} {% block breadcrumbs %} {% if aaq_final_step %} {{ progress_bar(4) }} {% endif %} {{ super() }} {% endblock %} {% block above_main %} {% if question.is_taken and question.taken_by != request.user %}
{{ _('{user} is currently working on this problem.')|f(user=question.taken_by) }} {{ _('Post a reply') }} | {{ _('View other questions that need attention.') }}
{% endif %} {% endblock %} {% block content %} {{ scam_banner() }}
{% if question.is_locked or question.is_archived %}

{% if question.is_locked and not question.is_archived %} {{ _('This thread was closed.') }} {% elif not question.is_locked and question.is_archived %} {{ _('This thread was archived.') }} {% else %} {{ _('This thread was closed and archived.') }} {% endif %} {{ _('Please ask a new question if you need help.') }}

{% endif %} {% if product %} {% endif %}

{{ question.title }}

    {# L10n: {n} is the number of replies. #} {% if question.num_answers > 0 %}
  • {{ question.num_answers }} {% trans count=question.num_answers %} reply {% pluralize %} replies {% endtrans %}
  • {% else %}
  • {{ _('No replies') }}
  • {% endif %}
  • {{ question.num_votes }} {% trans count=question.num_votes %} has this problem {% pluralize %} have this problem {% endtrans %}
  • {% if question.num_visits %}
  • {{ question.num_visits }} {% trans count=question.num_visits %}view{% pluralize %}views{% endtrans %}
  • {% endif %} {% if question.last_answer %}
  • {{ _('Last reply by') }} {{ display_name(question.last_answer.creator) }}
  • {% endif %}
{% if question.last_answer %}

{% endif %} {% if question.is_spam %}

{% if question.marked_as_spam_by %} {% trans marked_by=question.marked_as_spam_by, marked_time=question.marked_as_spam %} Marked as spam by {{ marked_by }} at {{ marked_time }} {% endtrans %} {% else %} {% trans marked_time=question.marked_as_spam %} Marked as spam at {{ marked_time }} {% endtrans %} {% endif %}

{% endif %}
{{ _('more options') }}
    {% if user.is_authenticated and question.allows_flag(user) %}
  • {{ flag_form(url('questions.flag', question.id), question.id, content_moderation=True) }}
  • {% endif %}
  • {{ _('Quote') }}
{{ question.content_parsed|safe }}
{# Note: this is not vulnerable to injection because Jinja autoescapes the strings. #}
{{ question.content }}
{% if question_images %}
{{ _('Attached screenshots') }}
{% for image in question_images %} {{ attachment(image, user, False) }} {% endfor %}
{% endif %} {% if question.updated_by %}

{{ _('Modified {datetime} by {name}')|fe(name=display_name(question.updated_by), datetime=datetimeformat(question.updated, format='longdatetime')) }}

{% endif %} {% if question.solution %} {% set solver = question.solver %}

{{ _('Chosen solution') }}

{{ question.solution.content_parsed|safe }} {{ _('Read this answer in context') }} 👍 {{ question.solution.num_helpful_votes }}
{% endif %}
{% if question.editable %}
{% if not question.has_voted(request) %}
{% csrf_token %}
{% endif %}
{% endif %}
{% if answers.object_list %}

{{ _('All Replies')}} ({{ answers.object_list|length }})

{% set helpful_replies = question.helpful_replies %} {% for answer in answers.object_list %} {% include "questions/includes/answer.html" %} {% endfor %} {{ answers|paginator }} {% endif %}
{% if request.limited %}
{% trans url=url('forums.threads', 'contributors') %} In order to prevent spam, we are limiting the number of answers that can be posted within a short period of time. If you want to post more please create a post on the contributors forum requesting that you be white-listed. {% endtrans %}
{% endif %} {% if question.allows_new_answer(user) %}

{{ _('Post a Reply') }}

{% csrf_token %} {{ errorlist(form) }}
{{ content_editor(form.content) }} {% if question.needs_info %}
{% else %}
{% endif %}
{{ attachments_form('auth.User', user.pk, images, settings, user) }}
{% elif question.editable and not user.is_authenticated %}
{% set ask_url = url('questions.aaq_step1') %} {% if answers.object_list and not question.has_voted(request) %} {# Only show the button again if there are answers in between #}
{{ _('Ask a question') }}
{% csrf_token %}
{% endif %}

{{ _('You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.')|fe(login_url=url('users.auth'), ask_url=ask_url) }}

{% endif %}
{% if answer_preview %} {% include "questions/includes/answer_preview.html" %} {% endif %}
{% endblock content %} {% block side %}
{{ search_box(settings, id='support-search-sidebar', params=search_params, placeholder=_('Search Support')) }}
{{ aaq_widget(request) }}
{% endblock side %}