summaryrefslogtreecommitdiff
path: root/modules/forum/forum-topic-list.tpl.php
diff options
context:
space:
mode:
Diffstat (limited to 'modules/forum/forum-topic-list.tpl.php')
-rw-r--r--modules/forum/forum-topic-list.tpl.php14
1 files changed, 5 insertions, 9 deletions
diff --git a/modules/forum/forum-topic-list.tpl.php b/modules/forum/forum-topic-list.tpl.php
index 9da332d10..4b2aa48fc 100644
--- a/modules/forum/forum-topic-list.tpl.php
+++ b/modules/forum/forum-topic-list.tpl.php
@@ -2,24 +2,22 @@
// $Id$
/**
* @file forum-topic-list.tpl.php
- *
* 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: An array of topics to be displayed.
*
- * Each topic contains:
- *
+ * Each $topic in $topics contains:
* - $topic->icon: The icon to display.
* - $topic->moved: A flag to indicate whether the topic has been moved to
* another forum.
* - $topic->title: The title of the topic. Safe to output.
- * - $topic->description: If the topic has been moved, this contains an
+ * - $topic->message: If the topic has been moved, this contains an
* explanation and a link.
+ * - $topic->zebra: 'even' or 'odd' string used for row class.
* - $topic->num_comments: The number of replies on this topic.
* - $topic->new_replies: A flag to indicate whether there are unread comments.
* - $topic->new_url: If there are unread replies, this is a link to them.
@@ -38,13 +36,12 @@
<tr><?php print $header; ?></tr>
</thead>
<tbody>
- <?php $row = 0; ?>
<?php foreach ($topics as $topic): ?>
- <tr class="<?php print $row % 2 == 0 ? 'odd' : 'even';?>">
+ <tr class="<?php print $topic->zebra;?>">
<td class="icon"><?php print $topic->icon; ?></td>
<td class="title"><?php print $topic->title; ?></td>
<?php if ($topic->moved): ?>
- <td colspan="3"><?php print $topic->description; ?></td>
+ <td colspan="3"><?php print $topic->message; ?></td>
<?php else: ?>
<td class="replies">
<?php print $topic->num_comments; ?>
@@ -57,7 +54,6 @@
<td class="last-reply"><?php print $topic->last_reply; ?>
<?php endif; ?>
</tr>
- <?php $row++; ?>
<?php endforeach; ?>
</tbody>
</table>