1 {% extends 'pybb/base.html' %}
 
   3 {% load url from future %}
 
   5 {% load pybb_tags i18n %}
 
   7 {% block title %}{{ topic }}{% endblock %}
 
   9 {% block extra_script %}
 
  11     {% include "pybb/_markitup.html" %}
 
  12     <script type="text/javascript" src="{{ STATIC_URL }}pybb/js/jquery.formset.min.js"></script>
 
  15 {% block breadcrumb %}
 
  16     {% with object=topic %}
 
  17         {% include "pybb/breadcrumb.html" %}
 
  23         <h1>{{ topic.name }}</h1>
 
  25         {% include 'forum/related_lesson_info.html' with lesson=topic.edumed_topic.lesson %}
 
  27         {% with _('Posts') as label %}
 
  28             {% include "pybb/pagination.html" %}
 
  31         {% if topic.poll_type %}
 
  32             {% include 'pybb/poll.html' %}
 
  36             {% if first_post %}{% ifnotequal first_post post_list.0 %}
 
  37                 {% with first_post as post %}
 
  38                     <li class="first_post">{% include "pybb/post_template.html" %}</li>
 
  40             {% endifnotequal %}{% endif %}
 
  41             {% for post in post_list %}
 
  42                 {% cycle 'odd' 'even' as rowcolors silent %}
 
  43                 {% include "pybb/post_template.html" %}
 
  47         {% with _('Posts') as label %}
 
  48             {% include "pybb/pagination.html" %}
 
  51         {% if user.is_authenticated %}
 
  52             <div class="controls">
 
  53                 {% if user.is_moderator %}
 
  55                         <a href="{% url 'pybb:unstick_topic' topic.id %}">{% trans "Unstick topic" %}</a> /
 
  57                         <a href="{% url 'pybb:stick_topic' topic.id %}">{% trans "Stick topic" %}</a> /
 
  61                         <a href="{% url 'pybb:open_topic' topic.id %}">{% trans "Open topic" %}</a> /
 
  63                         <a href="{% url 'pybb:close_topic' topic.id %}">{% trans "Close topic" %}</a> /
 
  65                     {% if perms.pybb.change_topic and user.is_staff %}
 
  66                         <a href="{% url 'admin:pybb_topic_change' topic.id %}">{% trans 'Admin' %}</a> /
 
  69             <a href="{% url 'pybb:merge_topics' %}?topic={{ topic.id }}">{% trans 'Merge topics' %}</a> /
 
  73                 {% if user.is_subscribed %}
 
  74                     <a href="{% url 'pybb:delete_subscription' topic.id %}?from_topic">{% trans "Unsubscribe" %}</a>
 
  76                     <a href="{% url 'pybb:add_subscription' topic.id %}">{% trans "Subscribe" %}</a>
 
  81         {% if user.is_authenticated or PYBB_ENABLE_ANONYMOUS_POST %}
 
  82             {% pybb_get_profile user=user as user_profile %}
 
  84             {% if not user_profile.is_banned %}
 
  85                 {% if not topic.closed %}
 
  86                     {% include "pybb/post_form.html" %}
 
  90             {% include 'pybb/_need_to_login_message.html' %}
 
  93         {% if user.is_staff %}
 
  94             <div class="subscriber-list">
 
  95                 {% trans "Subscribers" %}:
 
  96                 {% for subscriber in topic.subscribers.all %}
 
  97                     <a href="{% url 'pybb:user' subscriber.username %}">{{ subscriber.username }}</a>,