views-view-grid.tpl.php 1001 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * @file
  4. * Default simple view template to display a rows in a grid.
  5. *
  6. * - $rows contains a nested array of rows. Each row contains an array of
  7. * columns.
  8. *
  9. * @ingroup views_templates
  10. */
  11. ?>
  12. <?php if (!empty($title)) : ?>
  13. <h3><?php print $title; ?></h3>
  14. <?php endif; ?>
  15. <table class="<?php print $class; ?>"<?php print $attributes; ?>>
  16. <?php if (!empty($caption)) : ?>
  17. <caption><?php print $caption; ?></caption>
  18. <?php endif; ?>
  19. <tbody>
  20. <?php foreach ($rows as $row_number => $columns): ?>
  21. <tr <?php if ($row_classes[$row_number]):?> class="<?php print $row_classes[$row_number]; ?>"<?php endif; ?>>
  22. <?php foreach ($columns as $column_number => $item): ?>
  23. <td <?php if ($column_classes[$row_number][$column_number]): ?> class="<?php print $column_classes[$row_number][$column_number]; ?>"<?php endif; ?>>
  24. <?php print $item; ?>
  25. </td>
  26. <?php endforeach; ?>
  27. </tr>
  28. <?php endforeach; ?>
  29. </tbody>
  30. </table>