2014-12-22 17:55:20 +01:00
|
|
|
<?php
|
2016-10-05 18:56:50 +02:00
|
|
|
use Engelsystem\ShiftsFilterRenderer;
|
2016-10-05 22:28:39 +02:00
|
|
|
use Engelsystem\ShiftCalendarRenderer;
|
2016-10-05 18:56:50 +02:00
|
|
|
|
2016-10-05 22:28:39 +02:00
|
|
|
function Room_view($room, ShiftsFilterRenderer $shiftsFilterRenderer, ShiftCalendarRenderer $shiftCalendarRenderer) {
|
2016-10-05 18:56:50 +02:00
|
|
|
return page_with_title(glyph('map-marker') . $room['Name'], [
|
2016-10-05 22:28:39 +02:00
|
|
|
$shiftsFilterRenderer->render(room_link($room)) ,
|
|
|
|
$shiftCalendarRenderer->render()
|
2016-10-05 18:56:50 +02:00
|
|
|
]);
|
|
|
|
}
|
2014-12-22 17:55:20 +01:00
|
|
|
|
|
|
|
function Room_name_render($room) {
|
|
|
|
global $privileges;
|
2016-09-29 11:18:17 +02:00
|
|
|
if (in_array('admin_rooms', $privileges)) {
|
2014-12-22 17:55:20 +01:00
|
|
|
return '<a href="' . room_link($room) . '">' . glyph('map-marker') . $room['Name'] . '</a>';
|
2016-09-29 11:18:17 +02:00
|
|
|
}
|
2014-12-28 01:27:41 +01:00
|
|
|
return glyph('map-marker') . $room['Name'];
|
2014-12-22 17:55:20 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
?>
|