Release Nouri 1.3.0 with improved food states and quick entry flow
This commit is contained in:
@@ -351,7 +351,8 @@
|
||||
{% endif %}
|
||||
|
||||
<div class="form-actions">
|
||||
<button type="submit" name="form_action" value="save_item">Speichern</button>
|
||||
<button type="submit" name="save_mode" value="stay">Speichern</button>
|
||||
<button class="secondary" type="submit" name="save_mode" value="close">Speichern und schließen</button>
|
||||
<a class="ghost-button" href="{{ url_for('main.item_list', kind=kind) }}">Zurück</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Schnell anlegen | Nouri{% endblock %}
|
||||
{% block content %}
|
||||
<section class="page-intro">
|
||||
<div>
|
||||
<p class="eyebrow">Lebensmittel</p>
|
||||
<h1>Schnell anlegen</h1>
|
||||
<p class="lead">Hier kannst du mehrere Lebensmittel in einem Schritt anlegen. Sie landen zuerst als ruhige Platzhalter auf der Einkaufsliste und lassen sich später einzeln weiter ordnen.</p>
|
||||
</div>
|
||||
<a class="ghost-button" href="{{ url_for('main.item_list', kind='food') }}">Zurück</a>
|
||||
</section>
|
||||
|
||||
<section class="panel form-panel">
|
||||
<form method="post" class="stack-form">
|
||||
{{ csrf_input() }}
|
||||
|
||||
<label>
|
||||
Namen untereinander
|
||||
<textarea name="names_text" rows="10" placeholder="Erdbeeren Himbeeren Blaubeeren" required>{{ form_data.names_text }}</textarea>
|
||||
<small class="helper-text">Jede Zeile wird als eigenes Lebensmittel angelegt.</small>
|
||||
</label>
|
||||
|
||||
<div class="dual-grid">
|
||||
<label>
|
||||
Sichtbarkeit
|
||||
<select name="visibility">
|
||||
{% for value, label in visibility_options %}
|
||||
<option value="{{ value }}" {% if form_data.visibility == value %}selected{% endif %}>{{ label }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
Für wen?
|
||||
<select name="target_user_id">
|
||||
{% for option in target_user_options %}
|
||||
<option value="{{ option.value }}" {% if form_data.target_user_raw == option.value %}selected{% endif %}>{{ option.label }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="dual-grid">
|
||||
<label>
|
||||
Baustein
|
||||
<select name="base_type">
|
||||
{% for value, label in builder_options %}
|
||||
<option value="{{ value }}" {% if form_data.base_type == value %}selected{% endif %}>{{ label }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
Geschmacksrichtung
|
||||
<select name="flavor_profile">
|
||||
{% for value, label in food_flavor_options %}
|
||||
<option value="{{ value }}" {% if form_data.flavor_profile == value %}selected{% endif %}>{{ label }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="dual-grid">
|
||||
<label>
|
||||
Rolle in Vorschlägen
|
||||
<select name="suggestion_role">
|
||||
{% for value, label in food_role_options %}
|
||||
<option value="{{ value }}" {% if form_data.suggestion_role == value %}selected{% endif %}>{{ label }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
Wird eher vorgeschlagen
|
||||
<select name="suggestion_priority">
|
||||
{% for value, label in suggestion_priority_options %}
|
||||
<option value="{{ value }}" {% if form_data.suggestion_priority == value %}selected{% endif %}>{{ label }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="dual-grid">
|
||||
<label>
|
||||
Energiedichte
|
||||
<select name="energy_density">
|
||||
{% for value, label in energy_density_options %}
|
||||
<option value="{{ value }}" {% if form_data.energy_density == value %}selected{% endif %}>{{ label }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
|
||||
<label class="inline-check">
|
||||
<input type="checkbox" name="can_be_meal_core" value="1" {% if form_data.can_be_meal_core %}checked{% endif %}>
|
||||
<span>Kann gut eine Mahlzeit tragen</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<fieldset>
|
||||
<legend>Passende Tageszeiten</legend>
|
||||
<div class="checkbox-grid daypart-option-grid">
|
||||
{% for daypart in dayparts %}
|
||||
<label class="daypart-option">
|
||||
<input type="checkbox" name="daypart_ids" value="{{ daypart.id }}" {% if daypart.id in form_data.daypart_ids %}checked{% endif %}>
|
||||
<span class="daypart-option-card">
|
||||
<span class="daypart-option-icon">
|
||||
<span class="ui-icon {{ daypart_icon_class(daypart.slug) }}"></span>
|
||||
</span>
|
||||
<span class="daypart-option-label">{{ daypart.name }}</span>
|
||||
</span>
|
||||
</label>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<label>
|
||||
Gemeinsame Notiz
|
||||
<textarea name="note" rows="3" placeholder="Optional, wenn diese Gruppe etwas gemeinsam braucht.">{{ form_data.note }}</textarea>
|
||||
<small class="helper-text">Die Einträge starten in „Unsortiert“, sind zunächst nicht zuhause und tauchen erst nach einer späteren Einordnung im Alltag regulär auf.</small>
|
||||
</label>
|
||||
|
||||
<div class="form-actions">
|
||||
<button type="submit">In Unsortiert anlegen</button>
|
||||
<a class="ghost-button" href="{{ url_for('main.item_list', kind='food') }}">Abbrechen</a>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user