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

47 lines
3.3 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 %}Marktplatz · Fil-A-Management{% endblock %}
{% block content %}
<div class="page-heading">
<div><h1>Marktplatz</h1><p class="muted">Filamentrollen unter Mitgliedern abgeben und übernehmen.</p></div>
<a class="button" href="{% url 'inventory' %}">Rollen aus meinem Bestand anbieten</a>
</div>
<section class="panel">
<div class="panel-heading"><h2>Verfügbare Angebote</h2></div>
{% if offers %}
<div class="table-wrap"><table>
<thead><tr><th>Anbieter</th><th>Hersteller</th><th>Produktart</th><th>Farbe</th><th>Spulenausführung</th><th>Artikelnr.</th><th>Rollen</th><th>Pro Rolle</th><th>Gesamt</th><th><span class="sr-only">Aktionen</span></th></tr></thead>
<tbody>
{% for offer in offers %}
<tr>
<td>{{ offer.seller.username }}{% if offer.seller_id == user.pk %}<small class="stock-marketplace-note">Dein Angebot</small>{% endif %}</td>
<td>{{ offer.variant.manufacturer }}</td>
<td>{{ offer.variant.product_type.name }}</td>
<td><div class="variant-preview">{% include "filament/variant_thumbnail.html" with variant=offer.variant only %}<strong>{{ offer.variant.color_label }}</strong></div></td>
<td>{{ offer.get_spool_type_display }}{% if offer.bambu_spool %}<small class="stock-spool-brand">Bambu Lab</small>{% endif %}</td>
<td class="article-number">{{ offer.variant.manufacturer_color_code|default:"–" }}</td>
<td class="quantity">{{ offer.quantity }}</td>
<td>{{ offer.price|floatformat:2 }} €</td>
<td><strong>{{ offer.total_price|floatformat:2 }} €</strong></td>
<td>{% if offer.seller_id == user.pk %}<a href="{% url 'marketplace_withdraw' offer.pk %}">Zurückziehen</a>{% else %}<a class="button secondary" href="{% url 'marketplace_take' offer.pk %}">Ich nehme das Angebot</a>{% endif %}</td>
</tr>
{% endfor %}
</tbody>
</table></div>
{% else %}
<div class="empty"><h3>Noch keine Rollen im Angebot</h3><p>Öffne deinen Bestand und wähle bei einer Position „Auf Marktplatz anbieten“.</p></div>
{% endif %}
</section>
<p class="hint">Angebote gelten für die gesamte angegebene Menge. Bei bestätigter Übernahme werden die Rollen automatisch vom Bestand des Anbieters in deinen Bestand umgebucht. Zahlung und Abholung vereinbart ihr miteinander.</p>
{% if completed %}
<section class="panel">
<div class="panel-heading"><h2>Deine letzten abgeschlossenen Angebote</h2></div>
<div class="table-wrap"><table>
<thead><tr><th>Datum</th><th>Filament</th><th>Spulenausführung</th><th>Rollen</th><th>Gesamt</th><th>Status</th><th>Anbieter</th><th>Übernommen von</th></tr></thead>
<tbody>{% for offer in completed %}
<tr><td>{{ offer.completed_at|date:"d.m.Y H:i" }}</td><td>{{ offer.variant.product_type }} · {{ offer.variant.color_label }}</td><td>{{ offer.get_spool_type_display }}</td><td>{{ offer.quantity }}</td><td>{{ offer.total_price|floatformat:2 }} €</td><td>{{ offer.get_status_display }}</td><td>{{ offer.seller.username }}</td><td>{{ offer.buyer.username|default:"–" }}</td></tr>
{% endfor %}</tbody>
</table></div>
</section>
{% endif %}
{% endblock %}