Files
nouri-App/nouri/templates/shopping/list.html
T
2026-04-12 10:36:13 +02:00

53 lines
2.2 KiB
HTML

{% extends "base.html" %}
{% block title %}Einkaufsliste | Nouri{% endblock %}
{% block content %}
<section class="page-intro">
<div>
<p class="eyebrow">Einkaufsliste</p>
<h1>Was noch mitkommen soll</h1>
<p class="lead">Abhaken legt Dinge automatisch unter Zuhause ab. So wird aus der Liste direkt sichtbarer Vorrat.</p>
</div>
</section>
<section class="panel compact-form-panel">
<form method="post" class="inline-form">
{{ csrf_input() }}
<select name="item_id">
<option value="">Bestehenden Eintrag hinzufuegen</option>
{% for item in addable_items %}
<option value="{{ item.id }}">{{ item.name }} · {{ item_kind_labels[item.kind] }}{% if item.availability_state == 'home' %} · zuhause{% endif %}</option>
{% endfor %}
</select>
<button type="submit">Auf Liste setzen</button>
</form>
</section>
{% if entries %}
<section class="stack-list">
{% for entry in entries %}
<article class="list-row">
<div>
<strong>{{ entry.item_name }}</strong>
<p class="muted">{{ item_kind_labels[entry.item_kind] }}{% if entry.display_name or entry.username %} · hinzugefuegt von {{ entry.display_name or entry.username }}{% endif %}</p>
</div>
<div class="row-actions">
<form method="post" action="{{ url_for('main.shopping_check', entry_id=entry.id) }}">
{{ csrf_input() }}
<button type="submit">Eingekauft</button>
</form>
<form method="post" action="{{ url_for('main.shopping_remove', entry_id=entry.id) }}">
{{ csrf_input() }}
<button class="ghost-button" type="submit">Entfernen</button>
</form>
</div>
</article>
{% endfor %}
</section>
{% else %}
<section class="panel empty-panel">
<h2>Die Liste ist gerade frei</h2>
<p>Eintraege aus Lebensmitteln, Mahlzeitenideen oder dem Archiv lassen sich jederzeit wieder hinzufuegen.</p>
</section>
{% endif %}
{% endblock %}