{% extends "base.html" %}
{% load i18n staticfiles wger_extras %}

{% block title %}{% trans "Your nutrition plans" %}{% endblock %}


{% block content %}
<div class="list-group">
    {% for plan in plans %}
        <a href="{{ plan.get_absolute_url }}" class="list-group-item wger-list-group-item">
            <span class="glyphicon glyphicon-chevron-right pull-right"></span>

            <h3 class="list-group-item-heading">{{plan}}</h4>
            <p class="list-group-item-text">
                {{ plan.creation_date }} –
                {{ plan.get_nutritional_values.total.energy|floatformat }} {% trans "kcal" %}
            </p>
        </a>
    {% empty %}
        <a href="{% url 'nutrition:plan:add' %}" class="list-group-item wger-list-group-item">
        {% trans "No nutrition plans." %}<br>
            {% trans "Add one now." %}
        </a>
    {% endfor %}
</div>
{% endblock %}



{% block sidebar%}
<h4>{% trans "Options" %}</h4>
<p>
    <a href="{% url 'nutrition:plan:add' %}" {% auto_link_css flavour %}>
    <img src="{% static 'images/icons/new.svg' %}"
         width="32"
         height="32"
         alt="{% trans 'Add nutrition plan' %}"
         title="{% trans 'Add nutrition plan' %}">
        {% trans "Add nutrition plan" %}</a>
</p>

<p>
    <a href="{% url 'nutrition:ingredient:list' %}" {% auto_link_css flavour %}>
    <img src="{% static 'images/icons/list.svg' %}"
         width="32"
         height="32"
         alt="{% trans 'Ingredient overview' %}"
         title="{% trans 'Ingredient overview' %}">
    {% trans "Ingredient overview" %}
    </a>
</p>
{% endblock %}
