' . _('Description') . '';
$parsedown = new Parsedown();
$description .= '
' . $parsedown->parse($room['description']) . '
';
}
$tabs = [];
$selected = 0;
if (! empty($room['map_url'])) {
$tabs[_('Map')] = '';
}
$tabs[_('Shifts')] = div('first', [
$shiftsFilterRenderer->render(page_link_to('rooms', [
'action' => 'view',
'room_id' => $room['RID']
])),
$shiftCalendarRenderer->render()
]);
$selected_tab = 0;
$request = request();
if ($request->has('shifts_filter_day')) {
$selected_tab = count($tabs) - 1;
}
return page_with_title(glyph('map-marker') . $room['Name'], [
$assignNotice,
$description,
tabs($tabs, $selected_tab)
]);
}
/**
*
* @param array $room
* @return string
*/
function Room_name_render($room)
{
global $privileges;
if (in_array('view_rooms', $privileges)) {
return '' . glyph('map-marker') . $room['Name'] . '';
}
return glyph('map-marker') . $room['Name'];
}