Projet

Général

Profil

Paste
Télécharger (2,39 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / advanced_forum / styles / naked / advanced-forum.naked.topic-list-view.tpl.php @ 13c3c9b4

1
<?php
2
/**
3
 * @file
4
 * views-view-table.tpl.php
5
 * Template to display a view as a table.
6
 *
7
 * - $title : The title of this group of rows.  May be empty.
8
 * - $header: An array of header labels keyed by field id.
9
 * - $fields: An array of CSS IDs to use for each field id.
10
 * - $class: A class or classes to apply to the table, based on settings.
11
 * - $row_classes: An array of classes to apply to each row, indexed by row
12
 *   number. This matches the index in $rows.
13
 * - $rows: An array of row items. Each row is an array of content.
14
 *   $rows are keyed by row number, fields within rows are keyed by field ID.
15
 * @ingroup views_templates
16
 */
17
?>
18
 <div id="forum-topic-list">
19
  <?php if (!empty($title)) : ?>
20
    <caption><?php print $title; ?></caption>
21
  <?php endif; ?>
22

    
23
  <table class="forum-table forum-table-topics <?php print $classes; ?>">
24
    <thead>
25
      <tr>
26
        <?php foreach ($header as $field => $label): ?>
27
          <th class="views-field views-field-<?php print $fields[$field]; ?>">
28
            <?php print $label; ?>
29
          </th>
30
        <?php endforeach; ?>
31
      </tr>
32
    </thead>
33
    <tbody>
34
      <?php foreach ($rows as $count => $row): ?>
35
        <tr class="<?php print implode(' ', $row_classes[$count]); ?>">
36
          <?php if (empty($shadow[$count])): ?>
37
            <?php foreach ($row as $field => $content): ?>
38
              <?php /* To add popup from teaser in the title of the td, add: title="<?php print $teasers[$count] ?>"*/ ?>
39
              <td class="views-field views-field-<?php print $fields[$field]; ?>">
40
               <?php /* Extra label for stickies. */ ?>
41
               <?php if ($field == 'title' && !empty($sticky[$count])): ?>
42
                 <span class="sticky-label"><?php print t('Sticky:'); ?></span>
43
               <?php endif; ?>
44
               <?php print $content; ?>
45
              </td>
46
            <?php endforeach; ?>
47
          <?php else: ?> 
48
            <?php /* For shadow posts, we print only the icon and themed notice. */ ?>
49
            <td class="views-field views-field-<?php print $fields['topic_icon']; ?>">
50
              <?php print $row['topic_icon']; ?>
51
            </td>
52
            <td class="views-field views-field-<?php print $fields['title']; ?>" colspan="<?php print count($header) - 1; ?>">
53
               <?php print $shadow[$count]; ?>
54
            </td>
55
          <?php endif; ?>
56
        </tr>
57
      <?php endforeach; ?>
58
    </tbody>
59
  </table>
60
</div>