django-project/recipes/templates/version.html
Benjamin acbcf3f606 fixup! Add forms for adding recipes and versions
Basic form for adding a version. Still needs:

* Check of slug uniqueness
* Choose between author user or author name
* slug auto-creation
* ingredients

TODO:

* Add recipe
2023-02-17 16:41:22 +01:00

18 lines
547 B
HTML

{% extends "base_main.html" %}
{% block title %}{{ recipe.title }}{% endblock %}
{% block main %}
<h1>{{ version.recipe.title }}{% if has_multiple_versions %} ({{ version.label }}){% endif %}</h1>
{% if has_multiple_versions %}
<p><a href="{{ recipe.get_absolute_url }}">Show all versions</a></p>
{% endif %}
{% if perms.recipes.add_recipe %}
<p><a href="{% url 'add-version' recipe.slug %}">Add version</a></p>
{% endif %}
<ul>
{% for i in ingredients %}
<li>{{ i.text }}</li>
{% endfor %}
</ul>
<p>{{ version.body }}</p>
{% endblock %}