{% extends 'dg_core/base.html' %} {% load humanize i18n static tz dg_board dg_core %} {% block title %}{{ ticket.key }} {{ ticket.title }}{% endblock %} {% block extra_head %} {% include 'dg_board/_assets.html' %} {% include 'dg_board/_editor_assets.html' %} {% endblock %} {% block content %} {% timezone display_timezone %}
{# Title and description are edited in place. A save goes in the background and replaces only its own block, from the page the view redirects to, so an editor open in the other one keeps its text. #}

{{ ticket.title }}

{% csrf_token %} {% form_errors title_form %} {{ title_form.original }} {{ title_form.title }}
{% if ticket.is_blocked %}
{% translate "Blocked" %}{% if block_reason %} {% blocktranslate with person=block_reason.author|person %}by {{ person }}{% endblocktranslate %}, {{ block_reason.created_at|naturaltime }}{% endif %} {% if block_reason.body %}
{{ block_reason.body|render_markdown }}
{% endif %}
{% endif %} {% for blocker in open_blockers %}
{% translate "Blocked by" %} {{ blocker.key }} {{ blocker.title }}
{% endfor %}
{% if ticket.description %}{{ ticket.description|render_markdown }}{% else %}

{% translate "No description yet." %}

{% endif %}
{% csrf_token %} {% form_errors description_form %} {{ description_form.original }} {{ description_form.description }}

{% translate "Relations" %}

{% if done_relations %} {% endif %}
{% if relations %}
{# One tbody per kind of relation, so a heading hides along with its last open ticket. #} {% regroup relations by kind as kinds %} {% for kind in kinds %} {% for item in kind.list %} {% with other=item.other %} {# Status, group and assignee save straight to the related ticket, like the sidebar. #} {% endwith %} {% endfor %} {% endfor %}
{{ kind.grouper|capfirst }} {% if kind.list.0.is_child %} {% translate "Open on board" %}{% endif %}
{{ other.key }} {{ other.title }} {% if other.is_blocked %} {% translate "Blocked" %}{% elif other.has_open_blocker %} {% translate "Blocked" %}{% endif %}
{% avatar other.creator 'xs' %} {{ other.created_at|date:'j M Y' }}
{% csrf_token %}
{% else %}

{% translate "No relations." %}

{% endif %}
{% csrf_token %} {{ child_form.title }}
{% for error in child_form.title.errors %}
{{ error }}
{% endfor %}
{% translate "Add relation" %}
{% csrf_token %} {% form_errors relation_form fields=True %}
{{ relation_form.kind }}

{% translate "Activity" %}

{% blocktranslate with zone=display_timezone %}Hover a time for the exact time ({{ zone }}){% endblocktranslate %}
{# Newest first, so the box to write the next comment comes first too. #}
{% avatar request.user 'sm' %}
{% csrf_token %} {% form_errors comment_form %} {% field comment_form.body label=False help_text=False %}
{% for entry in feed %} {% if entry.comment %} {% with comment=entry.comment %}
{% avatar comment.author 'sm' %}
{{ comment.author|person }}{% if comment.via %}{{ comment.via }}{% endif %} {% if comment.sets_blocked is True %} {% translate "blocked the ticket" %}{% elif comment.sets_blocked is False %} {% translate "unblocked the ticket" %}{% endif %} {{ comment.created_at|naturaltime }}{% if comment.edited %}· {% translate "edited" %}{% endif %}
{% if comment.body %}
{{ comment.body|render_markdown }}
{% endif %}
{% translate "Reply" %}
{% csrf_token %}
{% if comment.author == request.user %}{% include 'dg_board/_comment_edit.html' %}{% endif %}
{% for reply in comment.replies.all %}
{% avatar reply.author 'xs' %}
{{ reply.author|person }}{% if reply.via %} {{ reply.via }}{% endif %} {{ reply.created_at|naturaltime }}{% if reply.edited %} · {% translate "edited" %}{% endif %}
{{ reply.body|render_markdown }}
{% if reply.author == request.user %}{% include 'dg_board/_comment_edit.html' with comment=reply %}{% endif %}
{% endfor %}
{% endwith %} {% else %}
{{ entry.user|person:entry.fallback }} {{ entry.lines|join:'; ' }}{% if entry.via %} {{ entry.via }}{% endif %} · {{ entry.when|naturaltime }}
{% endif %} {% endfor %}
{% endtimezone %} {% endblock %} {% block extra_scripts %} {% endblock %}