{% extends "cms/base.html" %} {% block title %}Tickets{% endblock %} {% block page_title %}Support Tickets{% endblock %} {% block extra_head %} {% endblock %} {% block cms_content %}

{% if show_archive %} Tickets / Archive ({{ closed_ticket_count }}) {% else %} Tickets ({{ total_count }}) {% endif %}

{% if not show_archive %}
{% if active_status %}{% endif %} {% if search %}✕{% endif %}
Archive {% if closed_ticket_count %}{{ closed_ticket_count }}{% endif %} {% else %} {% if closed_ticket_count %}
{% csrf_token %}
{% endif %} Back {% endif %}
{% if not show_archive %}
Filter by Status
All {{ total_count }} {% for val, label, cnt in statuses_with_counts %} {{ label }} {{ cnt }} {% endfor %}
{% endif %}
{% if tickets %} {% for ticket in tickets %} {% endfor %}
# From Subject Status Priority Date Actions
{{ ticket.ticket_number|slice:"3:" }} {{ ticket.sender_name }} {{ ticket.subject|truncatechars:70 }} {% if ticket.auction_listing %}
{{ ticket.auction_listing.name }}
{% endif %}
{% if ticket.sender_email|lower in blocked_emails %} Blocked {% else %} {{ ticket.get_status_display }} {% endif %} {% if ticket.priority == 'urgent' %}Urgent {% elif ticket.priority == 'high' %}High {% elif ticket.priority == 'medium' %}Medium {% else %}Low{% endif %} {{ ticket.created_at|date:"d M Y" }} {% if show_archive %} {% if ticket.sender_email|lower not in blocked_emails %}
{% csrf_token %}
{% endif %} {% else %}
{% csrf_token %}
{% endif %} {% if ticket.sender_email|lower in blocked_emails %}
{% csrf_token %}
{% else %}
{% csrf_token %}
{% endif %}
{% else %}

{% if search or active_status %}No tickets match your filters.{% else %}No tickets yet.{% endif %}

{% endif %} {% if tickets.has_other_pages %}
Page {{ tickets.number }} of {{ tickets.paginator.num_pages }} — {{ tickets.paginator.count }} tickets
{% if tickets.has_previous %} {% endif %} {% for num in tickets.paginator.page_range %} {% if num == tickets.number %} {{ num }} {% elif num >= tickets.number|add:'-2' and num <= tickets.number|add:'2' %} {{ num }} {% endif %} {% endfor %} {% if tickets.has_next %} {% endif %}
{% endif %}
{% endblock %} {% block extra_js %} {% endblock %}