summaryrefslogtreecommitdiff
path: root/modules/scheduler/views
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2010-02-01 17:13:29 -0800
committerTim Almdal <tnalmdal@shaw.ca>2010-02-01 17:13:29 -0800
commita10bdd8f0e436e8bb41430ca5d18fb2e1682773c (patch)
tree9e1eea64ba583450a78019cec7312beb1d2afa82 /modules/scheduler/views
parent5ded9e8ac5935e41c08d1766974ce31890efd7f0 (diff)
Add a task scheduling module. In the admin maintenance, create an event from an existing task. When the task becomes due, it will run depending on traffic to the web site. It uses the gallery_shutdown event to time slice the task.
Diffstat (limited to 'modules/scheduler/views')
-rw-r--r--modules/scheduler/views/admin_schedule.html.php11
-rw-r--r--modules/scheduler/views/admin_schedule_confirm.html.php4
-rw-r--r--modules/scheduler/views/scheduler_definitions.html.php49
3 files changed, 64 insertions, 0 deletions
diff --git a/modules/scheduler/views/admin_schedule.html.php b/modules/scheduler/views/admin_schedule.html.php
new file mode 100644
index 00000000..3d45dc53
--- /dev/null
+++ b/modules/scheduler/views/admin_schedule.html.php
@@ -0,0 +1,11 @@
+<?php defined("SYSPATH") or die("No direct script access.") ?>
+<style>
+#g-define-schedule fieldset fieldset li {
+ margin-right: .5em;
+}
+
+#g-schedule-time {
+ width: 40px !important;
+}
+</style>
+<?= $form ?>
diff --git a/modules/scheduler/views/admin_schedule_confirm.html.php b/modules/scheduler/views/admin_schedule_confirm.html.php
new file mode 100644
index 00000000..5d09654d
--- /dev/null
+++ b/modules/scheduler/views/admin_schedule_confirm.html.php
@@ -0,0 +1,4 @@
+<?php defined("SYSPATH") or die("No direct script access.") ?>
+<h1 style="display:none"><?= t("Confirm task removal") ?></h1>
+<p class="g-warning"><?= t("Really remove the task: %name", array("name" => $name)) ?></p>
+<?= $form ?>
diff --git a/modules/scheduler/views/scheduler_definitions.html.php b/modules/scheduler/views/scheduler_definitions.html.php
new file mode 100644
index 00000000..0ab46f2b
--- /dev/null
+++ b/modules/scheduler/views/scheduler_definitions.html.php
@@ -0,0 +1,49 @@
+<?php defined("SYSPATH") or die("No direct script access.") ?>
+<div id="g-sheduled-tasks">
+ <h2> <?= t("Scheduled tasks") ?> </h2>
+ <table>
+ <tr>
+ <th>
+ <?= t("Name") ?>
+ </th>
+ <th>
+ <?= t("Next run") ?>
+ </th>
+ <th>
+ <?= t("Interval") ?>
+ </th>
+ <th>
+ <?= t("Status") ?>
+ </th>
+ <th>
+ <?= t("Action") ?>
+ </th>
+ </tr>
+ <? foreach ($schedule_definitions as $entry): ?>
+ <tr class="<?= text::alternate("g-odd", "g-even") ?>">
+ <td>
+ <?= html::clean($entry->name) ?>
+ </td>
+ <td>
+ <?= html::clean($entry->run_date) ?>
+ </td>
+ <td>
+ <?= html::clean($entry->interval) ?>
+ </td>
+ <td>
+ <?= html::clean($entry->status) ?>
+ </td>
+ <td>
+ <a href="<?= url::site("admin/schedule/update_form/$entry->id?csrf=$csrf") ?>"
+ class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all">
+ <?= t("edit") ?>
+ </a>
+ <a href="<?= url::site("admin/schedule/remove_form/$entry->id?csrf=$csrf") ?>"
+ class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all">
+ <?= t("remove") ?>
+ </a>
+ </td>
+ </tr>
+ <? endforeach ?>
+ </table>
+</div>