summaryrefslogtreecommitdiff
path: root/modules/gallery/views/admin_maintenance.html.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-11-15 19:34:44 -0800
committerBharat Mediratta <bharat@menalto.com>2009-11-15 19:34:44 -0800
commite0f4e6500de0b5f0e9de973eadcd879c45da8e18 (patch)
tree4029f3c1abe18fd6dbc097e2ee1f7a562fbe4625 /modules/gallery/views/admin_maintenance.html.php
parent64ef86a8ee0c054bdc8743beaa1eca3bbb46a676 (diff)
Use text::alternate() instead of hand-rolled even/odd code.
Diffstat (limited to 'modules/gallery/views/admin_maintenance.html.php')
-rw-r--r--modules/gallery/views/admin_maintenance.html.php12
1 files changed, 3 insertions, 9 deletions
diff --git a/modules/gallery/views/admin_maintenance.html.php b/modules/gallery/views/admin_maintenance.html.php
index 7ad75f85..ac597715 100644
--- a/modules/gallery/views/admin_maintenance.html.php
+++ b/modules/gallery/views/admin_maintenance.html.php
@@ -20,9 +20,8 @@
<?= t("Action") ?>
</th>
</tr>
- <? $i = 0; ?>
<? foreach ($task_definitions as $task): ?>
- <tr class="<?= ($i % 2 == 0) ? "g-odd" : "g-even" ?> <?= log::severity_class($task->severity) ?>">
+ <tr class="<?= text::alternate("g-odd", "g-even") ?> <?= log::severity_class($task->severity) ?>">
<td class="<?= log::severity_class($task->severity) ?>">
<?= $task->name ?>
</td>
@@ -36,7 +35,6 @@
</a>
</td>
</tr>
- <? $i++ ?>
<? endforeach ?>
</table>
</div>
@@ -68,9 +66,8 @@
<?= t("Action") ?>
</th>
</tr>
- <? $i = 0; ?>
<? foreach ($running_tasks as $task): ?>
- <tr class="<?= ($i % 2 == 0) ? "g-odd" : "g-even" ?> <?= $task->state == "stalled" ? "g-warning" : "" ?>">
+ <tr class="<?= text::alternate("g-odd", "g-even") ?> <?= $task->state == "stalled" ? "g-warning" : "" ?>">
<td class="<?= $task->state == "stalled" ? "g-warning" : "" ?>">
<?= gallery::date_time($task->updated) ?>
</td>
@@ -108,7 +105,6 @@
<? endif ?>
</td>
</tr>
- <? $i++ ?>
<? endforeach ?>
</table>
</div>
@@ -141,9 +137,8 @@
<?= t("Action") ?>
</th>
</tr>
- <? $i = 0; ?>
<? foreach ($finished_tasks as $task): ?>
- <tr class="<?= ($i % 2 == 0) ? "g-odd" : "g-even" ?> <?= $task->state == "success" ? "g-success" : "g-error" ?>">
+ <tr class="<?= text::alternate("g-odd", "g-even") ?> <?= $task->state == "success" ? "g-success" : "g-error" ?>">
<td class="<?= $task->state == "success" ? "g-success" : "g-error" ?>">
<?= gallery::date_time($task->updated) ?>
</td>
@@ -187,7 +182,6 @@
</td>
</tr>
<? endforeach ?>
- <? $i++ ?>
</table>
</div>
<? endif ?>