release nouri 0.4.0 templates suggestions and mobile sheet
This commit is contained in:
@@ -14,6 +14,45 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="two-column">
|
||||
<article class="panel">
|
||||
<div class="panel-head">
|
||||
<h2>Tagesvorlagen</h2>
|
||||
<a href="{{ url_for('main.day_template_create', source_date=selected_date.isoformat()) }}">Als Vorlage speichern</a>
|
||||
</div>
|
||||
{% if day_templates %}
|
||||
<div class="stack-sections">
|
||||
{% for template in day_templates %}
|
||||
<form method="post" action="{{ url_for('main.day_template_apply', template_id=template.id) }}" class="inline-form template-apply-form">
|
||||
{{ csrf_input() }}
|
||||
<input type="hidden" name="target_date" value="{{ selected_date.isoformat() }}">
|
||||
<div class="template-card">
|
||||
<strong>{{ template.name }}</strong>
|
||||
<small>{{ template.visibility_label }} · {{ template.owner_label }}</small>
|
||||
</div>
|
||||
<button type="submit">Vorlage anwenden</button>
|
||||
</form>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="empty-state">Wenn du einen Tag öfter wiederverwenden möchtest, kannst du ihn hier als Tagesvorlage speichern.</p>
|
||||
{% endif %}
|
||||
</article>
|
||||
|
||||
{% if day_hints %}
|
||||
<article class="panel">
|
||||
<div class="panel-head">
|
||||
<h2>Sanfte Hinweise</h2>
|
||||
</div>
|
||||
<div class="hint-list">
|
||||
{% for hint in day_hints %}
|
||||
<p class="hint-chip">{{ hint }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</article>
|
||||
{% endif %}
|
||||
</section>
|
||||
|
||||
<section class="planner-day-stack">
|
||||
{% for section in sections %}
|
||||
<details class="day-tile" id="daypart-{{ section.daypart.id }}" {% if section.is_open %}open{% endif %}>
|
||||
@@ -33,6 +72,18 @@
|
||||
</summary>
|
||||
|
||||
<div class="day-tile-body">
|
||||
{% if section.suggestions %}
|
||||
<div class="suggestion-row">
|
||||
{% for suggestion in section.suggestions %}
|
||||
<article class="suggestion-card">
|
||||
<strong>{{ suggestion.title }}</strong>
|
||||
<small>{{ suggestion.reason }}</small>
|
||||
<p>{{ suggestion.note }}</p>
|
||||
</article>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if section.quick_items %}
|
||||
<div class="quick-add-row">
|
||||
{% for item in section.quick_items %}
|
||||
@@ -44,7 +95,7 @@
|
||||
<input type="hidden" name="visibility" value="{{ item.visibility }}">
|
||||
<button class="quick-add-button" type="submit">
|
||||
<span>{{ item.name }}</span>
|
||||
<small>{{ item_kind_labels[item.kind] }} · {{ item.visibility_label }}{% if item.availability_state == 'home' %} · zuhause{% endif %}</small>
|
||||
<small>{{ item_kind_labels[item.kind] }} · {{ item.visibility_label }} · {{ item.for_label }}{% if item.availability_state == 'home' %} · zuhause{% endif %}</small>
|
||||
</button>
|
||||
</form>
|
||||
{% endfor %}
|
||||
@@ -61,7 +112,7 @@
|
||||
<option value="">Etwas für {{ section.daypart.name }} wählen</option>
|
||||
{% for item in section.candidates %}
|
||||
<option value="{{ item.id }}" {% if section.selected_item_id == item.id %}selected{% endif %}>
|
||||
{{ item.name }} · {{ item_kind_labels[item.kind] }} · {{ item.visibility_label }}{% if item.availability_state == 'home' %} · zuhause{% endif %}{% if item.dayparts and section.daypart.name not in item.dayparts %} · auch flexibel{% endif %}
|
||||
{{ item.name }} · {{ item_kind_labels[item.kind] }} · {{ item.visibility_label }} · {{ item.for_label }}{% if item.availability_state == 'home' %} · zuhause{% endif %}{% if item.dayparts and section.daypart.name not in item.dayparts %} · auch flexibel{% endif %}
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
@@ -92,6 +143,7 @@
|
||||
<div class="chip-row">
|
||||
<span class="chip">{{ entry.visibility_label }}</span>
|
||||
<span class="chip status-soft">{{ entry.owner_label }}</span>
|
||||
<span class="chip">{{ entry.for_label }}</span>
|
||||
</div>
|
||||
</div>
|
||||
{% if entry.can_edit %}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div>
|
||||
<p class="eyebrow">Wochenansicht</p>
|
||||
<h1>Ein sanfter Blick auf die nächsten sieben Tage</h1>
|
||||
<p class="lead">Du kannst bestehende Einträge zwischen Tagen und Tageszeiten verschieben. Wenn etwas noch nicht zuhause ist, landet es dabei automatisch auf der Einkaufsliste.</p>
|
||||
<p class="lead">Du kannst bestehende Einträge zwischen Tagen und Tageszeiten verschieben, Vorlagen anwenden und eine Woche bei Bedarf für später sichern.</p>
|
||||
</div>
|
||||
<div class="week-nav">
|
||||
<a class="ghost-button" href="{{ url_for('main.planner', week=prev_week.isoformat()) }}">Vorige Woche</a>
|
||||
@@ -14,6 +14,45 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="two-column">
|
||||
<article class="panel">
|
||||
<div class="panel-head">
|
||||
<h2>Wochenvorlagen</h2>
|
||||
<a href="{{ url_for('main.week_template_create', source_week=week_start.isoformat()) }}">Als Vorlage speichern</a>
|
||||
</div>
|
||||
{% if week_templates %}
|
||||
<div class="stack-sections">
|
||||
{% for template in week_templates %}
|
||||
<form method="post" action="{{ url_for('main.week_template_apply', template_id=template.id) }}" class="inline-form template-apply-form">
|
||||
{{ csrf_input() }}
|
||||
<input type="hidden" name="target_week" value="{{ week_start.isoformat() }}">
|
||||
<div class="template-card">
|
||||
<strong>{{ template.name }}</strong>
|
||||
<small>{{ template.visibility_label }} · {{ template.owner_label }}</small>
|
||||
</div>
|
||||
<button type="submit">Vorlage anwenden</button>
|
||||
</form>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<p class="empty-state">Wenn eine Woche sich bewährt hat, kannst du sie hier später als Wochenvorlage wiederverwenden.</p>
|
||||
{% endif %}
|
||||
</article>
|
||||
|
||||
{% if week_hints %}
|
||||
<article class="panel">
|
||||
<div class="panel-head">
|
||||
<h2>Sanfte Hinweise</h2>
|
||||
</div>
|
||||
<div class="hint-list">
|
||||
{% for hint in week_hints %}
|
||||
<p class="hint-chip">{{ hint }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</article>
|
||||
{% endif %}
|
||||
</section>
|
||||
|
||||
<section class="week-overview-grid week-board" data-csrf-token="{{ csrf_token_value }}">
|
||||
{% for card in week_cards %}
|
||||
<article class="week-card">
|
||||
@@ -51,7 +90,7 @@
|
||||
{% for entry in slot.entries %}
|
||||
<article class="plan-chip draggable-plan-entry" draggable="{{ 'true' if entry.can_edit else 'false' }}" data-entry-id="{{ entry.id }}" data-move-url="{{ url_for('main.planner_move', entry_id=entry.id) }}">
|
||||
<strong>{{ entry.item_name }}</strong>
|
||||
<small>{{ entry.visibility_label }} · {{ entry.owner_label }}</small>
|
||||
<small>{{ entry.visibility_label }} · {{ entry.for_label }}</small>
|
||||
</article>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user