blob: 59a1c0f9002dabc2b742d7284a663e6636ac3550 (
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
93
94
95
96
97
98
99
100
101
|
<form method="post" action="<?= URLHelper::getLink('dispatch.php/admin/courseware/container_types') ?>">
<?= CSRFProtection::tokenTag() ?>
<table class="default sortable-table cw-admin-container-types">
<caption>
<?= _('Abschnittstypen') ?>
</caption>
<colgroup>
<col style="width: 5%">
<col style="width: 35%">
<col style="width: 60%">
</colgroup>
<thead>
<tr>
<th><?= _('Aktiv') ?></th>
<th data-sort="text"><?= _('Container-Typ') ?></th>
<th data-sort="text"><?= _('Beschreibung') ?></th>
</tr>
</thead>
<tbody>
<? foreach ($containerTypes as $containerType) { ?>
<? $isActivated = $containerType::isActivated(); ?>
<tr>
<td>
<label>
<? $formaction = $isActivated ? URLHelper::getURL(
'dispatch.php/admin/courseware/deactivate_container_types',
['container_types' => [$containerType]]
) :
URLHelper::getURL('dispatch.php/admin/courseware/activate_container_types', [
'container_types' => [$containerType],
])
?>
<span
class="sr-only"><? printf(_('Abschnittstyp "%s" %s'), $containerType::getTitle(), $isActivated ? _('deaktivieren') : _('aktivieren')) ?></span>
<button class="undecorated"
formaction="<?= $formaction ?>"><?= Icon::create($isActivated ? 'checkbox-checked' : 'checkbox-unchecked') ?></button>
</label>
</td>
<td data-sort-value="<?= htmlReady(strtolower($containerType::getType())) ?>">
<span><?= htmlReady($containerType::getTitle()) ?></span>
<span>(<?= htmlReady($containerType::getType()) ?>)</span>
</td>
<td data-sort-value="<?= htmlReady(strtolower($containerType::getDescription())) ?>">
<p>
<?= htmlReady($containerType::getDescription()) ?>
</p>
</td>
</tr>
<? } ?>
</tbody>
</table>
</form>
<form method="post" action="<?= URLHelper::getLink('dispatch.php/admin/courseware/block_types') ?>">
<?= CSRFProtection::tokenTag() ?>
<table class="default sortable-table cw-admin-block-types">
<caption><?= _('Blocktypen') ?></caption>
<colgroup>
<col style="width: 5%">
<col style="width: 35%">
<col style="width: 60%">
</colgroup>
<thead>
<tr>
<th><?= _('Aktiv') ?></th>
<th data-sort="text"><?= _('Block-Typ') ?></th>
<th data-sort="text"><?= _('Beschreibung') ?></th>
</tr>
</thead>
<tbody>
<? foreach ($blockTypes as $blockType) { ?>
<? $isActivated = $blockType::isActivated(); ?>
<tr>
<td>
<label>
<? $formaction = $isActivated ? URLHelper::getURL(
'dispatch.php/admin/courseware/deactivate_block_types',
['block_types' => [$blockType]]
) : URLHelper::getURL(
'dispatch.php/admin/courseware/activate_block_types',
['block_types' => [$blockType]]
) ?>
<span
class="sr-only"><? printf(_('Blocktyp "%s" %s'), $blockType::getTitle(), $isActivated ? _('deaktivieren') : _('aktivieren')) ?></span>
<button class="undecorated"
formaction="<?= $formaction ?>"><?= Icon::create($isActivated ? 'checkbox-checked' : 'checkbox-unchecked') ?></button>
</label>
</td>
<td data-sort-value="<?= htmlReady(strtolower($blockType::getType())) ?>">
<span><?= htmlReady($blockType::getTitle()) ?></span>
<span>(<?= htmlReady($blockType::getType()) ?>)</span>
</td>
<td data-sort-value="<?= htmlReady(strtolower($blockType::getDescription())) ?>">
<p>
<?= htmlReady($blockType::getDescription()) ?>
</p>
</td>
</tr>
<? } ?>
</tbody>
</table>
</form>
|