46 lines
1.6 KiB
PHP
46 lines
1.6 KiB
PHP
|
|
<?php
|
|||
|
|
/** @var array $info */
|
|||
|
|
$owner = trim((string) $info['owner']) !== '' ? trim((string) $info['owner']) : (string) $info['business_name'];
|
|||
|
|
$sections = agb_sections();
|
|||
|
|
?>
|
|||
|
|
<p class="legal-eyebrow">Mietbedingungen</p>
|
|||
|
|
<h1>Allgemeine Geschäftsbedingungen (AGB)</h1>
|
|||
|
|
<p class="legal-lead">
|
|||
|
|
für die Vermietung von Kühlanhängern & Kühltrühen –
|
|||
|
|
<?= e($owner) ?> – „<?= e((string) $info['business_name']) ?>“ (nachfolgend „Vermieter“).
|
|||
|
|
</p>
|
|||
|
|
|
|||
|
|
<nav class="legal-toc" aria-label="Inhalt dieser Bedingungen">
|
|||
|
|
<ol>
|
|||
|
|
<?php foreach ($sections as $section): ?>
|
|||
|
|
<li><a href="#<?= e((string) $section['id']) ?>"><?= e((string) $section['title']) ?></a></li>
|
|||
|
|
<?php endforeach; ?>
|
|||
|
|
</ol>
|
|||
|
|
</nav>
|
|||
|
|
|
|||
|
|
<?php foreach ($sections as $index => $section): ?>
|
|||
|
|
<section class="legal-section" id="<?= e((string) $section['id']) ?>">
|
|||
|
|
<h2><?= e(agb_heading((int) $index, $section)) ?></h2>
|
|||
|
|
<?php foreach (agb_plain_blocks($section) as $block): ?>
|
|||
|
|
<?php if ($block['type'] === 'p'): ?>
|
|||
|
|
<p><?= e($block['text']) ?></p>
|
|||
|
|
<?php endif; ?>
|
|||
|
|
<?php endforeach; ?>
|
|||
|
|
<?php
|
|||
|
|
$items = [];
|
|||
|
|
foreach ($section['blocks'] as $raw) {
|
|||
|
|
foreach ((array) ($raw['ul'] ?? []) as $item) {
|
|||
|
|
$items[] = (string) $item;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
?>
|
|||
|
|
<?php if ($items !== []): ?>
|
|||
|
|
<ul>
|
|||
|
|
<?php foreach ($items as $item): ?>
|
|||
|
|
<li><?= e($item) ?></li>
|
|||
|
|
<?php endforeach; ?>
|
|||
|
|
</ul>
|
|||
|
|
<?php endif; ?>
|
|||
|
|
</section>
|
|||
|
|
<?php endforeach; ?>
|