62 lines
2.5 KiB
HTML
62 lines
2.5 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. Gemeinsame und persönliche Einträge bleiben dabei klar erkennbar.</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 hinzufügen</option>
|
|
{% for item in addable_items %}
|
|
<option value="{{ item.id }}">
|
|
{{ item.name }} · {{ item_kind_labels[item.kind] }} · {{ item.visibility_label }}
|
|
{% 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 stacked-mobile">
|
|
<div>
|
|
<strong>{{ entry.item_name }}</strong>
|
|
<p class="muted">{{ item_kind_labels[entry.item_kind] }}</p>
|
|
<div class="chip-row">
|
|
<span class="chip">{{ entry.visibility_label }}</span>
|
|
<span class="chip status-soft">{{ entry.owner_label }}</span>
|
|
</div>
|
|
</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>
|
|
{% if entry.can_edit %}
|
|
<form method="post" action="{{ url_for('main.shopping_remove', entry_id=entry.id) }}">
|
|
{{ csrf_input() }}
|
|
<button class="ghost-button" type="submit">Entfernen</button>
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
</article>
|
|
{% endfor %}
|
|
</section>
|
|
{% else %}
|
|
<section class="panel empty-panel">
|
|
<h2>Die Liste ist gerade frei</h2>
|
|
<p>Einträge aus Lebensmitteln, Mahlzeitenideen oder dem Archiv lassen sich jederzeit wieder hinzufügen.</p>
|
|
</section>
|
|
{% endif %}
|
|
{% endblock %}
|