danielebarchiesi@0
|
1 <?php
|
danielebarchiesi@0
|
2
|
danielebarchiesi@0
|
3 /**
|
danielebarchiesi@0
|
4 * @file
|
danielebarchiesi@0
|
5 * Displays a list of forum topics.
|
danielebarchiesi@0
|
6 *
|
danielebarchiesi@0
|
7 * Available variables:
|
danielebarchiesi@0
|
8 * - $header: The table header. This is pre-generated with click-sorting
|
danielebarchiesi@0
|
9 * information. If you need to change this, see
|
danielebarchiesi@0
|
10 * template_preprocess_forum_topic_list().
|
danielebarchiesi@0
|
11 * - $pager: The pager to display beneath the table.
|
danielebarchiesi@0
|
12 * - $topics: An array of topics to be displayed. Each $topic in $topics
|
danielebarchiesi@0
|
13 * contains:
|
danielebarchiesi@0
|
14 * - $topic->icon: The icon to display.
|
danielebarchiesi@0
|
15 * - $topic->moved: A flag to indicate whether the topic has been moved to
|
danielebarchiesi@0
|
16 * another forum.
|
danielebarchiesi@0
|
17 * - $topic->title: The title of the topic. Safe to output.
|
danielebarchiesi@0
|
18 * - $topic->message: If the topic has been moved, this contains an
|
danielebarchiesi@0
|
19 * explanation and a link.
|
danielebarchiesi@0
|
20 * - $topic->zebra: 'even' or 'odd' string used for row class.
|
danielebarchiesi@0
|
21 * - $topic->comment_count: The number of replies on this topic.
|
danielebarchiesi@0
|
22 * - $topic->new_replies: A flag to indicate whether there are unread
|
danielebarchiesi@0
|
23 * comments.
|
danielebarchiesi@0
|
24 * - $topic->new_url: If there are unread replies, this is a link to them.
|
danielebarchiesi@0
|
25 * - $topic->new_text: Text containing the translated, properly pluralized
|
danielebarchiesi@0
|
26 * count.
|
danielebarchiesi@0
|
27 * - $topic->created: A string representing when the topic was posted. Safe
|
danielebarchiesi@0
|
28 * to output.
|
danielebarchiesi@0
|
29 * - $topic->last_reply: An outputtable string representing when the topic was
|
danielebarchiesi@0
|
30 * last replied to.
|
danielebarchiesi@0
|
31 * - $topic->timestamp: The raw timestamp this topic was posted.
|
danielebarchiesi@0
|
32 * - $topic_id: Numeric ID for the current forum topic.
|
danielebarchiesi@0
|
33 *
|
danielebarchiesi@0
|
34 * @see template_preprocess_forum_topic_list()
|
danielebarchiesi@0
|
35 * @see theme_forum_topic_list()
|
danielebarchiesi@0
|
36 *
|
danielebarchiesi@0
|
37 * @ingroup themeable
|
danielebarchiesi@0
|
38 */
|
danielebarchiesi@0
|
39 ?>
|
danielebarchiesi@0
|
40 <table id="forum-topic-<?php print $topic_id; ?>">
|
danielebarchiesi@0
|
41 <thead>
|
danielebarchiesi@0
|
42 <tr><?php print $header; ?></tr>
|
danielebarchiesi@0
|
43 </thead>
|
danielebarchiesi@0
|
44 <tbody>
|
danielebarchiesi@0
|
45 <?php foreach ($topics as $topic): ?>
|
danielebarchiesi@0
|
46 <tr class="<?php print $topic->zebra;?>">
|
danielebarchiesi@0
|
47 <td class="icon"><?php print $topic->icon; ?></td>
|
danielebarchiesi@0
|
48 <td class="title">
|
danielebarchiesi@0
|
49 <div>
|
danielebarchiesi@0
|
50 <?php print $topic->title; ?>
|
danielebarchiesi@0
|
51 </div>
|
danielebarchiesi@0
|
52 <div>
|
danielebarchiesi@0
|
53 <?php print $topic->created; ?>
|
danielebarchiesi@0
|
54 </div>
|
danielebarchiesi@0
|
55 </td>
|
danielebarchiesi@0
|
56 <?php if ($topic->moved): ?>
|
danielebarchiesi@0
|
57 <td colspan="3"><?php print $topic->message; ?></td>
|
danielebarchiesi@0
|
58 <?php else: ?>
|
danielebarchiesi@0
|
59 <td class="replies">
|
danielebarchiesi@0
|
60 <?php print $topic->comment_count; ?>
|
danielebarchiesi@0
|
61 <?php if ($topic->new_replies): ?>
|
danielebarchiesi@0
|
62 <br />
|
danielebarchiesi@0
|
63 <a href="<?php print $topic->new_url; ?>"><?php print $topic->new_text; ?></a>
|
danielebarchiesi@0
|
64 <?php endif; ?>
|
danielebarchiesi@0
|
65 </td>
|
danielebarchiesi@0
|
66 <td class="last-reply"><?php print $topic->last_reply; ?></td>
|
danielebarchiesi@0
|
67 <?php endif; ?>
|
danielebarchiesi@0
|
68 </tr>
|
danielebarchiesi@0
|
69 <?php endforeach; ?>
|
danielebarchiesi@0
|
70 </tbody>
|
danielebarchiesi@0
|
71 </table>
|
danielebarchiesi@0
|
72 <?php print $pager; ?>
|