diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-03-09 07:28:19 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-03-09 07:28:19 +0000 |
commit | e37faa0008df38088a55932786955e68ee1f955f (patch) | |
tree | 78fc0df349fb5a55335c81f2608c202eee9fcd5a /core/views | |
parent | 622358ebc8eba1cfd17f8e7cbb5c8557fd7c4bee (diff) |
More tasks cleanup.
Don't join through to the users table; that won't work in embedded
mode. Instead, add Tasks_Model::owner() that calls user::lookup() and
refer to the object directly in the view.
Add Admin_Maintenance:remove_finished_tasks() so that we can easily do
old task cleanup.
Hide Running / Finished sections if there aren't any running or
finished tasks.
Diffstat (limited to 'core/views')
-rw-r--r-- | core/views/admin_maintenance.html.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/core/views/admin_maintenance.html.php b/core/views/admin_maintenance.html.php index 2570dcee..e3afb9f5 100644 --- a/core/views/admin_maintenance.html.php +++ b/core/views/admin_maintenance.html.php @@ -38,6 +38,7 @@ </table> </div> + <? if ($running_tasks->count()): ?> <div id="gRunningTasks"> <h2> <?= t("Running Tasks") ?> </h2> @@ -86,7 +87,7 @@ <?= $task->status ?> </td> <td> - <?= $task->user_name ?> + <?= $task->owner()->name ?> </td> <td> <? if ($task->state == "stalled"): ?> @@ -102,9 +103,12 @@ <? endforeach ?> </table> </div> + <? endif ?> + <? if ($finished_tasks->count()): ?> <div id="gFinishedTasks"> <h2> <?= t("Finished Tasks") ?> </h2> + <a href="<?= url::site("admin/maintenance/remove_finished_tasks?csrf=$csrf") ?>"><?= t("remove all") ?></a> <table> <tr> @@ -148,7 +152,7 @@ <?= $task->status ?> </td> <td> - <?= $task->user_name ?> + <?= $task->owner()->name ?> </td> <td> <? if ($task->done): ?> @@ -168,4 +172,5 @@ <? endforeach ?> </table> </div> + <? endif ?> </div> |