Default theme implementation to display a list of forum topics.
Available variables:
template_preprocess_forum_topic_list()
- {#
- /**
- * @file
- * Default theme implementation to display a list of forum topics.
- *
- * Available variables:
- * - header: The table header. This is pre-generated with click-sorting
- * information. If you need to change this, see
- * template_preprocess_forum_topic_list().
- * - pager: The pager to display beneath the table.
- * - topics: A collection of topics to be displayed. Each topic in topics
- * contains:
- * - icon: The icon to display.
- * - moved: A flag to indicate whether the topic has been moved to another
- * forum.
- * - title: The title of the topic. Safe to output.
- * - message: If the topic has been moved, this contains an explanation and a
- * link.
- * - zebra: 'even' or 'odd', used for row class.
- * - comment_count: The number of replies on this topic.
- * - new_replies: A flag to indicate whether there are unread comments.
- * - new_url: If there are unread replies, this is a link to them.
- * - new_text: Text containing the translated, properly pluralized count.
- * - created: Text representing when the topic was posted. Safe to output.
- * - last_reply: Text representing when the topic was last replied to.
- * - timestamp: The raw timestamp this topic was posted.
- * - topic_id: Numeric ID for the current forum topic.
- *
- * @see template_preprocess()
- * @see template_preprocess_forum_topic_list()
- *
- * @ingroup themeable
- */
- #}
- <table id="forum-topic-{{ topic_id }}">
- <thead>
- <tr>{{ header }}</tr>
- </thead>
- <tbody>
- {% for topic in topics %}
- <tr class="{{ topic.zebra }}">
- <td class="topic">
- {{ topic.icon }}
- <div class="title">
- <div>
- {{ topic.title }}
- </div>
- <div>
- {{ topic.created }}
- </div>
- </div>
- </td>
- {% if topic.moved %}
- <td colspan="3">{{ topic.message }}</td>
- {% else %}
- <td class="replies">
- {{ topic.comment_count }}
- {% if topic.new_replies %}
- <br />
- <a href="{{ topic.new_url }}">{{ topic.new_text }}</a>
- {% endif %}
- </td>
- <td class="last-reply">{{ topic.last_reply }}</td>
- {% endif %}
- </tr>
- {% endfor %}
- </tbody>
- </table>
- {{ pager }}