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

27 lines
1.7 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.
<div class="table-wrap"><table class="inventory-table">
<thead><tr><th>Hersteller</th><th>Produktart</th><th>Farbe</th><th>Spulenausführung</th><th title="Hersteller-Farbcode">Artikelnr.</th><th>Stück</th>{% if editable %}<th><span class="sr-only">Aktionen</span></th>{% endif %}</tr></thead>
{% for group in groups %}
<tbody class="stock-group">
{% for item in group %}
<tr>
{% if forloop.first %}
<td rowspan="{{ group|length }}">{{ item.variant.manufacturer }}</td>
<td rowspan="{{ group|length }}">{{ item.variant.product_type.name }}</td>
<th class="stock-color" scope="rowgroup" rowspan="{{ group|length }}"><div class="variant-preview">{% include "filament/variant_thumbnail.html" with variant=item.variant only %}<strong>{{ item.variant.color }}</strong></div></th>
{% endif %}
<td><span class="badge">{{ item.variant.get_spool_type_display }}</span>{% if not item.variant.is_active %}<small class="warning">Deaktiviert</small>{% endif %}</td>
<td class="article-number">{{ item.variant.manufacturer_color_code|default:"–" }}</td>
<td class="quantity">{{ item.quantity }}</td>
{% if editable %}
<td class="actions">
<a class="button secondary consume-button" href="{% url 'inventory_consume' item.pk %}"
data-consume data-variant="{{ item.variant }}" data-quantity="{{ item.quantity }}"{% if not item.variant.is_active %} data-inactive{% endif %}>Spule verbraucht</a>
<a href="{% url 'inventory_edit' item.pk %}">Stückzahl ändern</a>
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
{% endfor %}
</table></div>