diff options
author | Chad Kieffer <ckieffer@gmail.com> | 2009-10-18 20:22:10 -0600 |
---|---|---|
committer | Chad Kieffer <ckieffer@gmail.com> | 2009-10-18 20:22:10 -0600 |
commit | 5f56cbf997c12ab1aaf14403873fd9dfc33690ef (patch) | |
tree | 0120ffbad2e7ac728fd830ccbb9d71db28ca48b1 /modules/gallery/views/admin_maintenance.html.php | |
parent | 91ab6f161fa1e118418922fbf0a42f1924d7df0e (diff) |
Wrap all admin views in g-block and g-block content. This provides the means to visually separate the view's title and description from everything else. Primary admin view title should always be h1, and only one h1 per view. Removed some unused admin CSS id's.
Diffstat (limited to 'modules/gallery/views/admin_maintenance.html.php')
-rw-r--r-- | modules/gallery/views/admin_maintenance.html.php | 368 |
1 files changed, 185 insertions, 183 deletions
diff --git a/modules/gallery/views/admin_maintenance.html.php b/modules/gallery/views/admin_maintenance.html.php index 94582dc8..73a4bef8 100644 --- a/modules/gallery/views/admin_maintenance.html.php +++ b/modules/gallery/views/admin_maintenance.html.php @@ -1,193 +1,195 @@ <?php defined("SYSPATH") or die("No direct script access.") ?> -<div id="g-admin-maintenance"> +<div id="g-admin-maintenance" class="g-block"> <h1> <?= t("Maintenance Tasks") ?> </h1> <p> <?= t("Occasionally your Gallery will require some maintenance. Here are some tasks you can use to keep it running smoothly.") ?> </p> - <div id="g-available-tasks"> - <h2> <?= t("Available Tasks") ?> </h2> - <table> - <tr> - <th> - <?= t("Name") ?> - </th> - <th> - <?= t("Description") ?> - </th> - <th> - <?= 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) ?>"> - <td class="<?= log::severity_class($task->severity) ?>"> - <?= $task->name ?> - </td> - <td> - <?= $task->description ?> - </td> - <td> - <a href="<?= url::site("admin/maintenance/start/$task->callback?csrf=$csrf") ?>" - class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all"> - <?= t("run") ?> - </a> - </td> - </tr> - <? $i++ ?> - <? endforeach ?> - </table> - </div> - - <? if ($running_tasks->count()): ?> - <div id="g-running-tasks"> - <h2> <?= t("Running Tasks") ?> </h2> - <table> - <tr> - <th> - <?= t("Last Updated") ?> - </th> - <th> - <?= t("Name") ?> - </th> - <th> - <?= t("Status") ?> - </th> - <th> - <?= t("Info") ?> - </th> - <th> - <?= t("Owner") ?> - </th> - <th> - <a href="<?= url::site("admin/maintenance/cancel_running_tasks?csrf=$csrf") ?>" - class="g-button g-right ui-icon-left ui-state-default ui-corner-all"> - <?= t("cancel all") ?></a> - <?= 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" : "" ?>"> - <td class="<?= $task->state == "stalled" ? "g-warning" : "" ?>"> - <?= gallery::date_time($task->updated) ?> - </td> - <td> - <?= $task->name ?> - </td> - <td> - <? if ($task->done): ?> - <? if ($task->state == "cancelled"): ?> - <?= t("Cancelled") ?> - <? endif ?> - <?= t("Close") ?> - <? elseif ($task->state == "stalled"): ?> - <?= t("Stalled") ?> - <? else: ?> - <?= t("%percent_complete% Complete", array("percent_complete" => $task->percent_complete)) ?> - <? endif ?> - </td> - <td> - <?= $task->status ?> - </td> - <td> - <?= html::clean($task->owner()->name) ?> - </td> - <td> - <a href="<?= url::site("admin/maintenance/cancel/$task->id?csrf=$csrf") ?>" - class="g-button g-right ui-icon-left ui-state-default ui-corner-all"> - <?= t("cancel") ?> - </a> - <? if ($task->state == "stalled"): ?> - <a class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all" - href="<?= url::site("admin/maintenance/resume/$task->id?csrf=$csrf") ?>"> - <?= t("resume") ?> - </a> - <? endif ?> - </td> - </tr> - <? $i++ ?> - <? endforeach ?> - </table> - </div> - <? endif ?> + <div class="g-block-content"> + <div id="g-available-tasks"> + <h2> <?= t("Available Tasks") ?> </h2> + <table> + <tr> + <th> + <?= t("Name") ?> + </th> + <th> + <?= t("Description") ?> + </th> + <th> + <?= 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) ?>"> + <td class="<?= log::severity_class($task->severity) ?>"> + <?= $task->name ?> + </td> + <td> + <?= $task->description ?> + </td> + <td> + <a href="<?= url::site("admin/maintenance/start/$task->callback?csrf=$csrf") ?>" + class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all"> + <?= t("run") ?> + </a> + </td> + </tr> + <? $i++ ?> + <? endforeach ?> + </table> + </div> - <? if ($finished_tasks->count()): ?> - <div id="g-finished-tasks"> - <h2> <?= t("Finished Tasks") ?> </h2> - <table> - <tr> - <th> - <?= t("Last Updated") ?> - </th> - <th> - <?= t("Name") ?> - </th> - <th> - <?= t("Status") ?> - </th> - <th> - <?= t("Info") ?> - </th> - <th> - <?= t("Owner") ?> - </th> - <th> - <a href="<?= url::site("admin/maintenance/remove_finished_tasks?csrf=$csrf") ?>" + <? if ($running_tasks->count()): ?> + <div id="g-running-tasks"> + <h2> <?= t("Running Tasks") ?> </h2> + <table> + <tr> + <th> + <?= t("Last Updated") ?> + </th> + <th> + <?= t("Name") ?> + </th> + <th> + <?= t("Status") ?> + </th> + <th> + <?= t("Info") ?> + </th> + <th> + <?= t("Owner") ?> + </th> + <th> + <a href="<?= url::site("admin/maintenance/cancel_running_tasks?csrf=$csrf") ?>" class="g-button g-right ui-icon-left ui-state-default ui-corner-all"> - <span class="ui-icon ui-icon-trash"></span><?= t("remove all finished") ?></a> - <?= 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" ?>"> - <td class="<?= $task->state == "success" ? "g-success" : "g-error" ?>"> - <?= gallery::date_time($task->updated) ?> - </td> - <td> - <?= $task->name ?> - </td> - <td> - <? if ($task->state == "success"): ?> - <?= t("Success") ?> - <? elseif ($task->state == "error"): ?> - <?= t("Failed") ?> - <? elseif ($task->state == "cancelled"): ?> - <?= t("Cancelled") ?> - <? endif ?> - </td> - <td> - <?= $task->status ?> - </td> - <td> - <?= html::clean($task->owner()->name) ?> - </td> - <td> - <? if ($task->done): ?> - <a href="<?= url::site("admin/maintenance/remove/$task->id?csrf=$csrf") ?>" class="g-button ui-state-default ui-corner-all"> - <?= t("remove") ?> - </a> - <? if ($task->get_log()): ?> - <a href="<?= url::site("admin/maintenance/show_log/$task->id?csrf=$csrf") ?>" class="g-dialog-link g-button ui-state-default ui-corner-all"> - <?= t("browse log") ?> - </a> - <? endif ?> - <? else: ?> - <a href="<?= url::site("admin/maintenance/resume/$task->id?csrf=$csrf") ?>" class="g-dialog-link g-button" ui-state-default ui-corner-all> - <?= t("resume") ?> - </a> - <a href="<?= url::site("admin/maintenance/cancel/$task->id?csrf=$csrf") ?>" class="g-button ui-state-default ui-corner-all"> - <?= t("cancel") ?> - </a> - <? endif ?> - </ul> - </td> - </tr> - <? endforeach ?> - <? $i++ ?> - </table> + <?= t("cancel all") ?></a> + <?= 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" : "" ?>"> + <td class="<?= $task->state == "stalled" ? "g-warning" : "" ?>"> + <?= gallery::date_time($task->updated) ?> + </td> + <td> + <?= $task->name ?> + </td> + <td> + <? if ($task->done): ?> + <? if ($task->state == "cancelled"): ?> + <?= t("Cancelled") ?> + <? endif ?> + <?= t("Close") ?> + <? elseif ($task->state == "stalled"): ?> + <?= t("Stalled") ?> + <? else: ?> + <?= t("%percent_complete% Complete", array("percent_complete" => $task->percent_complete)) ?> + <? endif ?> + </td> + <td> + <?= $task->status ?> + </td> + <td> + <?= html::clean($task->owner()->name) ?> + </td> + <td> + <a href="<?= url::site("admin/maintenance/cancel/$task->id?csrf=$csrf") ?>" + class="g-button g-right ui-icon-left ui-state-default ui-corner-all"> + <?= t("cancel") ?> + </a> + <? if ($task->state == "stalled"): ?> + <a class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all" + href="<?= url::site("admin/maintenance/resume/$task->id?csrf=$csrf") ?>"> + <?= t("resume") ?> + </a> + <? endif ?> + </td> + </tr> + <? $i++ ?> + <? endforeach ?> + </table> + </div> + <? endif ?> + + <? if ($finished_tasks->count()): ?> + <div id="g-finished-tasks"> + <h2> <?= t("Finished Tasks") ?> </h2> + <table> + <tr> + <th> + <?= t("Last Updated") ?> + </th> + <th> + <?= t("Name") ?> + </th> + <th> + <?= t("Status") ?> + </th> + <th> + <?= t("Info") ?> + </th> + <th> + <?= t("Owner") ?> + </th> + <th> + <a href="<?= url::site("admin/maintenance/remove_finished_tasks?csrf=$csrf") ?>" + class="g-button g-right ui-icon-left ui-state-default ui-corner-all"> + <span class="ui-icon ui-icon-trash"></span><?= t("remove all finished") ?></a> + <?= 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" ?>"> + <td class="<?= $task->state == "success" ? "g-success" : "g-error" ?>"> + <?= gallery::date_time($task->updated) ?> + </td> + <td> + <?= $task->name ?> + </td> + <td> + <? if ($task->state == "success"): ?> + <?= t("Success") ?> + <? elseif ($task->state == "error"): ?> + <?= t("Failed") ?> + <? elseif ($task->state == "cancelled"): ?> + <?= t("Cancelled") ?> + <? endif ?> + </td> + <td> + <?= $task->status ?> + </td> + <td> + <?= html::clean($task->owner()->name) ?> + </td> + <td> + <? if ($task->done): ?> + <a href="<?= url::site("admin/maintenance/remove/$task->id?csrf=$csrf") ?>" class="g-button ui-state-default ui-corner-all"> + <?= t("remove") ?> + </a> + <? if ($task->get_log()): ?> + <a href="<?= url::site("admin/maintenance/show_log/$task->id?csrf=$csrf") ?>" class="g-dialog-link g-button ui-state-default ui-corner-all"> + <?= t("browse log") ?> + </a> + <? endif ?> + <? else: ?> + <a href="<?= url::site("admin/maintenance/resume/$task->id?csrf=$csrf") ?>" class="g-dialog-link g-button" ui-state-default ui-corner-all> + <?= t("resume") ?> + </a> + <a href="<?= url::site("admin/maintenance/cancel/$task->id?csrf=$csrf") ?>" class="g-button ui-state-default ui-corner-all"> + <?= t("cancel") ?> + </a> + <? endif ?> + </ul> + </td> + </tr> + <? endforeach ?> + <? $i++ ?> + </table> + </div> + <? endif ?> </div> - <? endif ?> </div> |