Enhancements
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
{% endwith %}
|
||||
<div><strong>{{ entry.product_name_snapshot }}</strong>{% if entry.brand_snapshot %}<span>{{ entry.brand_snapshot }}</span>{% endif %}<small>{% if entry.calories_kcal is not None %}{{ entry.calories_kcal|floatformat:0 }} kcal{% else %}— kcal{% endif %} · {% if entry.portion_label_snapshot %}{{ entry.portion_label_snapshot }} {% endif %}({{ entry.amount|floatformat:-3 }} {{ entry.unit }})</small></div>
|
||||
</div>
|
||||
<a href="{% url 'food:edit' entry.pk %}" aria-label="Edit {{ entry.product_name_snapshot }}">Edit</a>
|
||||
<div class="food-entry-actions"><a href="{% url 'food:edit' entry.pk %}" aria-label="Edit {{ entry.product_name_snapshot }}">Edit</a>{% if entry.product %}<a href="{% url 'food:product-hydration' entry.product.pk %}" aria-label="Drink settings for {{ entry.product_name_snapshot }}">Drink settings</a>{% endif %}</div>
|
||||
</li>
|
||||
{% endfor %}</ul>{% else %}<p class="food-empty">Nothing logged yet.</p>{% endif %}
|
||||
</section>
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{% extends 'planner/base.html' %}{% load static %}
|
||||
{% block title %}Drink settings · Tasknest{% endblock %}
|
||||
{% block content %}<link rel="stylesheet" href="{% static 'food/food.css' %}">
|
||||
<div class="food-form-page"><a href="{% url 'food:diary' %}">← Food diary</a><h1>Drink settings for {{ product.product_name }}</h1><p>Only Food Diary amounts logged in ml count. Existing entries keep their saved contribution.</p><form class="food-card" method="post">{% csrf_token %}{{ form.non_field_errors }}{% for field in form %}<div class="form-field">{{ field.label_tag }}{{ field }}{{ field.errors }}</div>{% endfor %}<button class="button" type="submit">Save drink settings</button></form></div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user