{% extends "base.html" %} {% load crispy_forms_tags %} {% load i18n %} {% load custom_tags %} {% block title %}{% trans 'View' %}{% endblock %} {% block content %}

{{ recipe.name }}

{% if recipe.storage %} {% trans 'in' %} {{ recipe.storage.name }}

{% else %} {% trans 'by' %} {{ recipe.created_by.username }}

{% endif %} {% if recipe.all_tags %} {{ recipe.all_tags }}

{% endif %} {% if ingredients %}
{% trans 'Ingredients' %}
{% for i in ingredients %} {{ i.amount }} {{ i.unit }} {{ i.ingredient.name }}
{% endfor %}


{% endif %} {% if recipe.instructions %} {{ recipe.instructions | markdown | safe }} {% endif %} {% if recipe.storage %} {% trans 'Open recipe' %} {% endif %}

{% trans 'Comments' %}
{% csrf_token %} {{ form|crispy }}
{% for c in comments %}
{{ c.updated_at }} {% trans 'by' %} {{ c.created_by.username }}
{{ c.text }}

{% endfor %} {% if not ingredients %} {% include 'include/recipe_open_modal.html' %} {% endif %} {% endblock %}