magnetico-web/templates/torrent_list.html.twig

32 lines
920 B
Twig
Raw Normal View History

{% block content %}
<div class="pagination">
{{ pagerfanta(torrents) }}
</div>
<table class="table">
<thead>
<th scope="col">Name</th>
<th scope="col">Size</th>
<th scope="col">Discovered</th>
<th scope="col">Link</th>
</thead>
{# @var torrent \App\Entity\Torrent #}
{% for torrent in torrents %}
<tr>
<td>
<a href="{{ path('torrent_show', {'id': torrent.id}) }}">{{ torrent.name }}</a>
</td>
<td>{{ torrent.totalSize | readable_size }}</td>
<td>{{ torrent.discoveredOn | date('Y-m-d H:i:s')}}</td>
<td>
<a href="{{ magnet(torrent.name, torrent.infoHashAsHex) }}">&#128279;</a>
</td>
</tr>
{% endfor %}
</table>
<div class="pagination">
{{ pagerfanta(torrents) }}
</div>
{% endblock %}