Files
timerr/templates/tasks/task_list.html
T
2026-07-15 00:12:31 +05:00

6 lines
1.4 KiB
HTML

{% extends 'base.html' %}{% load report_tags %}{% block content %}<div class="toolbar"><h1>Задачи</h1><a class="button" href="{% url 'task-create' %}">Новая задача</a></div>
<form method="get" class="filters"><label>Месяц <input type="month" name="month" value="{{ request.GET.month }}"></label><label>Статус <select name="status"><option value="">Все</option>{% for value,label in statuses %}<option value="{{ value }}" {% if request.GET.status == value %}selected{% endif %}>{{ label }}</option>{% endfor %}</select></label><button>Применить</button></form>
<div class="table-wrap"><table><thead><tr><th>Дата</th><th>Компания / проект</th><th>Задача</th><th>Исполнитель</th><th>Время</th><th>Ставка</th><th>Сумма</th><th>Статус</th></tr></thead><tbody>
{% for task in tasks %}<tr><td>{{ task.work_date|date:'d.m.Y' }}</td><td>{{ task.project.company.name }}<br><small>{{ task.project.name }}</small></td><td><a href="{% url 'task-edit' task.pk %}">{{ task.title }}</a><br><small>{{ task.description|truncatechars:80 }}</small></td><td>{{ task.assignee.get_full_name|default:task.assignee.username }}</td><td>{{ task.duration_minutes|duration }}</td><td>{{ task.hourly_rate }} ₽</td><td>{{ task.amount }} ₽</td><td>{{ task.get_status_display }}</td></tr>
{% empty %}<tr><td colspan="8">Задач пока нет.</td></tr>{% endfor %}</tbody></table></div>{% endblock %}