26 lines
1.3 KiB
Twig
26 lines
1.3 KiB
Twig
{#
|
|
The car park. See board/plan/_desk.html.twig for how geometry, Resource.svgElementId and the
|
|
box height relate; found by convention from ResourceType::PARKING->value.
|
|
#}
|
|
{% import 'board/plan/_spot.html.twig' as plan %}
|
|
|
|
{% set geometry = {
|
|
'parking-01': { x: 40, y: 50 }, 'parking-02': { x: 40, y: 140 }, 'parking-03': { x: 40, y: 230 },
|
|
'parking-04': { x: 280, y: 50 }, 'parking-05': { x: 280, y: 140 }, 'parking-06': { x: 280, y: 230 }
|
|
} %}
|
|
{% set time_params = selected_time.allDay ? {} : { from: selected_time.start, to: selected_time.end } %}
|
|
|
|
<svg viewBox="0 0 520 346" class="w-full h-auto" role="group" aria-label="Parkplatz">
|
|
<rect x="10" y="18" width="500" height="308" rx="8" class="fill-white stroke-gray-300" stroke-width="2"></rect>
|
|
<text x="20" y="12" class="fill-gray-400 text-xs font-semibold">Parkplatz</text>
|
|
{# The lane between the two rows. #}
|
|
<line x1="265" y1="36" x2="265" y2="310" class="stroke-gray-200" stroke-width="2" stroke-dasharray="6 6"></line>
|
|
|
|
{% for resource in resources %}
|
|
{% if resource.svgElementId and geometry[resource.svgElementId] is defined %}
|
|
{{ plan.spot(spots[resource.id], geometry[resource.svgElementId], 200, 78,
|
|
selected_date, is_past, time_params) }}
|
|
{% endif %}
|
|
{% endfor %}
|
|
</svg>
|