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

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

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


Revision 1.3 - (show annotations) (download) (as text)
Sat Jun 14 17:42:43 2008 UTC (17 months, 1 week ago) by merlinofchaos
Branch: MAIN
CVS Tags: DRUPAL-6--2-0-RC5, DRUPAL-6--2-0-RC4, DRUPAL-6--2-0-RC3, DRUPAL-6--2-0-RC2, DRUPAL-6--2-0-RC1, DRUPAL-6--2-7, DRUPAL-6--2-6, DRUPAL-6--2-5, DRUPAL-6--2-4, DRUPAL-6--2-3, DRUPAL-6--2-2, DRUPAL-6--2-1, DRUPAL-6--2-0, DRUPAL-6--3-0-ALPHA1, HEAD
Branch point for: DRUPAL-6--2, DRUPAL-6--3, DRUPAL-7--3
Changes since 1.2: +2 -2 lines
File MIME type: text/x-php
Fix some minor code formatting issues.
1 <?php
2 // $Id: views-view-grid.tpl.php,v 1.2 2008/06/03 22:21:42 merlinofchaos Exp $
3 /**
4 * @file views-view-grid.tpl.php
5 * Default simple view template to display a rows in a grid.
6 *
7 * - $rows contains a nested array of rows. Each row contains an array of
8 * columns.
9 *
10 * @ingroup views_templates
11 */
12 ?>
13 <?php if (!empty($title)) : ?>
14 <h3><?php print $title; ?></h3>
15 <?php endif; ?>
16 <table class="views-view-grid">
17 <tbody>
18 <?php foreach ($rows as $row_number => $columns): ?>
19 <?php
20 $row_class = 'row-' . ($row_number + 1);
21 if ($row_number == 0) {
22 $row_class .= ' row-first';
23 }
24 elseif (count($rows) == ($row_number + 1)) {
25 $row_class .= ' row-last';
26 }
27 ?>
28 <tr class="<?php print $row_class; ?>">
29 <?php foreach ($columns as $column_number => $item): ?>
30 <td class="<?php print 'col-'. ($column_number + 1); ?>">
31 <?php print $item; ?>
32 </td>
33 <?php endforeach; ?>
34 </tr>
35 <?php endforeach; ?>
36 </tbody>
37 </table>

  ViewVC Help
Powered by ViewVC 1.1.2