~spreadubuntu/spreadubuntu/devel-drupal6

« back to all changes in this revision

Viewing changes to modules/forum/forum-topic-list.tpl.php

  • Committer: ruben
  • Date: 2009-06-08 09:38:49 UTC
  • Revision ID: ruben@captive-20090608093849-s1qtsyctv2vwp1x1
SpreadUbuntu moving to Drupal6. Based on ubuntu-drupal theme and adding our modules

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
// $Id: forum-topic-list.tpl.php,v 1.4.2.1 2008/10/22 18:22:51 dries 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
?>
 
36
<table id="forum-topic-<?php print $topic_id; ?>">
 
37
  <thead>
 
38
    <tr><?php print $header; ?></tr>
 
39
  </thead>
 
40
  <tbody>
 
41
  <?php foreach ($topics as $topic): ?>
 
42
    <tr class="<?php print $topic->zebra;?>">
 
43
      <td class="icon"><?php print $topic->icon; ?></td>
 
44
      <td class="title"><?php print $topic->title; ?></td>
 
45
    <?php if ($topic->moved): ?>
 
46
      <td colspan="3"><?php print $topic->message; ?></td>
 
47
    <?php else: ?>
 
48
      <td class="replies">
 
49
        <?php print $topic->num_comments; ?>
 
50
        <?php if ($topic->new_replies): ?>
 
51
          <br />
 
52
          <a href="<?php print $topic->new_url; ?>"><?php print $topic->new_text; ?></a>
 
53
        <?php endif; ?>
 
54
      </td>
 
55
      <td class="created"><?php print $topic->created; ?></td>
 
56
      <td class="last-reply"><?php print $topic->last_reply; ?></td>
 
57
    <?php endif; ?>
 
58
    </tr>
 
59
  <?php endforeach; ?>
 
60
  </tbody>
 
61
</table>
 
62
<?php print $pager; ?>