{% extends "base.html" %} {% load static %} {% load crispy_forms_tags %} {% load i18n %} {% load l10n %} {% load custom_tags %} {% block title %}{{ recipe.name }}{% endblock %} {% block extra_head %} {% include 'include/vue_base.html' %} {% endblock %} {% block content %}
{% recipe_rating recipe request.user as rating %}

{{ recipe.name }} {{ rating|safe }}

{% if request.user.is_authenticated %}
{% endif %}
{% if recipe.storage %} {% trans 'in' %} {{ recipe.storage.name }}
{% endif %} {% if recipe.internal %} {% trans 'by' %} {{ recipe.created_by.get_user_name }}
{% endif %} {% if recipe.keywords %} {% for x in recipe.keywords.all %} {{ x }} {% endfor %}

{% endif %} {% if recipe.working_time and recipe.working_time != 0 %} {% trans 'Preparation time ~' %} {{ recipe.working_time }} min {% endif %} {% if recipe.waiting_time and recipe.waiting_time != 0 %} {% trans 'Waiting time ~' %} {{ recipe.waiting_time }} min {% endif %} {% recipe_last recipe request.user as last_cooked %} {% if last_cooked %} {% trans 'Last cooked' %} {{ last_cooked|date }} {% endif %} {% if recipe.waiting_time and recipe.waiting_time != 0 or recipe.working_time and recipe.working_time != 0 or last_cooked %}

{% endif %}

{% trans 'Ingredients' %}


{% if recipe.image %}
{% trans 'Recipe Image' %}

{% endif %}
{% if recipe.nutrition %}

{% trans 'Nutrition' %}

{% trans 'Calories' %} {{ recipe.nutrition.calories|floatformat:2 }} kcal
{% trans 'Carbohydrates' %} {{ recipe.nutrition.carbohydrates|floatformat:2 }} g
{% trans 'Fats' %} {{ recipe.nutrition.fats|floatformat:2 }} g
{% trans 'Proteins' %} {{ recipe.nutrition.proteins|floatformat:2 }} g
{% if recipe.nutrition.source %} Source: {{ recipe.nutrition.source }} {% endif %}
{% endif %}

{% trans 'Instructions' %}


{% for s in recipe.steps.all %}
{% if recipe.steps.all|length > 1 %}
{% if s.type == 'TEXT' %} {% elif s.type == 'TIME' %} {% endif %} {% if s.name %}{{ s.name }}{% else %}{% trans 'Step' %} {{ forloop.counter }}{% endif %} {% if s.time != 0 %} - {{ s.time }} {% trans 'Minutes' %} {% endif %}
{% endif %}
{% if s.instruction %} {{ s.get_instruction_render | safe }} {% endif %}
{% endfor %}
{% if recipe.storage %}
{% if recipe.internal %}
{% trans 'View external recipe' %}
{% else %} {% if '.pdf' in recipe.file_path %}
{% endif %} {% if '.jpg' in recipe.file_path or '.png' in recipe.file_path or '.jpeg' in recipe.file_path %}
{% trans 'External recipe image' %}
{% endif %}
{% trans 'External recipe' %}

{% blocktrans %} This is an external recipe, which means you can only view it by opening the link above. You can convert this recipe to a fancy recipe by pressing the convert button. The original file will still be accessible. {% endblocktrans %}.

{% trans 'Convert now!' %} {% trans 'View external recipe' %}

{% endif %}
{% endif %} {% if request.user.userpreference.comments %}

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

{% endfor %} {% if request.user.is_authenticated %}
{% csrf_token %}
{% endif %} {% endif %} {% if recipe.storage %} {% include 'include/recipe_open_modal.html' %} {% endif %} {% include 'include/log_cooking.html' %} {% endblock %} {% block script %} {% endblock %}