Refine meal suggestions and planner entry controls
This commit is contained in:
@@ -134,8 +134,26 @@
|
||||
<div>
|
||||
<strong>{{ suggestion.title }}</strong>
|
||||
<small>{{ suggestion.reason }}</small>
|
||||
{% if suggestion.needs_shopping and suggestion.missing_components %}
|
||||
<div class="chip-row">
|
||||
<span class="chip status-idea">Es fehlt noch: {{ suggestion.missing_components|join(', ') }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="template-list-card-actions">
|
||||
{% if suggestion.existing_item_id %}
|
||||
<a class="ghost-button" href="{{ url_for('main.planner_day', date=today.isoformat(), item_id=suggestion.existing_item_id, daypart_id=suggestion.daypart_id or 1) }}">Im Tagesplan öffnen</a>
|
||||
{% else %}
|
||||
<a class="ghost-button" href="{{ url_for('main.item_create', kind='meal', name=suggestion.title, component_ids=suggestion.component_ids) }}">Als Mahlzeit anlegen</a>
|
||||
<form method="post" action="{{ url_for('main.suggestion_hide') }}">
|
||||
{{ csrf_input() }}
|
||||
{% for component_id in suggestion.component_ids %}
|
||||
<input type="hidden" name="component_ids" value="{{ component_id }}">
|
||||
{% endfor %}
|
||||
<button class="ghost-button" type="submit">Dauerhaft ausblenden</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
<a class="ghost-button" href="{{ url_for('main.item_create', kind='meal', name=suggestion.title, component_ids=suggestion.component_ids) }}">Als Mahlzeit anlegen</a>
|
||||
</article>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user