31 lines
996 B
Twig
31 lines
996 B
Twig
{% extends 'master.twig' %}
|
|
{% from 'macros.twig' import torrent_listing_entry %}
|
|
|
|
{% if filter_user is null %}
|
|
{% set title = 'Available Downloads' %}
|
|
{% else %}
|
|
{% set title = 'Downloads submitted by ' ~ filter_user.name %}
|
|
{% endif %}
|
|
|
|
{% set show_more = false %}
|
|
{% set last_id = 0 %}
|
|
|
|
{% block content %}
|
|
<div class="downloads">
|
|
<div class="downloads-header">{{ title }}</div>
|
|
<div class="downloads-listing">
|
|
{% if torrents is empty %}
|
|
<div class="downloads-nothing">Sorry, nothing.</div>
|
|
{% else %}
|
|
{% for torrent in torrents %}
|
|
{{ torrent_listing_entry(torrent, 'downloads-item') }}
|
|
{% set last_id = torrent.info.id %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% if show_more %}
|
|
<div class="downloads-more"><a href="{{ page_url }}start={{ last_id }}">View more</a></div>
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %}
|