Xapdina/python-project-52

View on GitHub
task_manager/templates/statuses/list.html

Summary

Maintainability
Test Coverage
{% extends 'base.html' %}
{% load i18n %}

{% block header %}{% translate 'Statuses' %}{% endblock %}

{% block content %}
<a class="btn btn-primary" href="{% url 'status_create' %}">{% translate 'Create status' %}</a>
<table class="table">
    <thead>
    <tr>
        <th>{% translate 'ID' %}</th>
        <th>{% translate 'Name' %}</th>
        <th>{% translate 'Date and time of creation' %}</th>
        <th>{% translate 'Manage' %}</th>
    </tr>
    </thead>
    <tbody>
    {% for status in statuses %}
    <tr>
        <th scope="row">{{ status.id }}</th>
        <td>{{ status.name }}</td>
        <td>{{ status.created_at }}</td>
        <td>
          <a href="{% url 'status_update' status.id %}">{% translate 'Update' %}</a>
          <br>
          <a href="{% url 'status_delete' status.id %}">{% translate 'Delete' %}</a>
        </td>
    </tr>
    {% endfor %}
    </tbody>
</table>
{% endblock %}