/[drupal]/contributions/modules/views/theme/views-view-table.tpl.php
ViewVC logotype

Contents of /contributions/modules/views/theme/views-view-table.tpl.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.8 - (show annotations) (download) (as text)
Wed Jan 28 00:43:43 2009 UTC (9 months, 4 weeks ago) by merlinofchaos
Branch: MAIN
CVS Tags: DRUPAL-6--2-7, DRUPAL-6--2-6, DRUPAL-6--2-5, DRUPAL-6--2-4, DRUPAL-6--2-3, DRUPAL-6--3-0-ALPHA1, HEAD
Branch point for: DRUPAL-6--2, DRUPAL-6--3, DRUPAL-7--3
Changes since 1.7: +6 -4 lines
File MIME type: text/x-php
#364637 by moshe and dww: Allow preprocessors to add row classes to table style.
1 <?php
2 // $Id: views-view-table.tpl.php,v 1.7 2009/01/07 23:35:54 merlinofchaos Exp $
3 /**
4 * @file 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 <table class="<?php print $class; ?>">
19 <?php if (!empty($title)) : ?>
20 <caption><?php print $title; ?></caption>
21 <?php endif; ?>
22 <thead>
23 <tr>
24 <?php foreach ($header as $field => $label): ?>
25 <th class="views-field views-field-<?php print $fields[$field]; ?>">
26 <?php print $label; ?>
27 </th>
28 <?php endforeach; ?>
29 </tr>
30 </thead>
31 <tbody>
32 <?php foreach ($rows as $count => $row): ?>
33 <tr class="<?php print implode(' ', $row_classes[$count]); ?>">
34 <?php foreach ($row as $field => $content): ?>
35 <td class="views-field views-field-<?php print $fields[$field]; ?>">
36 <?php print $content; ?>
37 </td>
38 <?php endforeach; ?>
39 </tr>
40 <?php endforeach; ?>
41 </tbody>
42 </table>

  ViewVC Help
Powered by ViewVC 1.1.2