Recipe edit (WIP): add API to set some recipe values
This commit is contained in:
parent
c6dfff065c
commit
dd05a673d9
20 changed files with 690 additions and 2189 deletions
50
backend/templates/recipes_list_fragment.html
Normal file
50
backend/templates/recipes_list_fragment.html
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{% macro recipe_item(id, title, class) %}
|
||||
<a href="/recipe/view/{{ id }}" class="{{ class }}" id="recipe-{{ id }}">
|
||||
{% if title == "" %}
|
||||
{# TODO: Translation #}
|
||||
Untitled recipe
|
||||
{% else %}
|
||||
{{ title }}
|
||||
{% endif %}
|
||||
</a>
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
<div id="recipes-list">
|
||||
|
||||
{% if !recipes.unpublished.is_empty() %}
|
||||
Unpublished recipes
|
||||
{% endif %}
|
||||
|
||||
<nav class="recipes-list-unpublished">
|
||||
<ul>
|
||||
{% for (id, title) in recipes.unpublished %}
|
||||
<li>
|
||||
{% if recipes.is_current(id) %}
|
||||
{% call recipe_item(id, title, "recipe-item-current") %}
|
||||
{% else %}
|
||||
{% call recipe_item(id, title, "recipe-item") %}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
{% if !recipes.unpublished.is_empty() %}
|
||||
<hr />
|
||||
{% endif %}
|
||||
|
||||
<nav class="recipes-list-published">
|
||||
<ul>
|
||||
{% for (id, title) in recipes.published %}
|
||||
<li>
|
||||
{% if recipes.is_current(id) %}
|
||||
{% call recipe_item(id, title, "recipe-item-current") %}
|
||||
{% else %}
|
||||
{% call recipe_item(id, title, "recipe-item") %}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue