root / drupal7 / sites / all / modules / advanced_forum / styles / naked / advanced-forum.naked.topic-list-view.tpl.php @ 384fc62a
1 |
<?php
|
---|---|
2 |
/**
|
3 |
* @file views-view-table.tpl.php
|
4 |
* Template to display a view as a table.
|
5 |
*
|
6 |
* - $title : The title of this group of rows. May be empty.
|
7 |
* - $header: An array of header labels keyed by field id.
|
8 |
* - $fields: An array of CSS IDs to use for each field id.
|
9 |
* - $class: A class or classes to apply to the table, based on settings.
|
10 |
* - $row_classes: An array of classes to apply to each row, indexed by row
|
11 |
* number. This matches the index in $rows.
|
12 |
* - $rows: An array of row items. Each row is an array of content.
|
13 |
* $rows are keyed by row number, fields within rows are keyed by field ID.
|
14 |
* @ingroup views_templates
|
15 |
*/
|
16 |
?>
|
17 |
<div id="forum-topic-list"> |
18 |
<?php if (!empty($title)) : ?> |
19 |
<caption><?php print $title; ?></caption> |
20 |
<?php endif; ?> |
21 |
|
22 |
<table class="forum-table forum-table-topics <?php print $classes; ?>"> |
23 |
<thead>
|
24 |
<tr>
|
25 |
<?php foreach ($header as $field => $label): ?> |
26 |
<th class="views-field views-field-<?php print $fields[$field]; ?>"> |
27 |
<?php print $label; ?> |
28 |
</th>
|
29 |
<?php endforeach; ?> |
30 |
</tr>
|
31 |
</thead>
|
32 |
<tbody>
|
33 |
<?php foreach ($rows as $count => $row): ?> |
34 |
<tr class="<?php print implode(' ', $row_classes[$count]); ?>"> |
35 |
<?php if (empty($shadow[$count])): ?> |
36 |
<?php foreach ($row as $field => $content): ?> |
37 |
<?php /* To add popup from teaser in the title of the td, add: title="<?php print $teasers[$count] ?>"*/ ?> |
38 |
<td class="views-field views-field-<?php print $fields[$field]; ?>"> |
39 |
<?php /* Extra label for stickies. */ ?> |
40 |
<?php if ($field == 'title' && !empty($sticky[$count])): ?> |
41 |
<span class="sticky-label"><?php print t('Sticky:'); ?></span> |
42 |
<?php endif; ?> |
43 |
<?php print $content; ?> |
44 |
</td>
|
45 |
<?php endforeach; ?> |
46 |
<?php else: ?> |
47 |
<?php /* For shadow posts, we print only the icon and themed notice. */ ?> |
48 |
<td class="views-field views-field-<?php print $fields['topic_icon']; ?>"> |
49 |
<?php print $row['topic_icon']; ?> |
50 |
</td>
|
51 |
<td class="views-field views-field-<?php print $fields['title']; ?>" colspan="<?php print count($header)-1; ?>"> |
52 |
<?php print $shadow[$count]; ?> |
53 |
</td>
|
54 |
<?php endif; ?> |
55 |
</tr>
|
56 |
<?php endforeach; ?> |
57 |
</tbody>
|
58 |
</table>
|
59 |
</div>
|