sport_inventary/app/templates/issues.html

42 lines
1.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends "base.html" %}
{% block content %}
<h1>Выдачи инвентаря</h1>
<a href="{{ url_for('main.issue_new') }}" class="btn">➕ Новая выдача</a>
<table>
<thead>
<tr>
<th>ID</th>
<th>Партнёр</th>
<th>Дата</th>
<th>Статус</th>
<th>Действия</th>
</tr>
</thead>
<tbody>
{% for issue in issues %}
<tr>
<td>{{ issue.id }}</td>
<td><a href="{{ url_for('main.partner_detail', id=issue.partner.id) }}">{{ issue.partner.name }}</a></td>
<td>{{ issue.issue_date.strftime('%d.%m.%Y %H:%M') }}</td>
<td>
{% if issue.return_order %}
<span style="color: gray;">🔒 Закрыта</span>
{% else %}
<span style="color: green;">🟢 Открыта</span>
{% endif %}
</td>
<td>
<a href="{{ url_for('main.issue_detail', id=issue.id) }}" class="btn btn-secondary">🔍</a>
{% if not issue.return_order %}
<a href="{{ url_for('main.issue_edit', id=issue.id) }}" class="btn btn-secondary">✏️</a>
{% endif %}
</td>
</tr>
{% else %}
<tr>
<td colspan="5">Нет выдач</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}