Snips/templates/snip/index.html.twig

23 lines
835 B
Twig

{% extends 'base/single.column.html.twig' %}
{% block body %}
<a class="btn btn-success" href="{{ path('snip_new') }}">
<i class="fa fa-plus"></i> Add
</a>
<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>
{% if snip.createdBy == app.user %}
{{ include('snip/badge.html.twig', {snip: snip}) }}
{% endif %}
{{ snip }}
</span>
{% if snip.createdBy != app.user %}
{{ include('user/badge.html.twig', {user: snip.createdBy}) }}
{% endif %}
</a>
{% endfor %}
</div>
{% endblock %}