Polish item builders with icon-based selector cards
This commit is contained in:
+130
-30
@@ -5,7 +5,13 @@
|
||||
<div>
|
||||
<p class="eyebrow">{{ item_kind_labels[kind] }}</p>
|
||||
<h1>{% if item %}{{ item.name }} bearbeiten{% else %}Neue{% endif %} {{ item_kind_singular_labels[kind] }}</h1>
|
||||
<p class="lead">Nur das Nötigste: Name, Sichtbarkeit, für wen etwas gedacht ist, Bild, Tageszeiten und eine kleine Notiz.</p>
|
||||
<p class="lead">
|
||||
{% if kind == 'food' %}
|
||||
Name, Sichtbarkeit und ein paar ruhige Hinweise dazu, wie ein Lebensmittel in Vorschlägen gut passt.
|
||||
{% else %}
|
||||
Name, Sichtbarkeit, Tageszeit und ein kurzer Charakter der Idee. So bleiben Mahlzeitenideen alltagsnah und leicht pflegbar.
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
{% if item %}
|
||||
<div class="intro-pills">
|
||||
@@ -45,25 +51,95 @@
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<label>
|
||||
Kategorie
|
||||
<select name="category">
|
||||
<option value="">Ohne Kategorie</option>
|
||||
{% for category in categories %}
|
||||
<option value="{{ category }}" {% if form_data.category == category %}selected{% endif %}>{{ category }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
{% if kind == 'food' %}
|
||||
<label>
|
||||
Passt eher zu
|
||||
<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>
|
||||
<small class="helper-text">{{ builder_descriptions[form_data.base_type] }}</small>
|
||||
</label>
|
||||
|
||||
<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>
|
||||
<small class="helper-text">Hilft Nouri dabei, passende Ideen etwas ruhiger und persönlicher zu sortieren.</small>
|
||||
</label>
|
||||
<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>
|
||||
<small class="helper-text">{{ food_role_descriptions[form_data.suggestion_role] }}</small>
|
||||
</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>
|
||||
|
||||
<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>
|
||||
<small class="helper-text">Praktisch für Dinge wie Tofu, Joghurt oder Müsli. Extras wie Proteinpulver, Tomatenmark oder Saaten bleiben so eher Ergänzungen.</small>
|
||||
{% else %}
|
||||
<div class="dual-grid">
|
||||
<label>
|
||||
Mahlzeittyp
|
||||
<select name="meal_type">
|
||||
{% for value, label in meal_type_options %}
|
||||
<option value="{{ value }}" {% if form_data.meal_type == value %}selected{% endif %}>{{ label }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
|
||||
<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>
|
||||
<small class="helper-text">Hilft Nouri dabei, passende Ideen etwas ruhiger und persönlicher zu sortieren.</small>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<fieldset>
|
||||
<legend>Charakter der Mahlzeit</legend>
|
||||
<div class="checkbox-grid meal-style-option-grid">
|
||||
{% for value, label in meal_style_options %}
|
||||
<label class="meal-style-option">
|
||||
<input type="checkbox" name="meal_tags" value="{{ value }}" {% if value in form_data.meal_tags %}checked{% endif %}>
|
||||
<span class="meal-style-option-card">
|
||||
<span class="meal-style-option-icon">
|
||||
<span class="ui-icon icon-meal-style-{{ value }}"></span>
|
||||
</span>
|
||||
<span class="meal-style-option-label">{{ label }}</span>
|
||||
</span>
|
||||
</label>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<small class="helper-text">Nur das auswählen, was wirklich hilft. Alles andere kann leer bleiben.</small>
|
||||
</fieldset>
|
||||
{% endif %}
|
||||
|
||||
{% if kind == 'food' %}
|
||||
<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>
|
||||
<small class="helper-text">Hilft Nouri dabei, passende Ideen etwas ruhiger und persönlicher zu sortieren.</small>
|
||||
</label>
|
||||
{% endif %}
|
||||
|
||||
<label>
|
||||
Notiz
|
||||
@@ -88,11 +164,16 @@
|
||||
|
||||
<fieldset>
|
||||
<legend>Passende Tageszeiten</legend>
|
||||
<div class="checkbox-grid">
|
||||
<div class="checkbox-grid daypart-option-grid">
|
||||
{% for daypart in dayparts %}
|
||||
<label class="check-option">
|
||||
<label class="daypart-option">
|
||||
<input type="checkbox" name="daypart_ids" value="{{ daypart.id }}" {% if daypart.id in form_data.daypart_ids %}checked{% endif %}>
|
||||
<span>{{ daypart.name }}</span>
|
||||
<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>
|
||||
@@ -101,7 +182,7 @@
|
||||
{% if kind == 'meal' %}
|
||||
<fieldset>
|
||||
<legend>Bestandteile der Mahlzeitenidee</legend>
|
||||
<p class="muted">Du kannst eine Mahlzeit frei als Idee anlegen oder sie aus sichtbaren Lebensmitteln zusammenstellen.</p>
|
||||
<p class="muted">Du kannst eine Mahlzeitenidee frei benennen oder aus sichtbaren Lebensmitteln zusammensetzen. Nouri nutzt dabei später Grundtyp, Rolle und Tageszeit der Lebensmittel für ruhigere Vorschläge.</p>
|
||||
<div class="inline-form">
|
||||
<label class="wide">
|
||||
Lebensmittel suchen
|
||||
@@ -128,9 +209,9 @@
|
||||
</div>
|
||||
<div class="checkbox-grid filterable-checkbox-group" data-filter-group>
|
||||
{% for food in group["items"] %}
|
||||
<label class="check-option" data-filter-label="{{ food.name|lower }} {{ food.category|default('', true)|lower }}">
|
||||
<label class="check-option" data-filter-label="{{ food.name|lower }} {{ food.category|default('', true)|lower }} {{ food.base_type_label|lower }} {{ food.suggestion_role_label|lower }}">
|
||||
<input type="checkbox" name="component_ids" value="{{ food.id }}" {% if food.id in form_data.component_ids %}checked{% endif %}>
|
||||
<span>{{ food.name }} · {{ food.visibility_label }} · {{ food.for_label }}</span>
|
||||
<span>{{ food.name }} · {{ food.base_type_label }} · {{ food.visibility_label }}</span>
|
||||
</label>
|
||||
{% endfor %}
|
||||
</div>
|
||||
@@ -151,11 +232,26 @@
|
||||
<input type="text" name="quick_food_name" value="{{ form_data.quick_food_name }}" placeholder="z. B. Hüttenkäse">
|
||||
</label>
|
||||
<label>
|
||||
Kategorie
|
||||
<select name="quick_food_category">
|
||||
<option value="">Ohne Kategorie</option>
|
||||
{% for category in categories %}
|
||||
<option value="{{ category }}" {% if form_data.quick_food_category == category %}selected{% endif %}>{{ category }}</option>
|
||||
Passt eher zu
|
||||
<select name="quick_food_base_type">
|
||||
{% for value, label in builder_options %}
|
||||
<option value="{{ value }}" {% if form_data.quick_food_base_type == value %}selected{% endif %}>{{ label }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
Rolle in Vorschlägen
|
||||
<select name="quick_food_role">
|
||||
{% for value, label in food_role_options %}
|
||||
<option value="{{ value }}" {% if form_data.quick_food_role == value %}selected{% endif %}>{{ label }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
Wird eher vorgeschlagen
|
||||
<select name="quick_food_priority">
|
||||
{% for value, label in suggestion_priority_options %}
|
||||
<option value="{{ value }}" {% if form_data.quick_food_priority == value %}selected{% endif %}>{{ label }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
@@ -167,6 +263,10 @@
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
<label class="inline-check">
|
||||
<input type="checkbox" name="quick_food_can_be_meal_core" value="1" {% if form_data.quick_food_can_be_meal_core %}checked{% endif %}>
|
||||
<span>Kann gut eine Mahlzeit tragen</span>
|
||||
</label>
|
||||
<label class="wide">
|
||||
Notiz
|
||||
<input type="text" name="quick_food_note" value="{{ form_data.quick_food_note }}" placeholder="Optional">
|
||||
|
||||
Reference in New Issue
Block a user