{% extends 'lbforum/profile/base.html' %}

{% load i18n %}
{% load lbforum_filters %}
{% load lbforum_tags %}
{% load el_pagination_tags %}

{% block title %}
  {% blocktrans %}{{ view_user.lbforum_profile }}'s topics{% endblocktrans %}
{% endblock %}

{% block content_content %}
  {% include 'lbforum/profile/inc_base_profile.html' %}
  <div class="sep20"></div>
  {% paginate topics %}
  {% get_pages %}
  <div class="box">
    <div class="cell"><span class="fade">{% blocktrans %}Topics by{% endblocktrans %} {{ view_user.lbforum_profile }}</span></div>
    <div class="cell">
      <table width="100%" cellspacing="0" cellpadding="5" border="0" class="topics">
        <tbody>
          <tr>
            <th width="50" align="right">{% trans "replies" %}</th>
            <th width="auto" align="left">{% trans "topics" %}</th>
            <th width="200" align="left" colspan="2">{% trans "last post" %}</th>
          </tr>
          {% for t in topics %}
            <tr>
              <td width="50" align="right" class="lend"><strong><span class="green">{{ t.num_replies }}</span></strong></td>
              <td width="auto" align="left" class="">
                <a href="{{ t.get_absolute_url }}">{{t.subject}}</a>
              </td>
              <td width="80" align="left" class="">
                {{ t.last_post.posted_by.lbforum_profile }}
              </td>
              <td width="110" align="left" class="rend">
                <small class="fade">{{ t.last_post.created_on|lbtimesince }}</small>
              </td>
            </tr>
          {% endfor %}
        </tbody>
      </table>
    </div>
    <div class="inner">
      {% show_pages %}
    </div>
  </div>
{% endblock %}

{% block footer_js %}
  <script type="text/javascript" src="{{ STATIC_URL }}lbforum/scripts/jquery.min.js"></script>
  <script language="javascript" type="text/javascript">
    $(function(){
      $(".topics tr:even").css("background","#F9F9F9");
    })
  </script>
{% endblock %}
