{% from 'flagit/includes/macros.html' import date_by_user with context %} {% set question_model = object.content_type.model == 'question' %} {% set answer_model = object.content_type.model == 'answer' %}
{% if object.content_object.title %}

{{ _('Title:') }}

{{ object.content_object.title }}

{% endif %}

{{ _('Content:') }}

{{ object.content_object.content_parsed }}

{{ _('Created:') }}

{{ date_by_user(object.content_object.created, object.content_object.creator) }}

{% if object.content_object.updated_by %}

{{ _('Updated:') }}

{{ date_by_user(object.content_object.updated, object.content_object.updated_by) }}

{% endif %}

{{ _('Flagged:') }}

{{ date_by_user(object.created, object.creator) }}

{% if object.reason == 'content_moderation' and question_model and user.has_perm('questions.change_question') %}

{{ _('Take Action:') }}

{{ object.content_object.topic }}

{% csrf_token %}
{% endif %}
{{ _('View') }} {% if question_model %} {{ _('Edit') }} {% set delete_url = url('questions.delete', object.content_object.id) %} {% elif answer_model %} {% set delete_url = url('questions.delete_answer', object.content_object.question.id, object.content_object.id) %} {% if user.has_perm('questions.change_answer') %} {{ _('Edit') }} {% endif %} {% endif %} {% if user.has_perm('questions.delete_question') %} {{ _('Delete') }} {% endif %}