1<?php 2 3use Fisharebest\Webtrees\Individual; 4use Fisharebest\Webtrees\Module\ModuleSidebarInterface; 5use Illuminate\Support\Collection; 6 7/** 8 * @var Individual $record 9 * @var Collection<int,ModuleSidebarInterface> $sidebars 10 */ 11?> 12 13<div class="accordion" id="sidebar"> 14 <?php foreach ($sidebars as $sidebar) : ?> 15 <div class="accordion-item"> 16 <div class="accordion-header" id="sidebar-header-<?= $sidebar->name() ?>"> 17 <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() ?>"> 18 <?= view('icons/expand') ?> 19 <?= view('icons/collapse') ?> 20 <?= $sidebar->sidebarTitle($record) ?> 21 </button> 22 </div> 23 <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() ?>"> 24 <div class="accordion-body"> 25 <?= $sidebar->getSidebarContent($record) ?> 26 </div> 27 </div> 28 </div> 29 <?php endforeach ?> 30</div> 31