Add forms for adding recipes and versions
This commit is contained in:
parent
b898bc3ba5
commit
6853be4ed5
|
|
@ -2,6 +2,9 @@
|
|||
{% block title %}{{ recipe.title }}{% endblock %}
|
||||
{% block main %}
|
||||
<h1>{{ recipe.title }}</h1>
|
||||
{% if perms.recipes.add_recipe %}
|
||||
<p><a href="#">Add version</a></p>
|
||||
{% endif %}
|
||||
<ul>
|
||||
{% for v in versions %}
|
||||
<li><a href="{{ v.get_absolute_url }}">{{ v.label }}</a></li>
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@
|
|||
{% block title %}Recipes{% endblock %}
|
||||
{% block main %}
|
||||
<h1>Recipes</h1>
|
||||
{% if perms.recipes.add_recipe %}
|
||||
<p><a href="#">Add recipe</a></p>
|
||||
{% endif %}
|
||||
{% if perms.recipes.view_recipe %}
|
||||
<ul>
|
||||
{% for recipe in recipes %}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
{% extends "base_main.html" %}
|
||||
{% block title %}{{ recipe.title }}{% endblock %}
|
||||
{% block main %}
|
||||
<h1>{{ version.recipe.title }} ({{ version.label }})</h1>
|
||||
<h1>{{ version.recipe.title }}{% if has_multiple_versions %} ({{ version.label }}){% endif %}</h1>
|
||||
{% if has_multiple_versions %}
|
||||
<aside><a href="{{ recipe.get_absolute_url }}">Show all versions</a></aside>
|
||||
<p><a href="{{ recipe.get_absolute_url }}">Show all versions</a></p>
|
||||
{% endif %}
|
||||
{% if perms.recipes.add_recipe %}
|
||||
<p><a href="#">Add version</a></p>
|
||||
{% endif %}
|
||||
<ul>
|
||||
{% for i in ingredients %}
|
||||
|
|
|
|||
Loading…
Reference in a new issue