{{ recipe.title }}
{% if let Some(user) = context.user %} {% if crate::data::model::can_user_edit_recipe(user, recipe) %} Edit {% endif %} {% endif %} {{ context.tr.t(Sentence::CalendarAddToPlanner) }} {% match recipe.servings %} {% when Some(servings) %} {% if *servings == 1 %} {{ context.tr.t(Sentence::RecipeOneServing) }} {% else %} {{ context.tr.tp(Sentence::RecipeSomeServings, [Box::new(**servings)]) }} {% endif %} {% else %} {% endmatch %} {% match recipe.estimated_time %} {% when Some(time) %} {{ time ~}} {{~ context.tr.t(Sentence::RecipeEstimatedTimeMinAbbreviation) }} {% else %} {% endmatch %} {% match recipe.difficulty %} {% when common::ron_api::Difficulty::Unknown %} {% when common::ron_api::Difficulty::Easy %} {{ context.tr.t(Sentence::RecipeDifficultyEasy) }} {% when common::ron_api::Difficulty::Medium %} {{ context.tr.t(Sentence::RecipeDifficultyMedium) }} {% when common::ron_api::Difficulty::Hard %} {{ context.tr.t(Sentence::RecipeDifficultyHard) }} {% endmatch %} {% if !recipe.description.is_empty() %}
{{ recipe.description | markdown }}
{% endif %}
{% for group in recipe.groups %}
{{ group.name }}
{% for step in group.steps %}
{% for ingredient in step.ingredients %}
{% if let Some(quantity) = ingredient.quantity_value %}
{{ quantity ~}}
{{~ ingredient.quantity_unit }}
{% endif ~%}
{{~ ingredient.name }}
{% endfor %}
{{ step.action }}
{% endfor %}