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


{% block title %}{% trans "Ingredient overview" %}{% endblock %}


{% block content %}
{% if ingredients %}
<ul data-role="listview">
    {% for ingredient in ingredients %}
    <li>
        <a href="{{ ingredient.get_absolute_url }}">{{ ingredient.name }}</a>
    </li>
    {% endfor %}
</ul>
{% else %}
    <div class="box warning">
        {% trans "No ingredients." %} {% trans "Use link to add one." %}
    </div>
{% endif %}


<div style="padding-top:3em;"></div>
{% pagination ingredients page_range %}


{% endblock %}

{% block sidebar %}
{% if perms.exercises %}
<h3>{% trans "Options" %}</h3>
<p>
       <a href="{% url 'ingredient-add' %}">
       <img src="{% static 'images/icons/new.svg' %}"
            width="32"
            height="32"
            alt="{% trans 'Add ingredient' %}"
            title="{% trans 'Add ingredient' %}">
       {% trans "Add ingredient" %}
       </a>
</p>
{% endif %}
{% endblock %}
