{% extends "cranefly/layout.html" %} {% import "cranefly/macros.html" as macros with context %} {% block title %}{{ macros.page_title(title=_('Popular Threads')) }}{% endblock %} {% block container %}
{% if threads %}
{% if user.is_authenticated() and list_form %} {% endif %} {% for thread in threads %} {% endfor %}
{% trans %}Thread{% endtrans %} {% trans %}Rating{% endtrans %} {% trans %}Activity{% endtrans %}
{{ thread.name }} {% trans user=thread_starter(thread), forum=thread_forum(thread), start=thread.start|reltimesince|low %}by {{ user }} in {{ forum }} {{ start }}{% endtrans %}
    {% if thread.weight == 2 %}
  • {% endif %} {% if thread.weight == 1 %}
  • {% endif %} {% if thread.closed %}
  • {% endif %}
{% if (thread.upvotes-thread.downvotes) > 0 %}+{% elif (thread.upvotes-thread.downvotes) < 0 %}-{% endif %}{{ (thread.upvotes-thread.downvotes)|abs|intcomma }}
{{ replies(thread.replies) }} - {% trans user=thread_reply(thread), last=thread.last|reltimesince|low %}last by {{ user }} {{ last }}{% endtrans %}
{% else %}

{% trans %}Looks like there are no popular threads... yet!{% endtrans %}

{% endif %}
{% endblock %} {% macro replies(thread_replies) -%} {% trans count=thread_replies, replies=('' ~ (thread_replies|intcomma) ~ '')|safe -%} {{ replies }} reply {%- pluralize -%} {{ replies }} replies {%- endtrans %} {%- endmacro %} {% macro thread_starter(thread) -%} {% if thread.start_poster_id %}{{ thread.start_poster_name }}{% else %}{{ thread.start_poster_name }}{% endif %} {%- endmacro %} {% macro thread_forum(thread) -%} {{ thread.forum.name }} {%- endmacro %} {% macro thread_reply(thread) -%} {% if thread.last_poster_id %}{{ thread.last_poster_name }}{% else %}{{ thread.last_poster_name }}{% endif %} {%- endmacro %} {% macro pager() -%} {% if items_total > 0 and pagination['total'] > 1 %} {% endif %} {%- endmacro %}