{% extends 'baseadmin.html.twig' %} {% import "_modules/bsmacros.html.twig" as bs %} {% block title %} {{ parent() }} - Support Tickets {% endblock %} {% block breadcrumb %} {{ parent() }} {% endblock %} {% block content %} {% for label, messages in app.flashes %} {% for message in messages %} {{ bs.alert(message, label) }} {% endfor %} {% endfor %}
Support Tickets
{% if tickets|length > 0 %}
{% for ticket in tickets %} {% endfor %}
ID Subject Status Priority Created Assigned To Actions
#{{ ticket.id }} {{ ticket.subject }} {% set status_class = { 'open': 'primary', 'in_progress': 'info', 'resolved': 'success', 'closed': 'secondary' } %} {{ bs.badge(ticket.status|capitalize, status_class[ticket.status]) }} {% set priority_class = { 'low': 'success', 'medium': 'info', 'high': 'warning', 'critical': 'danger' } %} {{ bs.badge(ticket.priority|capitalize, priority_class[ticket.priority]) }} {{ ticket.createdAt|date('Y-m-d H:i') }} {% if ticket.assignedTo %} {{ ticket.assignedTo.username }} {% else %} Unassigned {% endif %}
{% if app.user.isAdmin() or app.user == ticket.createdBy %} {% endif %}
{% else %}
There are no tickets. {# Create your first ticket. #}
{% endif %}
{% endblock %} {% block scripts %} {{ parent() }} {% endblock %}