{% extends "site_base.html" %}
{% load thumbnail %}

{% block metas %}
    <title>{{ title }} - {{ settings.SITE_TITLE }}</title>
    <meta name="description" content="{{ description }}" />
{% endblock %}

{% block breadcrumbs %}
{% endblock %}

{% block content %}
<section id="forum">

  {% include "rforum/elements/forum-top.html" %}

  <ul class="breadcrumb">
	<li><i class="icon-home"></i> <a href="{% url app_forum-forum-index %}">{{ _('Index') }}</a> <span class="divider">/</span></li>
  </ul>

  <div class="forum">
	<table class="table table-bordered">
	  <thead>
		<tr>
		  <th colspan="2">{{ _('Forum') }}</th>
		  <th style="text-align: center;">{{ _('Topics') }}</th>
		  <th>{{ _('Last Post') }}</th>
		</tr>
	  </thead>
	  <tbody>
		{% for forum in myforum %}
		<tr>
		  <td style="text-align: center;"><img src="{{ STATIC_URL }}img/app_forum/forum.gif" alt="{{ forum.title }}"
		  title="{{ forum.title }}" style="margin-top: 8px" /></td>
		  <td>
			<a href="{% url app_forum-forum-detail forum.slug %}" class="forum-title">{{ forum.title }}</a>
			<p>{{ forum.description|safe }}</p>
			<p>{{ _('Moderators') }}: {% for moder in forum.moderators.all %} <a href="{% url app_forum-userprofile moder %}">{{ moder }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}</p>
		  </td>
		  <td style="text-align: center;">{{ forum.topics.count }}</td>
		  <td>{% if forum.topics.all.0.title %}<p><a href="{% url app_forum-topic-list forum.slug forum.topics.all.0.slug %}">{{ forum.topics.all.0.title }}</a></p><p>{{ forum.topics.all.0.date_modified }}</p>{% else %}---{% endif %}</td>
		</tr>
		{% endfor %}
	  </tbody>
	</table>
  </div>

  {% include "rforum/elements/forum-bottom.html" %}

</section>
{% endblock %}
