M3: Reorder + Inspiration – Schritt 2 (UI): Planungsliste mit SortableJS, Tagesansicht /mahlzeiten/tage, Inspiration /inspiration mit 'Weitere 5' + 1-Klick-Adopt, Feature-Tests
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
{% extends 'layout/base.html.twig' %}
|
||||
|
||||
{% block title %}Inspiration · svc-essensplanung{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="card">
|
||||
<div class="row-between">
|
||||
<div>
|
||||
<h1 style="margin: 0;">Inspiration</h1>
|
||||
<div class="muted" style="margin-top: 0.2rem;">Gerichte aus dem Archiv – was kochst du mal wieder?</div>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<a class="btn btn-link" href="{{ path('mahlzeiten_index') }}">← Mahlzeiten</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# Für "Weitere 5" / Adopt-Kontext: bisheriger Ausschluss + die IDs dieser Seite #}
|
||||
{% set alleAusschluss = ausschluss + gezeigte %}
|
||||
|
||||
{% if total == 0 %}
|
||||
<p class="muted" style="margin-top: 1rem;">
|
||||
Noch keine Inspiration: Hake Mahlzeiten ab – dann erscheinen sie hier als Vorschlag.
|
||||
</p>
|
||||
{% else %}
|
||||
<ul class="list">
|
||||
{% for v in vorschlaege %}
|
||||
<li class="item" id="vorschlag-{{ v.id }}">
|
||||
<div>
|
||||
<strong>{{ v.name }}</strong>
|
||||
{% if v.notiz != '' %}
|
||||
<div class="muted">{{ v.notiz }}</div>
|
||||
{% endif %}
|
||||
<span class="status">
|
||||
{% if v.gegessenAm %}
|
||||
zuletzt gegessen · {{ v.gegessenAm|date('d.m.Y') }}
|
||||
{% else %}
|
||||
aus dem Archiv
|
||||
{% endif %}
|
||||
· {{ v.auftraete }}× in der Küche
|
||||
</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<form method="post" action="{{ path('mahlzeiten_adopt', { id: v.id }) }}">
|
||||
{% for id in alleAusschluss %}
|
||||
<input type="hidden" name="ausschluss[]" value="{{ id }}">
|
||||
{% endfor %}
|
||||
<button type="submit" class="btn">Übernehmen</button>
|
||||
</form>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% if mehrVerfuegbar %}
|
||||
<p style="margin: 1rem 0 0;">
|
||||
<a class="btn btn-link"
|
||||
href="{{ path('mahlzeiten_inspiration', { ausschluss: alleAusschluss|join(',') }) }}">Weitere 5 Vorschläge</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user