{# vim: set ts=2 et sts=2 sw=2: #} {% extends "kbforums/base.html" %} {% from "layout/errorlist.html" import errorlist %} {% from "includes/common_macros.html" import content_editor %} {# L10n: {t} is the title of the thread. {d} is the name of the document. #} {% set title = _('{t} | {d} Discussion | Knowledge Base')|f(t=thread.title, d=document.title) %} {% set crumbs = [(url('wiki.category', document.category), document.get_category_display()), (document.get_absolute_url(), document.title), (url('wiki.discuss.threads', document.slug), _('Discuss')), (None, thread.title)] %} {% 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 perms.kbforums.edit_thread or (thread.creator == request.user and not thread.is_locked) %} {{ _('Edit') }} {% endif %} {% if perms.kbforums.delete_thread %} {{ _('Delete') }} {% endif %} {% if perms.kbforums.lock_thread %}
{{ csrf() }}
{% endif %} {% if perms.kbforums.sticky_thread %}
{{ csrf() }}
{% endif %}
{% if user.is_authenticated() %} {% endif %}
  1. {{ _('Author') }}
  2. {{ _('Message') }}
{% if posts %}
    {% for post in posts.object_list %}
  1. {% include "kbforums/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 "kbforums/includes/post.html" %}
{% endif %}
{% endblock %}