blob: 6a477b88c9d4518a5e81dbad5314ba399726f430 (
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
|
<?php
/**
* @var WikiPage[] $pages
* @var Course_WikiController $controller
*/
?>
<form action="<?= $controller->link_for('course/wiki/page_bulk') ?>" method="POST" data-dialog="width=700" class="default">
<?= CSRFProtection::tokenTag() ?>
<table class="default sortable-table" data-sortlist="[[0, 0]]">
<caption>
<?= _('Alle Seiten des Wikis') ?>
</caption>
<thead>
<tr>
<th>
<input
aria-label="<?= _('Alle Seiten auswählen') ?>"
type="checkbox"
name="all"
value="1"
data-proxyfor=":checkbox[name^=pages]"
>
</th>
<th data-sort="text"><?= _('Seitenname') ?></th>
<th data-sort="digit"><?= _('Änderungen') ?></th>
<th data-sort="htmldata"><?= _('Letzte Änderung') ?></th>
<th data-sort="text"><?= _('Zuletzt bearbeitet von') ?></th>
<th class="actions"><?= _('Aktionen') ?></th>
</tr>
</thead>
<tbody>
<? foreach ($pages as $page) : ?>
<tr>
<td>
<input
aria-label="<?= sprintf(_('Seite "%s" auswählen'), htmlReady($page->name)) ?>"
type="checkbox"
<?= $page->write_permission === 'dozent' && !$GLOBALS['perm']->have_studip_perm('dozent', Context::getId()) ? 'disabled' : '' ?>
name="pages_id[]"
value="<?= $page->page_id ?>"
/>
</td>
<td data-text="<?= htmlReady($page->name) ?>">
<a href="<?= $controller->page($page) ?>">
<?= htmlReady($page->name) ?>
</a>
</td>
<td><?= count($page->versions) + 1 ?></td>
<td data-sort-value="<?= $page->chdate ?>">
<?= $page->chdate > 0 ? date('d.m.Y H:i:s', $page->chdate) : _('unbekannt') ?>
</td>
<td data-text="<?= htmlReady($page->user ? $page->user->getFullName() : _('unbekannt')) ?>">
<? if ($page->user): ?>
<?= Avatar::getAvatarDropdownHTML($page->user, true) ?>
<? else: ?>
<?= _('unbekannt') ?>
<? endif; ?>
</td>
<td class="actions">
<? if ($page->isEditable()) : ?>
<?= $controller->getActionMenu($page, 'allpages') ?>
<? endif ?>
</td>
</tr>
<? endforeach ?>
</tbody>
<tfoot>
<tr>
<td colspan="6">
<select name="action" id="bulk_action" aria-label="<?= _('Aktion auswählen') ?>" required
onchange="$('#bulk_button').attr('data-confirm',
this.value === 'delete_pages' ? '<?= _('Wollen Sie Ihre Auswahl wirklich löschen?') ?>' : null)">
<option value="">- <?= _('Aktion auswählen') ?></option>
<option value="page_setting"><?= _('Seiteneinstellungen') ?></option>
<option value="delete_pages"><?= _('Löschen') ?></option>
</select>
<?= \Studip\Button::create(_('Ausführen'), 'render_form', ['id' => 'bulk_button']) ?>
</td>
</tr>
</tfoot>
</table>
</form>
<form action="" method="post" id="delete_page">
<?= CSRFProtection::tokenTag() ?>
</form>
|