33 lines
1.1 KiB
Twig
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) }}">🔗</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 %} |