{% macro render_column_header(header_class, header_style, center_text=False, sort_key=None, header_title=None) %} {% set class_suffix = (search.sort == sort_key) and ("_" + search.order) or "" %} {% set th_classes = filter_truthy([header_class, sort_key and "sorting" + class_suffix, center_text and "text-center"]) %} {% if sort_key %} {% endif %} {{ caller() }} {% endmacro %} {% if torrent_query.items %}
{% call render_column_header("hdr-category", "width:80px;", center_text=True) %}
Category
{% endcall %} {% call render_column_header("hdr-name", "width:auto;", sort_key="name") %}
Name
{% endcall %} {% call render_column_header("hdr-link", "width:70px;", center_text=True) %}
Link
{% endcall %} {% call render_column_header("hdr-size", "width:100px;", center_text=True, sort_key="size") %}
Size
{% endcall %} {% call render_column_header("hdr-date", "width:140px;", center_text=True, sort_key="id", header_title="In UTC") %}
Date
{% endcall %} {% if config.ENABLE_SHOW_STATS %} {% call render_column_header("hdr-seeders", "width:50px;", center_text=True, sort_key="seeders", header_title="Seeds") %} {% endcall %} {% call render_column_header("hdr-leechers", "width:50px;", center_text=True, sort_key="leechers", header_title="Leeches") %} {% endcall %} {% call render_column_header("hdr-downloads", "width:50px;", center_text=True, sort_key="downloads", header_title="Completed downloads") %} {% endcall %} {% endif %} {% for torrent in torrent_query.items %} {% set cat_id = (torrent.main_category.id|string) + '_' + (torrent.sub_category.id|string) %} {% set icon_dir = config.SITE_FLAVOR %} {% if config.ENABLE_SHOW_STATS %} {% endif %} {% endfor %}
{{ torrent.display_name | escape }} {% if torrent.has_torrent %}{% endif %} {{ torrent.filesize | filesizeformat(True) }} {{ torrent.created_time.strftime('%Y-%m-%d %H:%M') }}{{ torrent.stats.seed_count }} {{ torrent.stats.leech_count }} {{ torrent.stats.download_count }}
{% else %}

No results found

{% endif %}
{% from "bootstrap/pagination.html" import render_pagination %} {{ render_pagination(torrent_query) }}