1<?php 2 3declare(strict_types=1); 4 5use Fisharebest\Webtrees\Individual; 6use Fisharebest\Webtrees\Module\ModuleSidebarInterface; 7use Illuminate\Support\Collection; 8 9/** 10 * @var Individual $record 11 * @var Collection<int,ModuleSidebarInterface> $sidebars 12 */ 13?> 14 15<div class="accordion wt-sidebar" id="sidebar"> 16 <?php foreach ($sidebars as $sidebar) : ?> 17 <div class="accordion-item"> 18 <div class="accordion-header" id="sidebar-header-<?= $sidebar->name() ?>"> 19 <button class="accordion-button gap-1<?= $sidebar->name() === 'family_nav' ? '' : ' collapsed' ?>" type="button" data-bs-toggle="collapse" data-bs-target="#sidebar-content-<?= $sidebar->name() ?>" aria-expanded="<?= $sidebar->name() === 'family_nav' ? 'true' : 'false' ?>" aria-controls="sidebar-content-<?= $sidebar->name() ?>"> 20 <?= view('icons/expand') ?> 21 <?= view('icons/collapse') ?> 22 <?= $sidebar->sidebarTitle($record) ?> 23 </button> 24 </div> 25 <div id="sidebar-content-<?= $sidebar->name() ?>" class="accordion-collapse collapse<?= $sidebar->name() === 'family_nav' ? ' show' : '' ?>" data-bs-parent="#sidebar" aria-labelledby="sidebar-header-<?= $sidebar->name() ?>"> 26 <div class="accordion-body"> 27 <?= $sidebar->getSidebarContent($record) ?> 28 </div> 29 </div> 30 </div> 31 <?php endforeach ?> 32</div> 33