goliath/views/index.twig

40 lines
1.2 KiB
Twig

{% extends 'layout.twig' %}
{% block title %}Home{% endblock %}
{% block content %}
<div class="row">
<div class="columns twelve">
<h1>Welcome to Goliath!</h1>
</div>
</div>
<div class="row">
{% if tickets|length > 0 %}
<table class="columns twelve">
<thead>
<th>Title</th>
<th>Severity</th>
<th>Due date</th>
<th>Actions</th>
</thead>
<tbody>
{% for ticket in tickets %}
<tr>
<td><a href="{{ url_for('ticket.view', {ticket_id: ticket.id}) }}">{{ ticket.title }}</a></td>
<td>{{ ticket.severity }}</td>
<td>{{ ticket.due_at ? ticket.due_at : 'N/a' }}</td>
<td>
<a href="{{ url_for('ticket.edit', {ticket_id: ticket.id}) }}"><i class="fa-solid fa-pen-to-square"></i></a>
<a href="{{ url_for('ticket.delete', {ticket_id: ticket.id}) }}"><i class="fa-solid fa-trash"></i></a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>There a no tickets in the database at this time.</p>
{% endif %}
</div>
{% endblock %}