render_partial('dates/_seminar_rooms', [ 'assigned' => $cycle['assigned_rooms'], 'freetext' => $cycle['freetext_rooms'], 'link' => true ] ); endif; $output[] = $cycle_output; endforeach; echo implode(",
", $output); $freetext_rooms = []; $irregular_rooms = []; $irregular = []; if (isset($dates['irregular']) && is_array($dates['irregular'])): foreach ($dates['irregular'] as $date) : if (empty($with_past_intervals) && $date['end_time'] < $now) { continue; } $irregular[] = $date; $irregular_strings[] = $date['tostring']; if (!empty($date['resource_id'])) : if (!isset($irregular_rooms[$date['resource_id']])) : $irregular_rooms[$date['resource_id']] = 0; endif; $irregular_rooms[$date['resource_id']]++; elseif (!empty($date['raum'])) : if (!isset($freetext_rooms['('. $date['raum'] .')'])) : $freetext_rooms['('. $date['raum'] .')'] = 0; endif; $freetext_rooms['('. $date['raum'] .')']++; endif; endforeach; unset($irregular_rooms['']); echo count($output) ? ",
" : ''; $rooms = array_merge(getPlainRooms($irregular_rooms), array_keys($freetext_rooms)); if (is_array($irregular) && count($irregular)) : if (isset($shrink) && !$shrink && count($irregular) < 20) : foreach ($irregular as $date) : if (empty($with_past_intervals) && $date->end_time < $now) { continue; } echo $date['tostring'] ?? ''; if ($show_room && !empty($date['resource_id'])) : echo ', '. _('Ort:') . ' '; $room_obj = Room::find($date['resource_id']); echo '' . htmlReady($room_obj->name) . ''; endif; echo "
"; endforeach; else : echo _("Termine am") . implode(', ', shrink_dates($irregular)); if (count($rooms) > 0) : if (count($rooms) > 3) : $rooms = array_slice($rooms, count($rooms) - 3, count($rooms)); endif; if ($show_room) : echo ', ' . _("Ort:") . ' '; echo implode(', ', $rooms); endif; endif; echo "
"; endif; endif; endif; endif;