X-Git-Url: http://git.euphorik.ch/?p=recipes.git;a=blobdiff_plain;f=backend%2Ftemplates%2Fview_recipe.html;fp=backend%2Ftemplates%2Fview_recipe.html;h=aba5c69441d4f7b5fd97ee62ddf4998742cb7e02;hp=1a5ba523a2f9cbcce2c91e0502e992db220b7011;hb=cc2e5b6893b582b4b5c4e7a93e914a189f6a959b;hpb=adcf4a5a5d982489a7e91d4988401eb4512839a3 diff --git a/backend/templates/view_recipe.html b/backend/templates/view_recipe.html index 1a5ba52..aba5c69 100644 --- a/backend/templates/view_recipe.html +++ b/backend/templates/view_recipe.html @@ -4,12 +4,15 @@

{{ current_recipe.title }}

-{% match current_recipe.description %} - {% when Some with (description) %} -
- {{ description|markdown }} -
- {% when None %} -{% endmatch %} + +{% if user.is_some() && current_recipe.user_id == user.as_ref().unwrap().id %} + Edit +{% endif %} + +{% if !current_recipe.description.is_empty() %} +
+ {{ current_recipe.description.clone()|markdown }} +
+{% endif %} {% endblock %} \ No newline at end of file