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

32 lines
940 B
Twig

{% extends 'base/one.column.html.twig' %}
{% set title = 'Snip compare ' ~ snip %}
{% block body %}
<a href="{{ path('snip_single', {snip: snip.id}) }}" class="btn btn-primary">
<i class="fa fa-arrow-left"></i> Back
</a>
<br><br>
<table class="table table-sm table-hover">
<thead>
<tr>
<th>Line</th>
<th>Type</th>
<th>Old</th>
<th>New</th>
</tr>
</thead>
<tbody>
{% for line in diff %}
<tr>
<td>{{ line.line }}.</td>
<td class="table-{{ line.type == 'insert' ? 'success' : (line.type == 'delete' ? 'danger' : 'info') }}">
{{ line.type }}
</td>
<td>{{ line.from }}</td>
<td>{{ line.to }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}