summaryrefslogtreecommitdiff
path: root/includes/view/Rooms_view.php
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2016-11-09 17:43:56 +0100
committerGitHub <noreply@github.com>2016-11-09 17:43:56 +0100
commitd43eb41d25d0d5c0509417247030dd6c21118cf6 (patch)
tree2c3f78bf8fbd4215e70af7dbc2ce30cfef674816 /includes/view/Rooms_view.php
parentd5d2acc7d80920eef5f0ed779a3738a12d5db348 (diff)
parent22520532c78b3a032aec6ececb7623ba094da8de (diff)
Merge pull request #274 from engelsystem/task-164-shift-view
Task 164 shift view
Diffstat (limited to 'includes/view/Rooms_view.php')
-rw-r--r--includes/view/Rooms_view.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/includes/view/Rooms_view.php b/includes/view/Rooms_view.php
index c820e983..7afdc67b 100644
--- a/includes/view/Rooms_view.php
+++ b/includes/view/Rooms_view.php
@@ -1,8 +1,17 @@
<?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('admin_rooms', $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'];