Snips/templates/snip/index.html.twig
2025-04-27 21:02:20 +02:00

25 lines
885 B
Twig

{% extends 'base/one.column.html.twig' %}
{% set title = 'My Snips' %}
{% block body %}
<a class="btn btn-success" href="{{ path('snip_new') }}">
<i class="fa fa-plus"></i> Add
</a>
{% if request.onlyVisible %}
<a class="btn btn-secondary" href="{{ path('snip_index', {onlyVisible: false}) }}">Show hidden</a>
{% else %}
<a class="btn btn-secondary" href="{{ path('snip_index', {onlyVisible: true}) }}">Hide hidden</a>
{% endif %}
<br><br>
<div class="list-group">
{% for snip in snips %}
<a class="list-group-item d-flex justify-content-between" href="{{ path('snip_single', {snip: snip.id}) }}">
<span>
{{ include('snip/badge.html.twig', {snip: snip}) }}
{{ snip }}
</span>
</a>
{% endfor %}
</div>
{% endblock %}