Snips/templates/snip/single.html.twig

30 lines
1.0 KiB
Twig

{% extends 'base/base.html.twig' %}
{% block title %}Snip {{ snip }}{% endblock %}
{% block body %}
<a href="{{ path('snip_index') }}" class="btn btn-primary">
<i class="fa fa-arrow-left"></i> Back
</a>
{% if is_granted('edit', snip) %}
<a class="btn btn-warning" href="{{ path('snip_edit', {snip: snip.id}) }}">
<i class="fa fa-pencil" aria-hidden="true"></i> Edit
</a>
<a class="btn btn-info" href="{{ path('history_index', {snip: snip.id}) }}">
<i class="fa fa-history" aria-hidden="true"></i> History
</a>
{% endif %}
<a href="{{ path('snip_raw', {snip: snip.id}) }}" class="btn btn-danger">
<i class="fa fa-eye"></i> Raw
</a>
<br><br>
<div class="card" style="width: 100%;">
<h4 class="card-header">
{{ include('snip/badge.html.twig', {snip: snip}) }}
{{ snip }}
</h4>
<div class="card-body">
<p class="card-text">{{ content|nl2br }}</p>
</div>
</div>
{% endblock %}