magnetico-web/templates/torrent_list.html.twig
2018-07-01 04:03:34 +03:00

33 lines
1.1 KiB
Twig

{% block content %}
{% import 'sortable_table_macro.html.twig' as sortable %}
<div class="pagination">
{{ pagerfanta(torrents) }}
</div>
<table class="table table-hover" id="table-torrents-list">
<thead class="thead-light">
<tr>
{{ sortable.sortable_columns({
'<i class="fas fa-magnet"></i>': null,
'Name': 'name',
'Size': 'totalSize',
'Discovered': 'discoveredOn'
}) }}
</tr>
</thead>
{# @var torrent \App\Magnetico\Entity\Torrent #}
{% for torrent in torrents %}
<tr>
<td><a href="{{ magnet(torrent.name, torrent.infoHash) }}">&#128279;</a></td>
<td><a href="{{ path('torrents_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 %}