Change the snip layout to make it less cluttered

This commit is contained in:
Tim
2025-05-24 00:02:23 +02:00
parent 797d7a2e8f
commit 5fcc32de6d
6 changed files with 111 additions and 76 deletions

View File

@ -1,21 +1,27 @@
{% extends 'base/one.column.html.twig' %}
{% extends 'snip/base.html.twig' %}
{% if snip.id %}
{% set title = 'Edit Snip ' ~ snip %}
{% set title %}{{ snip }} - Edit{% endset %}
{% else %}
{% set title = 'Create Snip' %}
{% endif %}
{% set active = 'edit' %}
{% block body %}
{% if snip.id %}
<a href="{{ path('snip_single', {snip: snip.id}) }}" class="btn btn-primary">
<i class="fa fa-arrow-left"></i>
Back
{% 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 %}
<a href="{{ path('snip_index') }}" class="btn btn-info">
<i class="fa fa-list"></i>
Index
</a><br><br>
{% endblock %}
{% block cardbody %}
{{ form(form) }}
{% endblock %}