{% extends "fretboard/base.html" %}
{% load paginator %}

{% block title %}{{ FORUM_BASE_NAME }}: {{ forum_name }}{% ifnotequal page 1 %} (page {{ page }}){% endifnotequal %} | {% endblock %}

{% block description %}{{ forum_name }}{% ifnotequal page 1 %} (page {{ page }}){% endifnotequal %} on {{ block.super }}{% endblock %}

{% block bodyid %}topics{% endblock %}

{% block content %}
  {% if authenticated_request and can_add_topic and forum_slug %}
    <a href="{% url 'add_topic' forum_slug %}" class="button right icon-add">
      Add A Topic
    </a>
  {% else %}
    {% if not authenticated_request %}
      {% include "includes/signin_reg.html" %}
    {% endif %}
  {% endif %}

  <h1>{{ forum_name }}{% ifnotequal page 1 %} page {{ page }}{% endifnotequal %}</h1>
  
  {% if admin_msg %}<h2 class="alert">{{ admin_msg|safe }}</h2>{% endif %}
  
  <div id="topic_list">
    {% block topic_list %}
      {% include "fretboard/includes/topic_list.html" %}
    {% endblock topic_list %}
  </div>
  <p>
    <span class="is_paginated clear right button-bar thinline divided">{% paginator 3 %}</span>
  </p>
{% endblock %}

{% block init_forum_js %}
  var topiclist = true;
{% endblock %}

