views-view-table--est_search.tpl.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. // $Id: views-view-table.tpl.php,v 1.8 2009/01/28 00:43:43 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. <i>&nbsp;&nbsp;&nbsp;Note: To get complete annotation for a sequence, click on the sequence name.</i>
  19. <table class="tripal_search_feature-table tripal-table tripal-table-horz <?php print $class; ?>">
  20. <?php if (!empty($title)) : ?>
  21. <caption><?php print $title; ?></caption>
  22. <?php endif; ?>
  23. <thead>
  24. <tr class="tripal_search_feature-table-odd-row tripal-table-odd-row">
  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. $rowclass = "";
  35. if ($count % 2 == 0) {
  36. $rowclass = "tripal_search_feature-table-even-row tripal-table-even-row";
  37. } else {
  38. $rowclass = "tripal_search_feature-table-odd-row tripal-table-odd-row";
  39. }
  40. ?>
  41. <tr class="<?php print $rowclass?> <?php print implode(' ', $row_classes[$count]); ?>">
  42. <?php foreach ($row as $field => $content): ?>
  43. <td class="views-field views-field-<?php print $fields[$field]; ?>">
  44. <?php print $content; ?>
  45. </td>
  46. <?php endforeach; ?>
  47. </tr>
  48. <?php endforeach; ?>
  49. </tbody>
  50. </table>