Code coverage for /20080809/modules/forum/forum-topic-list.tpl.php

Line #Times calledCode
1
<?php
2
// $Id: forum-topic-list.tpl.php,v 1.4 2007/08/30 18:58:12 goba Exp $
3
4
/**
5
 * @file forum-topic-list.tpl.php
6
 * Theme implementation to display a list of forum topics.
7
 *
8
 * Available variables:
9
 * - $header: The table header. This is pre-generated with click-sorting
10
 *   information. If you need to change this, @see
template_preprocess_forum_topic_list().
11
 * - $pager: The pager to display beneath the table.
12
 * - $topics: An array of topics to be displayed.
13
 * - $topic_id: Numeric id for the current forum topic.
14
 *
15
 * Each $topic in $topics contains:
16
 * - $topic->icon: The icon to display.
17
 * - $topic->moved: A flag to indicate whether the topic has been moved to
18
 *   another forum.
19
 * - $topic->title: The title of the topic. Safe to output.
20
 * - $topic->message: If the topic has been moved, this contains an
21
 *   explanation and a link.
22
 * - $topic->zebra: 'even' or 'odd' string used for row class.
23
 * - $topic->num_comments: The number of replies on this topic.
24
 * - $topic->new_replies: A flag to indicate whether there are unread
comments.
25
 * - $topic->new_url: If there are unread replies, this is a link to them.
26
 * - $topic->new_text: Text containing the translated, properly pluralized
count.
27
 * - $topic->created: An outputtable string represented when the topic was
posted.
28
 * - $topic->last_reply: An outputtable string representing when the topic
was
29
 *   last replied to.
30
 * - $topic->timestamp: The raw timestamp this topic was posted.
31
 *
32
 * @see template_preprocess_forum_topic_list()
33
 * @see theme_forum_topic_list()
34
 */
35
?>
368
<table id="forum-topic-<?php print $topic_id; ?>">
37
  <thead>
388
    <tr><?php print $header; ?></tr>
39
  </thead>
40
  <tbody>
418
  <?php foreach ($topics as $topic): ?>
424
    <tr class="<?php print $topic->zebra;?>">
434
      <td class="icon"><?php print $topic->icon; ?></td>
444
      <td class="title"><?php print $topic->title; ?></td>
454
    <?php if ($topic->moved): ?>
460
      <td colspan="3"><?php print $topic->message; ?></td>
470
    <?php else: ?>
48
      <td class="replies">
494
        <?php print $topic->num_comments; ?>
504
        <?php if ($topic->new_replies): ?>
51
          <br />
520
          <a href="<?php print $topic->new_url; ?>"><?php print
$topic->new_text; ?></a>
530
        <?php endif; ?>
54
      </td>
554
      <td class="created"><?php print $topic->created; ?>
564
      <td class="last-reply"><?php print $topic->last_reply; ?>
574
    <?php endif; ?>
58
    </tr>
594
  <?php endforeach; ?>
60
  </tbody>
61
</table>
628
<?php print $pager; ?>
638