2020-07-20 22:33:59 +00:00
|
|
|
{% extends 'cards/base.html' %}
|
|
|
|
{% load duration i18n %}
|
|
|
|
|
2021-08-04 20:36:00 +00:00
|
|
|
{% block header %}
|
|
|
|
<a href="{% url "core:feeding-list" %}">
|
|
|
|
{% trans "Today's Feeding" %}
|
|
|
|
</a>
|
|
|
|
{% endblock %}
|
2020-07-20 22:33:59 +00:00
|
|
|
|
|
|
|
{% block title %}
|
2022-05-31 02:43:42 +00:00
|
|
|
{% if feedings|length > 0 %}
|
2023-03-25 19:57:12 +00:00
|
|
|
<div id="feeding-days-carousel" class="carousel slide" data-bs-interval="false">
|
2022-05-31 02:43:42 +00:00
|
|
|
<div class="carousel-inner">
|
|
|
|
{% for feeding in feedings %}
|
|
|
|
<div class="carousel-item{% if forloop.counter == 1 %} active{% endif %}">
|
|
|
|
<div class="last-feeding-method text-center">
|
|
|
|
{% if feeding.total %}
|
2023-02-07 19:16:53 +00:00
|
|
|
{{ feeding.total|floatformat }}
|
2022-05-31 02:43:42 +00:00
|
|
|
{% else %}
|
|
|
|
{% trans "None" %}
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
<div class="text-center small">
|
2022-06-05 13:34:52 +00:00
|
|
|
{% if feeding.count > 0 %}
|
|
|
|
{% blocktrans trimmed count counter=feeding.count %}
|
|
|
|
{{ counter }} feeding
|
|
|
|
{% plural %}
|
|
|
|
{{ counter }} feedings
|
|
|
|
{% endblocktrans %}
|
|
|
|
{% endif %}
|
2022-05-31 02:43:42 +00:00
|
|
|
</div>
|
|
|
|
{% blocktrans trimmed with since=feeding.date.date|dayssince %}
|
2023-07-09 16:26:13 +00:00
|
|
|
<div class="text-center small text-body-secondary">
|
2022-05-31 02:43:42 +00:00
|
|
|
{{ since }}
|
|
|
|
</div>
|
|
|
|
{% endblocktrans %}
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% if feedings|length > 1 %}
|
2023-03-25 19:57:12 +00:00
|
|
|
<a class="carousel-control-prev"
|
|
|
|
href="#feeding-days-carousel"
|
|
|
|
role="button"
|
|
|
|
data-bs-slide="prev">
|
2022-05-31 02:43:42 +00:00
|
|
|
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
2023-03-25 19:57:12 +00:00
|
|
|
<span class="visually-hidden">{% trans "Previous" %}</span>
|
2022-05-31 02:43:42 +00:00
|
|
|
</a>
|
2023-03-25 19:57:12 +00:00
|
|
|
<a class="carousel-control-next"
|
|
|
|
href="#feeding-days-carousel"
|
|
|
|
role="button"
|
|
|
|
data-bs-slide="next">
|
2022-05-31 02:43:42 +00:00
|
|
|
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
2023-03-25 19:57:12 +00:00
|
|
|
<span class="visually-hidden">{% trans "Next" %}</span>
|
2022-05-31 02:43:42 +00:00
|
|
|
</a>
|
2020-07-20 22:33:59 +00:00
|
|
|
{% endif %}
|
2022-05-31 02:43:42 +00:00
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
{% trans "None" %}
|
|
|
|
{% endif %}
|
2020-07-20 22:33:59 +00:00
|
|
|
|
2022-05-31 02:43:42 +00:00
|
|
|
{% endblock %}
|