{% load i18n %}
{% load endless %}
{% load forum_tags %}
{% load photo %}

{% paginate topics %}
{% for topic in topics %}
    {% if topic.moderate %}
        <tr>
            <td>
                <div class="col-sm-1">
                    <span>
                        <a href="{% url 'topic' forum.category forum.name topic.slug topic.idtopic %}" class="btn btn-sm btn-default">
                            <i class="fa fa-map-o"></i>
                        </a>
                    </span>
                </div>
                
                <div class="col-sm-11">
                    {% if topic.is_close %} 
                        <span style="color: red;">
                            <i class="fa fa-times" aria-hidden="true"></i> 
                            <strong>{% trans "This topic is closed" %}</strong>
                        </span>
                        <br />
                    {% endif %}
                    
                    <a href="{% url 'topic' forum.category forum.name topic.slug topic.idtopic %}" data-toggle="tooltip" 
                        data-placement="bottom" title="{% trans 'Views' %}: {% get_tot_views topic.idtopic %}">
                    {{topic.title}}
                    {% if topic.is_top %}
                    <i class="fa fa-thumb-tack"></i>
                    {% endif %}
                    </a>
                    <p>
                        <small>{% trans "By" %} <i class="fa fa-user"></i> 
                        {{topic.user|get_path_profile|safe}} » {{ topic.date.date }}
                        </small>
                    </p>
                </div>
            </td>
            <td>{{ topic|get_last_activity|safe }} </td>
            <td><span class="badge">{{topic.idtopic|get_tot_comments}}</span></td>
            <td><span class="badge">{% get_tot_views topic.idtopic %}</span></td>
        </tr>
    {% endif %}
{% endfor %}

{% show_more_table %}


