Refactor the admin maintenance screen so that events are used to pupluate the action buttons and other content such as the list of scheduled tasks.

This commit is contained in:
Tim Almdal
2010-02-02 14:34:50 -08:00
parent 8a9301f756
commit 19fee6b5e4
2 changed files with 16 additions and 11 deletions

View File

@@ -29,23 +29,21 @@
<?= $task->description ?>
</td>
<td>
<a href="<?= url::site("admin/maintenance/start/$task->callback?csrf=$csrf") ?>"
<? foreach ($task_buttons as $button): ?>
<a href="<?= "{$button->url}/$task->callback?csrf=$csrf" ?>"
class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all">
<?= t("run") ?>
<?= html::clean($button->text) ?>
</a>
<? if (module::is_active("scheduler")): ?>
<a href="<?= url::site("form/add/admin/schedule/$task->callback?csrf=$csrf") ?>"
class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all">
<?= t("schedule") ?>
</a>
<? endif ?>
<? endforeach ?>
</td>
</tr>
<? endforeach ?>
</table>
</div>
<?= $schedule_definitions ?>
<? foreach ($task_maintenance_content as $content): ?>
<?= $content ?>
<? endforeach ?>
<? if ($running_tasks->count()): ?>
<div id="g-running-tasks">