You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.0 KiB
PHTML

<?php
7 years ago
use Engelsystem\ShiftCalendarRenderer;
8 years ago
use Engelsystem\ShiftsFilterRenderer;
/**
* @param array $room
* @param ShiftsFilterRenderer $shiftsFilterRenderer
* @param ShiftCalendarRenderer $shiftCalendarRenderer
* @return string
*/
8 years ago
function Room_view($room, ShiftsFilterRenderer $shiftsFilterRenderer, ShiftCalendarRenderer $shiftCalendarRenderer)
{
global $user;
$assignNotice = '';
if (config('signup_requires_arrival') && !$user['Gekommen']) {
$assignNotice = info(render_user_arrived_hint(), true);
}
8 years ago
return page_with_title(glyph('map-marker') . $room['Name'], [
7 years ago
$shiftsFilterRenderer->render($room),
$assignNotice,
8 years ago
$shiftCalendarRenderer->render()
]);
}
/**
* @param array $room
* @return string
*/
8 years ago
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'];
}