{% from 'common/macros.html' import timestamp, subheader, pager %} {%- extends 'base.html' -%} {%- block title -%}browsing topic {{topic.name}}{%- endblock -%} {%- block content -%} {%- set td -%} {%- endset -%} {%- call() subheader(('Threads in "%s"' % topic.name), td) -%}
Actions {%- if is_logged_in() and get_active_user().can_post_to_topic(topic) -%} New thread {%- endif -%} Subscribe via RSS
{%- if is_mod() -%}
Moderation actions Edit
{%- endif -%} {%- if threads | length > 0 -%}
Page {{- pager(page, page_count, args=request.args) -}}
{%- endif -%} {%- endcall -%} {%- if threads | length == 0 -%}

There are no threads in this topic yet.{%- if is_logged_in() and get_active_user().can_post_to_topic(topic) %} Be the first to start a discussion!{%- endif -%}

{%- endif -%} {%- for thread in threads -%}
{{thread.title}} {%- if thread.posts_count / 10 > 1 -%} {{pager(0, (((thread.posts_count / 10) | round(0, 'ceil') )| int), 'flex-last', url=url_for('threads.thread', slug=thread.slug))}} {%- endif -%}
Started by {{thread.started_by_display_name if thread.started_by_display_name else thread.started_by}} on {{timestamp(thread.created_at)}} {{thread.posts_count}} {{'repl' | pluralize(thread.posts_count, 'y', 'ies')}} Latest post by {{thread.latest_post_display_name if thread.latest_post_display_name else thread.latest_post_username}} on {{timestamp(thread.latest_post_created_at)}}{{' (OP)' if thread.posts_count == 1 else ''}}
{%- endfor -%} {%- if threads | length > 0 -%}
Page {{- pager(page, page_count, args=request.args) -}}
{%- endif -%} {%- endblock -%}