Split db::Connection implementation in submodules (db::user and db::recipe).

This commit is contained in:
Greg Burri 2024-12-18 23:10:19 +01:00
parent 4248d11aa9
commit fce4eade73
17 changed files with 1307 additions and 1234 deletions

View file

@ -0,0 +1,18 @@
{% extends "base_with_list.html" %}
{% block content %}
<h2 class="recipe-title" >{{ recipe.title }}</h2>
{% if user.is_some() && recipe.user_id == user.as_ref().unwrap().id %}
<a class="edit-recipe" href="/recipe/edit/{{ recipe.id }}" >Edit</a>
{% endif %}
{% if !recipe.description.is_empty() %}
<div class="recipe-description" >
{{ recipe.description.clone()|markdown }}
</div>
{% endif %}
{% endblock %}