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
102
103
104
105
106
107
108
109
110
|
<article class="studip room-list-item">
<header class="widget-header">
<h1><?= Assets::img(
'anfasser_24.png',
[
'class' => 'clipboard-draggable-item',
'data-id' => $room->id,
'data-range_type' => 'Room',
'data-name' => $room->name
]
) ?><?= htmlReady($room->name) ?></h1>
<?
$actions = ActionMenu::get();
$actions->addLink(
$room->getActionLink('show'),
_('Raumdetails anzeigen'),
Icon::create('info-circle'),
['data-dialog' => '']
);
if ($room->userHasPermission($current_user, 'autor')) {
$actions->addLink(
$room->getActionLink('booking_plan', $booking_plan_action_params),
_('Wochenbelegung'),
Icon::create('timetable'),
['target' => '_blank']
);
$actions->addLink(
$room->getActionLink('semester_plan'),
_('Semesterbelegung'),
Icon::create('timetable'),
['target' => '_blank']
);
} else {
if ($room->booking_plan_is_public && Config::get()->RESOURCES_SHOW_PUBLIC_ROOM_PLANS) {
$actions->addLink(
$room->getActionLink('booking_plan', $booking_plan_action_params),
_('Belegungsplan'),
Icon::create('timetable'),
['data-dialog' => 'size=big']
);
$actions->addLink(
$room->getActionLink('semester_plan'),
_('Semesterbelegung'),
Icon::create('timetable'),
['data-dialog' => 'size=big']
);
}
}
if ($room->requestable && $room->userHasRequestRights($current_user)) {
$actions->addLink(
$room->getActionLink('request'),
_('Raum anfragen'),
Icon::create('room-request'),
['data-dialog' => 'size=auto']
);
}
if ($room->building) {
$geo_coordinates_object = $room->building->getPropertyObject('geo_coordinates');
if ($geo_coordinates_object instanceof ResourceProperty) {
$actions->addLink(
ResourceManager::getMapUrlForResourcePosition(
$room->building->getPropertyObject('geo_coordinates')
),
_('Zum Lageplan'),
Icon::create('globe'),
['target' => '_blank']
);
}
}
if ($clipboard_widget_id) {
$actions->addLink(
'#',
_('Zur Raumgruppe hinzufügen'),
IcoN::create('add'),
[
'class' => 'clipboard-add-item-button',
'data-range_type' => 'Room',
'data-range_id' => $room->id,
'data-clipboard_id' => $clipboard_widget_id
]
);
}
?>
<?= $actions->render() ?>
</header>
<section>
<p class="description">
<?= htmlReady($room->description) ?>
</p>
<section class="properties-and-actions">
<ul class="property-list">
<? if ($room->room_type): ?>
<li><?= htmlReady($room->room_type) ?></li>
<? endif ?>
<? if ($room->seats): ?>
<li>
<?= sprintf(
ngettext(
'%d Sitzplatz',
'%d Sitzplätze',
$room->seats
),
$room->seats
) ?>
</li>
<? endif ?>
</ul>
</section>
</section>
</article>
|