{% extends "base.html" %} {% block title %}Ticket #{{ ticket.id }}{% endblock %} {% block extra_css %} {% endblock %} {% block content %}
All Tickets
{# ── Left column: original message + replies ── #}
{# Original ticket card #}
Ticket #{{ ticket.id }}: {{ ticket.subject }} {% set status_class = {'open': 'danger', 'answered': 'success', 'closed': 'secondary'} %} {{ ticket.status | capitalize }}
{{ ticket.customer.display_name if ticket.customer else 'Unknown' }} {% if ticket.facility %}  · {{ ticket.facility.name }} {% endif %}  ·  {{ ticket.created_at.strftime('%b %d, %Y %I:%M %p') }}

{{ ticket.body }}

{# Reply thread #} {% if replies %}
Replies
{% for reply in replies %}
{{ reply.author.display_name if reply.author else 'Support Team' }}  · {{ reply.created_at.strftime('%b %d, %Y %I:%M %p') }}
{{ reply.body }}
{% endfor %}
{% endif %} {# Add reply form #} {% if ticket.status != 'closed' %}
Add Reply
The customer will be notified by email.
{% else %}
This ticket is closed. Change the status to re-open it.
{% endif %}
{# ── Right column: status management ── #}
Ticket Status

Current status:

{{ ticket.status | capitalize }}

{% if ticket.status != 'open' %} {% endif %} {% if ticket.status != 'answered' %} {% endif %} {% if ticket.status != 'closed' %} {% endif %}
{# Customer info card #} {% if ticket.customer %}
Customer

{{ ticket.customer.display_name }}

{{ ticket.customer.email }}

{% if ticket.facility %}

{{ ticket.facility.name }}

{% if ticket.facility.address %}

{{ ticket.facility.address }}

{% endif %} {% endif %}
{% endif %}
{% endblock %}