root / drupal7 / sites / all / modules / advanced_forum / styles / naked / advanced-forum.naked.topic-list.tpl.php @ 27370441
1 | 85ad3d82 | Assos Assos | <?php
|
---|---|---|---|
2 | |||
3 | /**
|
||
4 | * @file
|
||
5 | * Theme implementation to display a list of forum topics.
|
||
6 | *
|
||
7 | * Available variables:
|
||
8 | * - $header: The table header. This is pre-generated with click-sorting
|
||
9 | * information. If you need to change this, see template_preprocess_forum_topic_list().
|
||
10 | * - $pager: The pager to display beneath the table.
|
||
11 | * - $topics: An array of topics to be displayed.
|
||
12 | * - $topic_id: Numeric id for the current forum topic.
|
||
13 | * - $forum_description: Description of the forum these topics are in.
|
||
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->sticky_class: 'sticky-topic' or 'first-not-sticky' or 'not-sticky'
|
||
24 | * - $topic->num_comments: The number of replies on this topic.
|
||
25 | * - $topic->new_replies: A flag to indicate whether there are unread comments.
|
||
26 | * - $topic->new_url: If there are unread replies, this is a link to them.
|
||
27 | * - $topic->new_text: Text containing the translated, properly pluralized count.
|
||
28 | * - $topic->created: An outputtable string represented when the topic was posted.
|
||
29 | * - $topic->last_reply: An outputtable string representing when the topic was
|
||
30 | * last replied to.
|
||
31 | * - $topic->timestamp: The raw timestamp this topic was posted.
|
||
32 | * - $topic->new: 1 if this is a new/updated topic for the current user.
|
||
33 | *
|
||
34 | * @see template_preprocess_forum_topic_list()
|
||
35 | * @see advanced_forum_preprocess_forum_topic_list()
|
||
36 | */
|
||
37 | ?>
|
||
38 | |||
39 | <?php print $pager; ?> |
||
40 | |||
41 | <table id="forum-topic-<?php print $topic_id; ?>" class="forum-table forum-table-topics"> |
||
42 | <thead>
|
||
43 | <tr><?php print $header; ?></tr> |
||
44 | </thead>
|
||
45 | |||
46 | <tbody>
|
||
47 | <?php foreach ($topics as $topic): ?> |
||
48 | 13c3c9b4 | Assos Assos | <?php if ($topic->sticky) : ?> |
49 | <?php $topic->title = t('Sticky') . ': ' . $topic->title; ?> |
||
50 | <?php endif; ?> |
||
51 | 85ad3d82 | Assos Assos | |
52 | 13c3c9b4 | Assos Assos | <?php /* Add "new" or "updated" to title where appropriate. */ ?> |
53 | <?php $topic_new = ''; ?> |
||
54 | <?php if ($topic->new && $topic->new_replies > 0) : ?> |
||
55 | <?php $topic_new = ' <span class="marker">' . t('updated') . '</span>'; ?> |
||
56 | <?php elseif ($topic->new && $topic->new_replies <= 0) : ?> |
||
57 | <?php $topic_new = ' <span class="marker">' . t('new') . '</span>'; ?> |
||
58 | <?php endif; ?> |
||
59 | 85ad3d82 | Assos Assos | |
60 | <tr class="<?php print $topic->zebra;?> <?php print $topic->sticky_class;?>"> |
||
61 | <td class="forum-topic-icon"><div class="forum-icon"><?php print $topic->icon; ?></div></td> |
||
62 | |||
63 | <td class="forum-topic-title"> |
||
64 | 13c3c9b4 | Assos Assos | <?php print check_plain($topic->title) . $topic_new; ?> |
65 | 85ad3d82 | Assos Assos | <?php if (!empty($topic->pager)): ?> |
66 | <div class="forum-topic-pager"> <?php print $topic->pager ?> </div> |
||
67 | <?php endif; ?> |
||
68 | </td>
|
||
69 | |||
70 | <?php if ($topic->moved): ?> |
||
71 | <td colspan="3"> |
||
72 | <?php print $topic->message; ?> |
||
73 | </td>
|
||
74 | <?php else: ?> |
||
75 | <td class="forum-replies"> |
||
76 | <div class="forum-number-replies"><?php print $topic->num_comments; ?></div> |
||
77 | <?php if ($topic->new_replies): ?> |
||
78 | <div class="forum-number-new-replies"><a href="<?php print $topic->new_url; ?>"><?php print $topic->new_text; ?></a></div> |
||
79 | <?php endif; ?> |
||
80 | </td>
|
||
81 | |||
82 | <?php if (module_exists('statistics')): ?> |
||
83 | <td class="forum-number-views"><?php print $topic->views;?> </td> |
||
84 | <?php endif; ?> |
||
85 | |||
86 | <?php if (!variable_get('advanced_forum_hide_created', 0)): ?> |
||
87 | <td class="forum-topic-created"><?php print $topic->created; ?></td> |
||
88 | <?php endif; ?> |
||
89 | |||
90 | <td class="forum-last-reply"><?php print $topic->last_reply; ?></td> |
||
91 | <?php endif; ?> |
||
92 | </tr>
|
||
93 | <?php endforeach; ?> |
||
94 | </tbody>
|
||
95 | </table>
|
||
96 | 13c3c9b4 | Assos Assos | <?php print $pager; ?> |