Files
Fil-A-Management/templates/filament/order_history.html
T

60 lines
3.6 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 title %}Bestellhistorie · Fil-A-Management{% endblock %}
{% block content %}
<div class="page-heading">
<div>
<h1>Bestellhistorie</h1>
<p class="muted">Hier stehen bestellte, eingetroffene und übergebene Positionen der Gruppe.</p>
</div>
</div>
<section class="panel">
{% if page.object_list %}
<div class="table-wrap">
<table aria-label="Bestellhistorie">
<thead>
<tr><th>Bestellt am</th><th>Für wen</th><th>Stück</th><th>Produktart</th><th>Farbe</th><th>Artikelnr.</th><th>Spulenausführung</th><th>Status</th><th>Übergeben am</th><th scope="col"><span class="sr-only">Aktionen</span></th></tr>
</thead>
<tbody>
{% for entry in page %}
<tr>
<td class="history-date">{% if entry.ordered_at %}<time datetime="{{ entry.ordered_at|date:'c' }}">{{ entry.ordered_at|date:"d.m.Y" }}<small>{{ entry.ordered_at|date:"H:i" }} Uhr</small></time>{% else %}<span class="muted">Nicht erfasst</span>{% endif %}</td>
<td>{{ entry.owner.username }}</td>
<td class="quantity">{{ entry.quantity }}</td>
<td>{{ entry.variant.product_type.name }}<small>{{ entry.variant.manufacturer }}</small></td>
<td><div class="variant-preview">{% include "filament/variant_thumbnail.html" with variant=entry.variant only %}<strong>{{ entry.variant.color_label }}</strong></div></td>
<td class="article-number">{{ entry.variant.manufacturer_color_code|default:"–" }}</td>
<td><span class="badge">{{ entry.variant.get_spool_type_display }}</span></td>
<td><span class="badge">{{ entry.get_status_display }}</span></td>
<td class="history-date">
{% if entry.handed_over_at %}<time datetime="{{ entry.handed_over_at|date:'c' }}">{{ entry.handed_over_at|date:"d.m.Y" }}<small>{{ entry.handed_over_at|date:"H:i" }} Uhr</small></time>
{% elif entry.status == "handed_over" %}<span class="muted">Nicht erfasst</span>
{% else %}–{% endif %}
</td>
<td class="actions">
{% if entry.handover_previous_status %}
{% if entry.owner_id == user.pk or perms.filament.change_orderitem %}
<a href="{% url 'order_handover_undo' entry.pk %}">Übergabe rückgängig machen</a>
{% endif %}
{% endif %}
{% if perms.filament.delete_orderitem %}
<a class="danger-link" href="{% url 'order_history_delete' entry.pk %}" aria-label="Bestellposition für {{ entry.owner.username }} löschen">Löschen</a>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% if page.has_other_pages %}
<div class="panel-heading history-pagination">
{% if page.has_previous %}<a href="?page={{ page.previous_page_number }}">← Zurück</a>{% endif %}
<span>Seite {{ page.number }} von {{ page.paginator.num_pages }}</span>
{% if page.has_next %}<a href="?page={{ page.next_page_number }}">Weiter →</a>{% endif %}
</div>
{% endif %}
{% else %}
<div class="empty"><h2>Noch keine Bestellungen erfasst</h2><p>Sobald eine Position als bestellt markiert wird, erscheint sie hier.</p><a class="button secondary" href="{% url 'orders' %}">Zur Sammelbestellung</a></div>
{% endif %}
</section>
{% endblock %}