magnetico-web/templates/torrent_list.html.twig

30 lines
908 B
Twig
Raw Normal View History

{% block content %}
<div class="pagination">
{{ pagerfanta(torrents) }}
</div>
<table class="table">
<thead>
<tr>
<th scope="col">&#128279;</th>
<th scope="col">Name</th>
<th scope="col">Size</th>
<th scope="col">Discovered</th>
</tr>
</thead>
{# @var torrent \App\Entity\Torrent #}
{% for torrent in torrents %}
<tr>
<td><a href="{{ magnet(torrent.name, torrent.infoHashAsHex) }}">&#128279;</a></td>
<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>
</tr>
{% endfor %}
</table>
<div class="pagination">
{{ pagerfanta(torrents) }}
</div>
{% endblock %}