magnetico-web/templates/torrent_show.html.twig
2019-10-21 02:00:43 +03:00

44 lines
1.3 KiB
Twig

{% extends 'base.html.twig' %}
{% block content %}
{# @var torrent \App\Magnetico\Entity\Torrent #}
<table class="table">
<tr>
<td>Name</td>
<td>{{ torrent.name }}</td>
</tr>
<tr>
<td>Magnet</td>
<td>
<a href="{{ magnet(torrent.infoHash, torrent.name) }}"><code>{{ torrent.infoHash }}</code></a>
(<a href="{{ path('magnet_redirect', {'infoHash': torrent.infoHash}) }}">Redirect</a>)
</td>
</tr>
<tr>
<td>Size</td>
<td><abbr title="{{ torrent.totalSize }} bytes">{{ torrent.totalSize | readable_size }}</abbr></td>
</tr>
<tr>
<td>Discovered</td>
<td>{{ torrent.discoveredOn | date('Y-m-d H:i:s')}}</td>
</tr>
</table>
<table class="table">
<thead>
<tr>
<th scope="col">File</th>
<th scope="col">Size</th>
</tr>
</thead>
<tbody>
{# @var file \App\Magnetico\Entity\File #}
{% for file in torrent.files | sort %}
<tr>
<td>{{ file.path }}</td>
<td>{{ file.size | readable_size }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}