diff options
Diffstat (limited to 'modules/gallery')
-rw-r--r-- | modules/gallery/views/admin_advanced_settings.html.php | 4 | ||||
-rw-r--r-- | modules/gallery/views/admin_identity.html.php | 4 | ||||
-rw-r--r-- | modules/gallery/views/admin_maintenance.html.php | 12 | ||||
-rw-r--r-- | modules/gallery/views/admin_modules.html.php | 4 |
4 files changed, 6 insertions, 18 deletions
diff --git a/modules/gallery/views/admin_advanced_settings.html.php b/modules/gallery/views/admin_advanced_settings.html.php index 32fbc2c3..ff4843ab 100644 --- a/modules/gallery/views/admin_advanced_settings.html.php +++ b/modules/gallery/views/admin_advanced_settings.html.php @@ -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> diff --git a/modules/gallery/views/admin_identity.html.php b/modules/gallery/views/admin_identity.html.php index 70fe401f..51eaa58a 100644 --- a/modules/gallery/views/admin_identity.html.php +++ b/modules/gallery/views/admin_identity.html.php @@ -46,14 +46,12 @@ <th> <?= t("Active") ?> </th> <th> <?= t("Description") ?> </th> </tr> - <? $i = 0 ?> <? foreach ($available as $module_name => $description): ?> - <tr class="<?= ($i % 2 == 0) ? "g-odd" : "g-even" ?>"> + <tr class="<?= text::alternate("g-odd", "g-even") ?>"> <? $data = array("name" => "provider"); ?> <td> <?= form::radio($data, $module_name, $module_name == $active) ?> </td> <td> <?= t($description) ?> </td> </tr> - <? $i++ ?> <? endforeach ?> </table> <input type="submit" value="<?= t("Change")->for_html_attr() ?>" /> 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 ?> diff --git a/modules/gallery/views/admin_modules.html.php b/modules/gallery/views/admin_modules.html.php index 4c4976f8..aebedf09 100644 --- a/modules/gallery/views/admin_modules.html.php +++ b/modules/gallery/views/admin_modules.html.php @@ -15,9 +15,8 @@ <th> <?= t("Version") ?> </th> <th> <?= t("Description") ?> </th> </tr> - <? $i = 0 ?> <? foreach ($available as $module_name => $module_info): ?> - <tr class="<?= ($i % 2 == 0) ? "g-odd" : "g-even" ?>"> + <tr class="<?= text::alternate("g-odd", "g-even") ?>"> <? $data = array("name" => $module_name); ?> <? if ($module_info->locked) $data["disabled"] = 1; ?> <td> <?= form::checkbox($data, '1', module::is_active($module_name)) ?> </td> @@ -25,7 +24,6 @@ <td> <?= $module_info->version ?> </td> <td> <?= t($module_info->description) ?> </td> </tr> - <? $i++ ?> <? endforeach ?> </table> <input type="submit" value="<?= t("Update")->for_html_attr() ?>" /> |