{# The car park. See board/plan/_desk.html.twig for how geometry and Resource.svgElementId relate; found by convention from ResourceType::PARKING->value. #} {% import 'board/plan/_spot.html.twig' as plan %} {% set geometry = { 'parking-01': { x: 40, y: 60 }, 'parking-02': { x: 40, y: 130 }, 'parking-03': { x: 40, y: 200 }, 'parking-04': { x: 280, y: 60 }, 'parking-05': { x: 280, y: 130 }, 'parking-06': { x: 280, y: 200 } } %} {% set time_params = selected_time.allDay ? {} : { from: selected_time.start, to: selected_time.end } %} Parkplatz {# The lane between the two rows. #} {% for resource in resources %} {% if resource.svgElementId and geometry[resource.svgElementId] is defined %} {{ plan.spot(resource, geometry[resource.svgElementId], 200, 55, bookings_by_resource[resource.id]|default([]), selected_date, is_past, time_params) }} {% endif %} {% endfor %}