{% extends "base.html" %} {% block content %}

{{ tr.t("pantry-title") }}

{% if !sections.is_empty() %}
{% endif %}
{% if !configured %}

{{ tr.t("pantry-no-config") }}

{{ tr.t("pantry-create-config") }}

{{ tr.t("pantry-configure") }}
{% else %}
{% for section in sections %}

{{ section.name }}

{% if section.items.is_empty() %}

{{ tr.t("pantry-no-items-section") }}

{% else %}
{% for item in section.items %}

{{ item.name }}

{{ tr.t("pantry-item-quantity-short") }} {% if let Some(quantity) = item.quantity %}{{ quantity }}{% else %}-{% endif %}
{{ tr.t("pantry-item-bought") }} {% if let Some(bought) = item.bought %}{{ bought }}{% else %}-{% endif %}
{{ tr.t("pantry-item-expire") }} {% if let Some(expire) = item.expire %}{{ expire }}{% else %}-{% endif %}
{{ tr.t("pantry-item-low") }} {% if let Some(low) = item.low %}{{ low }}{% else %}-{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{{ tr.t("pantry-total-sections") }} {{ sections.len() }}
{{ tr.t("pantry-edit-config") }}
{% endif %}
{% endblock %}