summaryrefslogtreecommitdiff
path: root/includes/view/Rooms_view.php
blob: 7afdc67baccf6809b51690bc3b9256d1f2093a66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?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()
  ]);
}

function Room_name_render($room) {
  global $privileges;
  if (in_array('view_rooms', $privileges)) {
    return '<a href="' . room_link($room) . '">' . glyph('map-marker') . $room['Name'] . '</a>';
  }
  return glyph('map-marker') . $room['Name'];
}

?>