{% 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 (use_elastic and torrent_query.hits.total > 0) or (torrent_query.items) %}
{% call render_column_header("hdr-category", "width:80px;", center_text=True) %}
Category
{% endcall %} {% call render_column_header("hdr-name", "width:auto;") %}
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 %} {% set torrents = torrent_query if use_elastic else torrent_query.items %} {% for torrent in torrents %} {% set cat_id = (torrent.main_category_id|string) + '_' + (torrent.sub_category_id|string) if use_elastic else (torrent.main_category.id|string) + '_' + (torrent.sub_category.id|string) %} {% set icon_dir = config.SITE_FLAVOR %} {% if use_elastic %} {% else %} {% endif %} {% if use_elastic %} {% else %} {% endif %} {% if config.ENABLE_SHOW_STATS %} {% if use_elastic %} {% else %} {% endif %} {% endif %} {% endfor %}
{% if use_elastic %} {% else %} {% endif %} {%if "highlight" in torrent.meta %}{{ torrent.meta.highlight.display_name[0] | safe }}{% else %}{{torrent.display_name}}{%endif%}{{ torrent.display_name | escape }} {% if torrent.has_torrent %}{% endif %} {% if use_elastic %} {% else %} {% endif %} {{ torrent.filesize | filesizeformat(True) }}{{ torrent.created_time | display_time }}{{ torrent.created_time.strftime('%Y-%m-%d %H:%M') }}{{ torrent.seed_count }} {{ torrent.leech_count }} {{ torrent.download_count }}{{ torrent.stats.seed_count }} {{ torrent.stats.leech_count }} {{ torrent.stats.download_count }}
{% else %}

No results found

{% endif %}
{% if use_elastic %} {{ pagination.info }} {{ pagination.links }} {% else %} {% from "bootstrap/pagination.html" import render_pagination %} {{ render_pagination(torrent_query) }} {% endif %}