Snips/templates/snip/index.html.twig
tim 004044022d Allow browsing public snips
Fixed big with branch name not existing if nothing committed
2023-04-06 20:30:11 +02:00

23 lines
796 B
Twig

{% extends 'base/base.html.twig' %}
{% block title %}{{ title }}{% endblock %}
{% block body %}
<h1>{{ title }}</h1>
<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" href="{{ path('snip_single', {snip: snip.id}) }}">
{% if snip.createdBy == app.user %}
{{ include('snip/badge.html.twig', {snip: snip}) }}
{% endif %}
{{ snip }}
{% if snip.createdBy != app.user %}
{{ include('user/badge.html.twig', {user: snip.createdBy}) }}
{% endif %}
</a>
{% endfor %}
</div>
{% endblock %}