Use text::alternate() instead of hand-rolled even/odd code.

This commit is contained in:
Bharat Mediratta
2009-11-15 19:34:44 -08:00
parent 64ef86a8ee
commit e0f4e6500d
6 changed files with 10 additions and 22 deletions

View File

@@ -16,10 +16,9 @@
<th> <?= t("Name") ?> </th>
<th> <?= t("Value") ?></th>
</tr>
<? $i = 0; ?>
<? foreach ($vars as $var): ?>
<? if ($var->module_name == "gallery" && $var->name == "_cache") continue ?>
<tr class="<?= ($i % 2 == 0) ? "g-odd" : "g-even" ?>">
<tr class="<?= text::alternate("g-odd", "g-even") ?>">
<td> <?= $var->module_name ?> </td>
<td> <?= html::clean($var->name) ?> </td>
<td>
@@ -34,7 +33,6 @@
</a>
</td>
</tr>
<? $i++ ?>
<? endforeach ?>
</table>
</div>