blob: ab510b035641bde2e13e74dd7f70ed2896bd941e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
<?php
/**
* @var Admin_Cronjobs_TasksController $controller
* @var CronjobTask[] $tasks
*/
use Studip\Button;
?>
<form action="<?= $controller->bulk() ?>" method="post" class="default">
<?= CSRFProtection::tokenTag() ?>
<table class="default cronjobs sortable-table" data-sortlist="[[1,0]]">
<colgroup>
<col style="width: 20px">
<col style="width: 200px">
<col>
<col style="width: 100px">
<col style="width: 40px">
<col style="width: 84px">
</colgroup>
<thead>
<tr>
<th data-sort="false">
<input type="checkbox" name="all" value="1"
data-proxyfor=":checkbox[name='ids[]']"
data-activates=".cronjobs select[name=action]">
</th>
<th data-sort="text"><?= _('Aufgabe') ?></th>
<th data-sort="text"><?= _('Beschreibung') ?></th>
<th data-sort="text"><?= _('Herkunft') ?></th>
<th data-sort="htmldata"><?= _('Aktiv') ?></th>
<th data-sort="false"><?= _('Optionen') ?></th>
</tr>
</thead>
<tbody>
<? if (count($tasks) === 0): ?>
<tr class="empty">
<td colspan="6"><?= _('Keine Einträge vorhanden') ?></td>
</tr>
<? endif; ?>
<? foreach ($tasks as $task): ?>
<tr id="job-<?= htmlReady($task->id) ?>">
<td style="text-align: center">
<input type="checkbox" name="ids[]" value="<?= htmlReady($task->id) ?>">
</td>
<td><?= htmlReady($task->name) ?></td>
<td><?= htmlReady($task->description) ?></td>
<td><?= $task->isCore() ? _('Kern') : _('Plugin') ?></td>
<td style="text-align: center;" data-sort-value="'<?= (int) $task->active ?>'">
<? if ($task->active): ?>
<a href="<?= $controller->deactivate($task) ?>" data-behaviour="ajax-toggle">
<?= Icon::create('checkbox-checked')->asSvg(['title' => _('Aufgabe deaktivieren')]) ?>
</a>
<? else: ?>
<a href="<?= $controller->activate($task) ?>" data-behaviour="ajax-toggle">
<?= Icon::create('checkbox-unchecked')->asSvg(['title' => _('Aufgabe aktivieren')]) ?>
</a>
<? endif; ?>
</td>
<td style="text-align: right">
<? if ($task->valid): ?>
<a data-dialog href="<?= $controller->execute($task) ?>">
<?= Icon::create('play')->asSvg(['title' => _('Aufgabe ausführen')]) ?>
</a>
<? endif; ?>
<a href="<?= $controller->link_for('admin/cronjobs/logs/task', $task) ?>">
<?= Icon::create('log')->asSvg(['title' => _('Log anzeigen')]) ?>
</a>
<?= Icon::create('trash')->asInput([
'data-confirm' => _('Wollen Sie die ausgewählte Aufgabe wirklich löschen?'),
'formaction' => $controller->deleteURL($task),
]) ?>
</td>
</tr>
<? endforeach; ?>
</tbody>
<tfoot>
<tr>
<td colspan="6" class="groupactions">
<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>
<option value="deactivate"><?= _('Deaktivieren') ?></option>
<option value="delete"><?= _('Löschen') ?></option>
</select>
<?= Button::createAccept(_('Ausführen'), 'bulk') ?>
</td>
</tr>
</tfoot>
</table>
</form>
|