{% extends 'forum/base.html' %}
{% block stage %}
<div class="main_container">
  <div class="container">
    <div class="row middle_container">
      {% include 'forum/left_menu.html' %}
      <div class="main_left_container col-md-9 col-md-pull-3 col-sm-9 col-sm-pull-3 col-sm-8 col-xs-12">
        <div class="panel panel-default">
          <div class="panel-body">
            <!-- category section starts here-->
            <div class="Users_container  row">
              <h3 class="create_topic_heading">All Categories</h3>
              <div class="user_table_row category_row">
                <div class="table-responsive">
                {% if categories %}
                  <table class="table table-hover">
                    <thead>
                      <tr>
                        <th>Category</th>
                        <th>Description</th>
                        <th>Topics</th>
                      </tr>
                    </thead>
                    <tbody>
                    {% for category in categories %}
                      <tr>
                        <td><a href="{% url "django_simple_forum:forum_category_detail" category.slug %}" class="disclosure" style='background:{{ category.color }}!important;'>{{category.title}}</a></td>
                        <td>{{category.description|safe}}</td>
                        <td><a href="#">{{ category.get_topics|length }}</a></td>
                      </tr>
                      {% endfor %}
                    </tbody>
                  </table>
                {% else %}
                  No Categories Available Here
                {% endif %}
                </div>
              </div>
            </div>
            <!-- category section ends here-->
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
{% endblock %}