{% extends 'snip/base.html.twig' %}

{% set title %}{{ snip }} - Edit{% endset %}
{% set active = 'edit' %}

{% block buttons %}
    {% if is_granted('edit', snip) %}
        <a href="{{ path('snip_archive', {snip: snip.id}) }}" class="btn btn-secondary">
            {% if snip.archived %}
                <i class="fa fa-undo"></i> Unarchive
            {% else %}
                <i class="fa fa-archive"></i> Archive
            {% endif %}
        </a>
        <a href="{{ path('snip_delete', {snip: snip.id}) }}" class="btn btn-danger">
            <i class="fa fa-trash"></i> Delete
        </a>
    {% endif %}
{% endblock %}

{% block cardbody %}
    {{ form(form) }}
{% endblock %}