Xapdina/python-project-52

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

Summary

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

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

{% block content %}
<table class="table">
    <thead>
    <tr>
        <th>{% translate 'ID' %}</th>
        <th>{% translate 'Username' %}</th>
        <th>{% translate 'Full name' %}</th>
        <th>{% translate 'Created date' %}</th>
        <th>{% translate 'Manage' %}</th>
    </tr>
    </thead>
    <tbody>
    {% for user in users %}
    <tr>
        <th scope="row">{{ user.id }}</th>
        <td>{{ user.username }}</td>
        <td>{{ user.first_name }} {{ user.last_name }}</td>
        <td>{{ user.date_joined }}</td>
        <td>
          <a href="{% url 'user_update' user.id %}">{% translate 'Update' %}</a>
          <br>
          <a href="{% url 'user_delete' user.id %}">{% translate 'Delete' %}</a>
        </td>
    </tr>
    {% endfor %}
    </tbody>
</table>
{% endblock %}