{% extends 'app/base.html' %}
{% block body %}
{% for tickets in ticket_type%}
{% if tickets.status == "Opened" %}
<table class="table table-bordered">
<thead>
<tr>
<th>ID</th>
<th>Status</th>
<th>Created</th>
<th>Title</th>
<th>Description</th>
</tr>
</thead>
<tbody>
{% for ticket in open_tickets %}
<tr>
<td>{{ ticket.status }}</td>
<td>{{ ticket.created_by }}</td>
<td>{{ ticket.ticket_title }}</td>
<td>{{ ticket.ticket_description }}</td>
<td><a href="{% url 'accept_tickets' pk=
ticket.id %}"> Accept</a>
</tr>
{% endfor %}
</tbody></table>
{% elif tickets.status == 'Accepted' %}
<table class="table table-bordered">
<thead>
<tr>
<th>ID</th>
<th>Status</th>
<th>Created by</th>
<th>Title</th>
<th>Description</th>
</tr>
</thead>
<tbody>
{% for ticket in accepted_tickets %}
<tr>
<td>{{ ticket.status }}</td>
<td>{{ ticket.created_by }}</td>
<td>{{ ticket.ticket_title }}</td>
<td>{{ ticket.ticket_description }}</td>
<td><a href="{% url 'mark_complete' pk=
ticket.id %}">Complete</a>
</tr>
{% endfor %}
</tbody></table>
{% elif tickets.status == 'Completed' %}
<table class="table table-bordered">
<thead>
<tr>
<th>ID</th>
<th>Status</th>
<th>Created by</th>
<th>Title</th>
<th>Description</th>
</tr>
</thead>
<tbody>
{% for ticket in completed_tickets %}
<tr>
<td>{{ ticket.status }}</td>
<td>{{ ticket.created_by }}</td>
<td>{{ ticket.ticket_title }}</td>
<td>{{ ticket.ticket_description }}</td>
</tr>
{% endfor %}
{% else %}
<table class="table table-bordered">
<thead>
<tr>
<th>ID</th>
<th>Status</th>
<th>Created by</th>
<th>Title</th>
<th>Description</th>
</tr>
</thead>
<tbody>
{% for ticket in closed_tickets %}
<tr>
<td>{{ ticket.status }}</td>
<td>{{ ticket.created_by }}</td>
<td>{{ ticket.ticket_title }}</td>
<td>{{ ticket.ticket_description }}</td>
</tr>
{% endfor %}
{% endif %}
{% endfor %}
{% endblock %}