{% extends "base.html" %} {% load i18n static wger_extras django_bootstrap_breadcrumbs crispy_forms_tags %} {% block title %}{{ingredient.name}}{% endblock %} {% block header %} {% endblock %} {% block breadcrumbs %} {{ block.super }} {% breadcrumb "Ingredients" "nutrition:ingredient:list" %} {% breadcrumb ingredient ingredient.get_absolute_url %} {% endblock %} {% block content %} {% if ingredient.status == ingredient.STATUS_PENDING %}

{% translate "Ingredient is pending review" %}

{% blocktranslate %}This user submitted ingredient is pending a decision to be included in the database. Till then, it will not be shown in the overview or the search.{% endblocktranslate %} {% if perms.nutrition.add_ingredient %}{% translate "Please select one of the options below." %}{% endif %}

{% if perms.nutrition.add_ingredient %}
{% translate "Accept" %} {% translate "Decline" %}
{% endif %} {# end check permissions #}
{% endif %} {# end ingredient is pending review #}
{% crispy form %}
{% translate "Macronutrients" %}
{% translate "Energy" %} {{ingredient.energy|floatformat:1}} {% translate "kcal" %} / {{ingredient.energy_kilojoule|floatformat:1}} {% translate "kJ" %}
{% translate "Protein" %} {{ingredient.protein|floatformat:1}} {% translate "g" context "weight unit, i.e. grams" %}
{% translate "Carbohydrates" %} {{ingredient.carbohydrates|floatformat}} {% translate "g" context "weight unit, i.e. grams" %}
{% translate "Sugar content in carbohydrates" %} {% if ingredient.carbohydrates_sugar %} {{ingredient.carbohydrates_sugar|floatformat:1}} {% translate "g" context "weight unit, i.e. grams" %} {% else %} {% translate "n.A." %} {% endif %}
{% translate "Fat" %} {{ingredient.fat|floatformat:1}} {% translate "g" context "weight unit, i.e. grams" %}
{% translate "Saturated fat content in fats" %} {% if ingredient.fat_saturated %} {{ingredient.fat_saturated|floatformat:1}} {% translate "g" context "weight unit, i.e. grams" %} {% else %} {% translate "n.A." %} {% endif %}
{% translate "Others" %}
{% translate "Fibres" %} {% if ingredient.fibres %} {{ingredient.fibres|floatformat:1}} {% translate "g" context "weight unit, i.e. grams" %} {% else %} {% translate "n.A." %} {% endif %}
{% translate "Sodium" %} {% if ingredient.sodium %} {{ingredient.sodium|floatformat:1}} {% translate "g" context "weight unit, i.e. grams" %} {% else %} {% translate "n.A." %} {% endif %}
{% endblock %} {% block sidebar %} {% if ingredient.status == ingredient.INGREDIENT_STATUS_ACCEPTED %}

{% translate "User submitted ingredient" %}

{% with username=ingredient.user.username %}

{% blocktranslate %}This exercise was submitted by {{username}}.{% endblocktranslate %} {% endwith %}

{% endif %} {% if perms.nutrition.delete_ingredient %}

{% translate "Weight units" %}

{% translate "Add new weight unit" %}

{% if ingredient.ingredientweightunit_set.exists %} {% for unit in ingredient.ingredientweightunit_set.select_related %} {% endfor %}
{% translate "Name" %}
{{unit.amount}} {{unit.unit.name}} = {{unit.gram}}g
{% endif %} {% endif %} {% license_sidebar ingredient.license ingredient.license_author %} {% endblock %} {# #} {# Options #} {# #} {% block options %} {% if perms.nutrition.delete_ingredient %}
{% endif %} {% endblock %}