{% extends "cranefly/layout.html" %} {% import "cranefly/macros.html" as macros with context %} {% block title %}{{ macros.page_title(title=_('Threads you are watching')) }}{% endblock %} {% block container %}
{% if message %}
{{ macros.draw_message(message) }}
{% endif %} {% if threads %}
{{ pager() }} {% for thread in threads %} {% endfor %}
{% trans %}Thread{% 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 %}
{{ replies(thread.replies) }} - {% trans user=thread_reply(thread), last=thread.last|reltimesince|low %}last by {{ user }} {{ last }}{% endtrans %}
{{ pager() }}
{% else %}

{% if new -%} {% trans %}There are no unread threads that you are watching.{% endtrans %} {%- else -%} {% trans %}You are not watching any threads.{% endtrans %} {%- endif %}

{% endif %}
{% endblock %} {% macro thread_new(thread) -%} {% if thread.forum_id == private_threads.pk %} {% url 'private_thread_new' thread=thread.pk, slug=thread.slug %} {% elif thread.forum_id == reports.pk %} TODO! {% else %} {% url 'thread_new' thread=thread.pk, slug=thread.slug %} {% endif%} {%- endmacro%} {% macro thread_start(thread) -%} {% if thread.forum_id == private_threads.pk %} {% url 'private_thread' thread=thread.pk, slug=thread.slug %} {% elif thread.forum_id == reports.pk %} TODO! {% else %} {% url 'thread' thread=thread.pk, slug=thread.slug %} {% endif%} {%- endmacro%} {% 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) -%}{% filter trim %} {% if thread.forum_id == private_threads.pk %} {% trans %}Private Threads{% endtrans %} {% elif thread.forum_id == reports.pk %} TODO! {% else %} {{ thread.forum.name }} {% endif%} {% endfilter %}{%- endmacro %} {% macro thread_reply(thread) -%} {% if thread.last_poster_id %}{{ thread.last_poster_name }}{% else %}{{ thread.last_poster_name }}{% endif %} {%- endmacro %} {% macro pager() -%} {% if pagination['total'] > 1 %} {% endif %} {%- endmacro %} {% macro delete_retreat(loop) -%} {%- if pagination['page'] == 1 -%} {{ request_path }}{% if not (loop.first and loop.last) %}#watch-{{ loop.index }}{% endif %} {%- else -%} {%- if loop.first and loop.last -%} {%- if new -%} {%- if pagination['prev'] > 1 %}{% url 'watched_threads_new' page=pagination['prev'] %}{% else %}{% url 'watched_threads_new' %}{% endif %} {%- else -%} {%- if pagination['prev'] > 1 %}{% url 'watched_threads' page=pagination['prev'] %}{% else %}{% url 'watched_threads' %}{% endif %} {%- endif -%}#watch-{{ settings.threads_per_page }} {%- else -%} {{ request_path }}#watch-{{ loop.index }} {%- endif -%} {%- endif -%} {%- endmacro %}