Change the snip layout to make it less cluttered
This commit is contained in:
@ -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 %}
|
Reference in New Issue
Block a user