engelsystem/includes/view/Rooms_view.php

20 lines
624 B
PHP
Raw Normal View History

2014-12-22 17:55:20 +01:00
<?php
use Engelsystem\ShiftsFilterRenderer;
use Engelsystem\ShiftCalendarRenderer;
function Room_view($room, ShiftsFilterRenderer $shiftsFilterRenderer, ShiftCalendarRenderer $shiftCalendarRenderer) {
return page_with_title(glyph('map-marker') . $room['Name'], [
$shiftsFilterRenderer->render(room_link($room)) ,
$shiftCalendarRenderer->render()
]);
}
2014-12-22 17:55:20 +01:00
function Room_name_render($room) {
global $privileges;
2016-10-07 17:22:48 +02:00
if (in_array('view_rooms', $privileges)) {
2014-12-22 17:55:20 +01:00
return '<a href="' . room_link($room) . '">' . glyph('map-marker') . $room['Name'] . '</a>';
}
return glyph('map-marker') . $room['Name'];
2014-12-22 17:55:20 +01:00
}
?>