{% extends 'core/card/title_card.html' %}

{% block card_title %}
    Recipies
{% endblock %}

{% block card_button %}
    {% if perms.cookbook_recipe.add_recipe %}
        {% url 'cookbook:recipe:page:form' pk=0 as recipe_form_url %}
        <span >{% include 'core/button/primary_dark_button.html' with button_text='New' button_icon='bi bi-plus' button_href=recipe_form_url %}</span>
    {% endif %}
{% endblock %}

{% block card_title_content %}
    {% if recipes %}
        {% for recipe in recipes %}
            {% include 'cookbook/recipe/item/recipe_item.html' %}
        {% endfor %}
    {% else %}
        {% include 'core/item/no_data_item.html' %}
    {% endif %}
{% endblock %}