<table class="forum-table">
    <tr>
        <th colspan="2">Topic</th>
        <th class="counter-column">Replies</th>
        <th class="counter-column">Views</th>
        <th class="activity-column">Last post</th>
    </tr>

    {% for topic in topics %}
        <tr class="forum-topic">
            <td class="indicator-column">
                <div class="topic-indicator {{ topic.hasNew ? 'has-new' }}"></div>
            </td>
            <td>
                <h5>
                    {% if topic.is_sticky %}<strong>Sticky:</strong>{% endif %}
                    {% if topic.is_locked %}<i class="icon icon-lock"></i> <strong>Locked:</strong>{% endif %}
                    <a href="{{ topic.url }}">{{ topic.subject }}</a>
                    <br/><small>by <a href="{{ topic.start_member.url }}">{{ topic.start_member.username }}</a></small>
                </h5>
            </td>
            <td class="counter-column">
                <p>{{ (topic.count_posts-1) }}</p>
            </td>
            <td class="counter-column">
                <p>{{ topic.count_views }}</p>
            </td>
            <td class="activity-column">
                <p>
                    <img src="{{ topic.last_post_member.user.avatarThumb(24) }}" class="member-avatar" />
                    <a href="{{ topic.last_post_member.url }}">{{ topic.last_post_member.username }}</a>
                    <small>
                        posted
                        <a href="{{ topic.url }}?page=last#post-{{ topic.last_post_id }}">
                            {% partial __SELF__ ~ "::timestamp" date=topic.last_post_at %}
                        </a>
                    </small>
                </p>
            </td>
        </tr>
    {% endfor %}

    {% if not topics|length %}
        <tr>
            <td colspan="100">There are no topics in this channel.</td>
        </tr>
    {% endif %}
</table>
