aboutsummaryrefslogtreecommitdiff
path: root/app/views/admin/cronjobs/schedules
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/admin/cronjobs/schedules')
-rw-r--r--app/views/admin/cronjobs/schedules/display.php22
-rw-r--r--app/views/admin/cronjobs/schedules/edit.php39
-rw-r--r--app/views/admin/cronjobs/schedules/index.php31
3 files changed, 6 insertions, 86 deletions
diff --git a/app/views/admin/cronjobs/schedules/display.php b/app/views/admin/cronjobs/schedules/display.php
index 8eb9075..ddf1d21 100644
--- a/app/views/admin/cronjobs/schedules/display.php
+++ b/app/views/admin/cronjobs/schedules/display.php
@@ -16,9 +16,6 @@
<dt><?= _('Aktiv') ?></dt>
<dd><?= $schedule->active ? _('Ja') : _('Nein') ?></dd>
- <dt><?= _('Priorität') ?></dt>
- <dd><?= CronjobSchedule::describePriority($schedule->priority) ?></dd>
-
<? if (count($schedule->parameters) > 0): ?>
<dt><?= _('Parameter') ?></dt>
<dd>
@@ -33,23 +30,8 @@
<dt><?= _('Aufgabe') ?></dt>
<dd><?= htmlReady($schedule->task->name) ?></dd>
- <dt><?= _('Typ') ?></dt>
-<? if ($schedule->type === 'once'): ?>
- <dd>
- <?= sprintf(_('Einmalig am %s um %s'), date('d.m.Y', $schedule->next_execution), date('H:i', $schedule->next_execution)) ?>
- </dd>
-
- <dt><?= _('Ausgeführt') ?>?</dt>
- <dd>
- <? if ($schedule->execution_count > 0): ?>
- <?= _('Ja') ?>, <?= sprintf(_('am %s um %s'), date('d.m.Y', $schedule->last_execution), date('H:i:s', $schedule->last_execution)) ?>
- <? else: ?>
- <?= _('Nein') ?>
- <? endif; ?>
- </dd>
-<? else: ?>
+ <dt><?= _('Ausführungsrhytmus') ?></dt>
<dd>
- <?= _('Regelmässig') ?>
<?= $this->render_partial('admin/cronjobs/schedules/periodic-schedule', $schedule->toArray()) ?>
</dd>
@@ -68,8 +50,6 @@
<dt><?= _('Letztes Ergebnis') ?></dt>
<dd><code><?= htmlReady($schedule->last_result) ?></code></dd>
<? endif; ?>
-
-<? endif; ?>
</dl>
<div data-dialog-button>
diff --git a/app/views/admin/cronjobs/schedules/edit.php b/app/views/admin/cronjobs/schedules/edit.php
index 96be249..8754510 100644
--- a/app/views/admin/cronjobs/schedules/edit.php
+++ b/app/views/admin/cronjobs/schedules/edit.php
@@ -42,17 +42,6 @@ $days_of_week = [
</label>
<label>
- <?= _('Priorität') ?>
- <select name="priority" id="priority">
- <? foreach (CronjobSchedule::getPriorities() as $priority => $label): ?>
- <option value="<?= $priority ?>" <? if ((!$schedule->priority && $priority === CronjobSchedule::PRIORITY_NORMAL) || $schedule->priority === $priority) echo 'selected'; ?>>
- <?= htmlReady($label) ?>
- </option>
- <? endforeach; ?>
- </select>
- </label>
-
- <label>
<?= _('Titel') ?>
<input type="text" name="title" id="title" value="<?= htmlReady($schedule->title ?: '') ?>">
</label>
@@ -118,14 +107,6 @@ $days_of_week = [
<fieldset>
<legend><?= _('Zeitplan') ?></legend>
- <label>
- <input type="radio" name="type" value="periodic"
- data-activates="[name^='periodic']"
- data-deactivates="[name^='once']"
- <? if ($schedule->type === 'periodic') echo 'checked'; ?>>
- <?= _('Wiederholt') ?>
- </label>
-
<section>
<table class="default">
<colgroup>
@@ -218,26 +199,6 @@ $days_of_week = [
</tbody>
</table>
</section>
-
- <label>
- <input type="radio" name="type" value="once"
- data-activates="input[name^='once']"
- data-deactivates="[name^='periodic']"
- <? if ($schedule->type === 'once') echo 'checked'; ?>>
- <?= _('Einmalig') ?>
- </label>
-
- <label class="col-1">
- <?= _('Datum') ?>
- <input type="text" name="once[date]" data-date-picker class="size-s"
- value="<? if ($schedule->type === 'once' && $schedule->next_execution) echo date('d.m.Y', $schedule->next_execution); ?>">
- </label>
-
- <label class="col-1">
- <?= _('Uhrzeit') ?>
- <input type="text" name="once[time]" data-time-picker class="size-s"
- value="<? if ($schedule->type === 'once' && $schedule->next_execution) echo date('H:i', $schedule->next_execution) ?>">
- </label>
</fieldset>
<footer class="buttons">
diff --git a/app/views/admin/cronjobs/schedules/index.php b/app/views/admin/cronjobs/schedules/index.php
index 6160875..79a65be 100644
--- a/app/views/admin/cronjobs/schedules/index.php
+++ b/app/views/admin/cronjobs/schedules/index.php
@@ -18,30 +18,18 @@ use Studip\Button, Studip\LinkButton;
<?= sprintf(_('Passend: %u von %u Cronjobs'), count($schedules), $total) ?>
<? endif; ?>
</legend>
- <label class="col-2">
- <?= _('Typ') ?>
- <select name="filter[type]" id="type" class="submit-upon-select">
- <option value=""><?= _('Alle Cronjobs anzeigen') ?></option>
- <option value="once" <? if ($filter['type'] === 'once') echo 'selected'; ?>>
- <?= _('Nur einmalige Cronjobs anzeigen') ?>
- </option>
- <option value="periodic" <? if ($filter['type'] === 'periodic') echo 'selected'; ?>>
- <?= _('Nur regelmässige Cronjobs anzeigen') ?>
- </option>
- </select>
- </label>
- <label class="col-2">
+ <label class="col-3">
<?= _('Aufgabe') ?>
<select name="filter[task_id]" id="task_id" class="submit-upon-select">
<option value=""><?= _('Alle Cronjobs anzeigen') ?></option>
<? foreach ($tasks as $task): ?>
- <option value="<?= $task->task_id ?>" <? if ($filter['task_id'] === $task->task_id) echo 'selected'; ?>>
+ <option value="<?= $task->task_id ?>" <? if (isset($filter['task_id']) && $filter['task_id'] === $task->task_id) echo 'selected'; ?>>
<?= htmlReady($task->name) ?>
</option>
<? endforeach; ?>
</select>
</label>
- <label class="col-2">
+ <label class="col-3">
<?= _('Status') ?>
<select name="filter[status]" id="status" class="submit-upon-select">
<option value=""><?= _('Alle Cronjobs anzeigen') ?></option>
@@ -74,7 +62,6 @@ use Studip\Button, Studip\LinkButton;
<col style="width: 20px">
<col>
<col style="width: 40px">
- <col style="width: 100px">
<col style="width: 30px">
<col style="width: 30px">
<col style="width: 30px">
@@ -91,7 +78,6 @@ use Studip\Button, Studip\LinkButton;
</th>
<th data-sort="text"><?= _('Cronjob') ?></th>
<th data-sort="htmldata"><?= _('Aktiv') ?></th>
- <th data-sort="text"><?= _('Typ') ?></th>
<th colspan="5" data-sort="false"><?= _('Ausführung') ?></th>
<th data-sort="false"><?= _('Optionen') ?></th>
</tr>
@@ -124,14 +110,7 @@ use Studip\Button, Studip\LinkButton;
</a>
<? endif; ?>
</td>
- <td><?= $schedule->type === 'once' ? _('Einmalig') : _('Regelmässig') ?></td>
- <? if ($schedule->type === 'once'): ?>
- <td colspan="5">
- <?= strftime('%x %R', $schedule->next_execution) ?>
- </td>
- <? else: ?>
- <?= $this->render_partial('admin/cronjobs/schedules/periodic-schedule', $schedule->toArray() + ['display' => 'table-cells']) ?>
- <? endif; ?>
+ <?= $this->render_partial('admin/cronjobs/schedules/periodic-schedule', $schedule->toArray() + ['display' => 'table-cells']) ?>
<td style="text-align: right">
<a data-dialog href="<?= $controller->display($schedule) ?>">
<?= Icon::create('admin')->asImg(['title' => _('Cronjob anzeigen')]) ?>
@@ -152,7 +131,7 @@ use Studip\Button, Studip\LinkButton;
</tbody>
<tfoot>
<tr>
- <td colspan="10">
+ <td colspan="9">
<select name="action" data-activates=".cronjobs button[name=bulk]" aria-label="<?= _('Aktion auswählen')?>">
<option value="">- <?= _('Aktion auswählen') ?> -</option>
<option value="activate"><?= _('Aktivieren') ?></option>