blob: 45633a049a064ab4ae47ee1ce78b0ab1aba0c997 (
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
|
<?php
/*
Template parameters:
- $draggable_items: bool: If the clipboard items shall be draggable or not
- $item: Array|null: An associative array with item attributes or null.
If $item is an associative array it must have the following structure:
[
'id' => The ID of the item.
'name' => The name of the item.
'range_id' => The range-ID of the item.
'range_type' => The range type of the item.
]
If $item is null this template switches to HTML template mode which means
placeholders are generated for the item attributes inside the HTML code.
Furthermore template specific classes are added to the li element.
The placeholders are named as follows:
'id' => ITEM_ID
'name' => NAME
'range_id' => RANGE_ID
'range_type' => RANGE_TYPE
*/
$classes = 'clipboard-item ';
if ($draggable_items) {
$classes .= 'draggable ';
}
if (!$item) {
$classes .= 'clipboard-item-template invisible';
}
?>
<tr class="<?= htmlReady($classes) ?>"
data-range_id="<?= htmlReady($item['range_id'] ?? '') ?>">
<td class="item-name"><?= htmlReady($item['name'] ?? '') ?></td>
<td class="actions">
<a href="<?= Room::getLinkForAction('show', (!empty($item) ? $item['range_id'] : 'RANGE_ID')) ?>" data-dialog>
<?= Icon::create('info-circle')->asImg([
'title' => _('Rauminformationen'),
'class' => 'text-bottom'
])?>
</a>
<a href="<?= Room::getLinkForAction('semester_plan', (!empty($item) ? $item['range_id'] : 'RANGE_ID')) ?>" target="_blank">
<?= Icon::create('timetable')->asImg([
'title' => _('Semesterbelegung'),
'class' => 'text-bottom'
])?>
</a>
<?= Icon::create('trash')->asInput([
'data-confirm-message' => _('Sind Sie sicher?'),
'class' => 'text-bottom clipboard-item-remove-button'
]) ?>
</td>
</tr>
|