{# vim: set ts=2 et sts=2 sw=2: #} {% extends "forums/base.html" %} {% from "layout/errorlist.html" import errorlist %} {% from "includes/common_macros.html" import content_editor %} {# L10n: {t} is the title of the thread. {f} is the name of the forum. #} {% set title = _('{t} | {f} | Forums')|f(t=thread.title, f=forum.name) %} {% set crumbs = [(url('forums.forums'), _('Forums')), (url('forums.threads', forum.slug), forum.name), (None, thread.title)] %} {% set canonical_url = thread.get_absolute_url() %} {% if posts.number > 1 %} {% set canonical_url = canonical_url|urlparams(page=posts.number) %} {% endif %} {% block content %}

{{ thread.title }}

{% if thread.is_sticky %}{{ _('Sticky') }}{% endif %} {% if thread.is_locked %}{{ _('Locked') }}{% endif %} {% if is_watching_thread %}{{ _('Watching') }}{% endif %}
{% if user.is_authenticated() %}
{{ csrf() }} {% if is_watching_thread %} {% set watch = _('Stop watching') %} {% else %} {% set watch = _('Watch this thread') %} {% endif %}
{% endif %} {% if not thread.is_locked and has_perm_or_owns('forums_forum.thread_edit_forum', thread, forum) %} {{ _('Edit') }} {% endif %} {% if has_perm('forums_forum.thread_delete_forum', forum) %} {{ _('Delete') }} {% endif %} {% if has_perm('forums_forum.thread_locked_forum', forum) %}
{{ csrf() }}
{% endif %} {% if has_perm('forums_forum.thread_sticky_forum', forum) %}
{{ csrf() }}
{% endif %} {% if has_perm('forums_forum.thread_move_forum', forum) %}
{{ csrf() }}
{% endif %}
{% if user.is_authenticated() %} {% endif %}
  1. {{ _('Author') }}
  2. {{ _('Message') }}
{% if posts %}
    {% for post in posts.object_list %}
  1. {% include "forums/includes/post.html" %}
  2. {% endfor %}
{{ posts|paginator }} {% else %}

{{ _('Oh, no! Looks like there are no posts!') }}

{% endif %} {% if user.is_authenticated() and not thread.is_locked %}

{{ _('Post a reply') }}

{{ csrf() }} {{ errorlist(form) }} {{ content_editor(form.content) }}
{% elif user.is_authenticated() and thread.is_locked %}

{{ _('Post a reply') }}

{{ _('This thread has been locked. It is no longer possible to post new replies.') }}

{% endif %} {% if reply_preview %}

{{ _('Reply Preview:') }}

  1. {% set post = reply_preview %} {% include "forums/includes/post.html" %}
{% endif %}
{% endblock %}