Files
Fil-A-Management/templates/filament/order_adjustment_content.html

38 lines
2.3 KiB
HTML
Raw Permalink 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.
<div data-order-editor data-editor-title="Bestellverlauf">
{% with catalog=entry.catalog_details %}
<p><strong>{{ entry.owner.username }} · {{ entry.quantity }} × {{ catalog.manufacturer }} · {{ catalog.product }} · {{ catalog.color }} · {{ catalog.spool }}</strong></p>
{% endwith %}
<p>Aktueller Status: {{ entry.get_status_display }}</p>
{% if form %}
<form method="post" action="{% url 'order_adjustment' entry.pk %}" data-order-dialog-form>
{% csrf_token %}
{{ form.as_p }}
<div class="form-actions"><button class="button" type="submit">Änderung bestätigen</button></div>
</form>
{% endif %}
{% if entry.adjustments.all %}
<h2>Änderungen</h2>
<ul>
{% for change in entry.adjustments.all %}
<li>
<strong>{% if change.previous_status == change.status %}Filamentdaten korrigiert{% else %}{{ change.get_previous_status_display }} → {{ change.get_status_display }}{% endif %}</strong> · {{ change.quantity }} Rolle{{ change.quantity|pluralize:"n" }}{% if change.catalog_snapshot.article_number %} · {{ change.catalog_snapshot.article_number }}{% endif %}
{% if change.previous_status == change.status %}<br>Vorher: {{ change.catalog_snapshot.manufacturer }} · {{ change.catalog_snapshot.product }} · {{ change.catalog_snapshot.color }} · {{ change.catalog_snapshot.spool }}{% endif %}
<br><time datetime="{{ change.created_at|date:'c' }}">{{ change.created_at|date:"d.m.Y, H:i" }} Uhr</time> · {{ change.actor.username|default:"Gelöschtes Konto" }}
<br>{{ change.reason }}
</li>
{% endfor %}
</ul>
{% endif %}
<div class="form-actions">
{% if entry.status == "cancelled" %}
<a class="button secondary" href="{% url 'order_history' %}?ansicht=storniert">Zu den Stornierungen</a>
{% elif entry.status == "handed_over" %}
<a class="button secondary" href="{% url 'order_history' %}">Zu den Übergaben</a>
{% elif modal and entry.owner_id == user.pk or modal and not entry.is_pending %}
<a class="button secondary" href="{% url 'order_edit' entry.pk %}" data-order-editor-link>Zum Filament</a>
{% elif not modal %}
<a class="button secondary" href="{% url 'orders' %}">Zur Sammelbestellung</a>
{% endif %}
</div>
</div>