blob: 74c6a2b6127a2a5d6b7c1d607c652d4ed35c365c (
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
|
<?php
/**
* @var Admin_DomainController $controller
* @var UserDomain[] $domains
*/
?>
<? if (count($domains) == 0) : ?>
<?= MessageBox::info(_('Es sind keine Nutzerdomänen vorhanden.')) ?>
<? else : ?>
<form method="post">
<?= CSRFProtection::tokenTag() ?>
<table class="default">
<colgroup>
<col style="width: 40%">
<col style="width: 20%">
<col style="width: 15%">
<col style="width: 15%">
<col style="width: 10%">
</colgroup>
<caption>
<?= _('Liste der Nutzerdomänen') ?>
</caption>
<thead>
<tr>
<th><?= _('Name') ?></th>
<th><?= _('ID') ?></th>
<th><?= _('Nutzer/-innen') ?></th>
<th><?= _('Veranstaltungen') ?></th>
<th class="actions"><?= _('Aktionen') ?></th>
</tr>
</thead>
<tbody>
<? foreach ($domains as $domain): ?>
<tr>
<td><?= htmlReady($domain->name) ?></td>
<td><?= htmlReady($domain->id) ?></td>
<td><?= $domain->countUsers() ?></td>
<td><?= $domain->countCourses() ?></td>
<td class="actions">
<a href="<?= $controller->link_for("admin/domain/edit/{$domain->id}") ?>" data-dialog="size=auto">
<?= Icon::create('edit')->asSvg(tooltip2(_('bearbeiten'))) ?>
</a>
<? if ($domain->countUsers() === 0): ?>
<?= Icon::create('trash')->asInput(tooltip2(_('löschen')) + [
'class' => 'text-top',
'formaction' => $controller->url_for("admin/domain/delete/{$domain->id}"),
'data-confirm' => _('Wollen Sie die Nutzerdomäne wirklich löschen?')
]) ?>
<? else: ?>
<?= Icon::create('trash', Icon::ROLE_INACTIVE)->asSvg(['title' => _('Domänen, denen noch Personen zugewiesen sind, können nicht gelöscht werden.')]) ?>
<? endif; ?>
</td>
</tr>
<? endforeach ?>
</tbody>
</table>
</form>
<? endif ?>
|