task_manager/templates/statuses/statuses.html
{% extends 'layout.html' %}
{% load django_bootstrap5 %}
{% load i18n %}
{% block content %}
{% if messages %}
<div class="alert alert-success alert-dismissible fade show" role="alert">
{% for message in messages %}
{{ message }}
{% endfor %}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
{% endif %}
<div class="container wrapper flex-grow-1">
<h1 class="my-4">
{% trans "Statuses" %}
</h1>
<a class="btn btn-primary mb-3" href="{% url 'status_create' %}">{% trans "Create status" %} </a>
<table class="table table-striped">
<thead>
<tr>
<th>ID</th>
<th>{% trans "Name" %}</th>
<th>{% trans "Creation date" %}</th>
<th></th>
</tr>
</thead>
<tbody>
{% for status_data in status_list %}
<tr>
<td class="fw-normal">{{ status_data.id }}</td>
<td class="fw-normal">{{ status_data.name}}</td>
<td class="fw-normal">{{ status_data.timestamp|date:"d.m.Y H:i" }}</td>
<td>
<a href="{% url 'status_update' status_data.id %}">{% trans "Update" %}</a>
<br>
<a href="{% url 'status_delete' status_data.id %}">{% trans "Delete" %}</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}