1a72fff1fSGreg Roach<?php 2a72fff1fSGreg Roach 3*10e06497SGreg Roachdeclare(strict_types=1); 4*10e06497SGreg Roach 5a72fff1fSGreg Roachuse Fisharebest\Webtrees\Fact; 6a72fff1fSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\EditFactPage; 7a72fff1fSGreg Roachuse Fisharebest\Webtrees\I18N; 8a72fff1fSGreg Roachuse Fisharebest\Webtrees\Registry; 9a72fff1fSGreg Roach 10a72fff1fSGreg Roach/** 11a72fff1fSGreg Roach * @var Fact $fact 12a72fff1fSGreg Roach */ 13a72fff1fSGreg Roach 14a72fff1fSGreg Roach$individual = $fact->record(); 15a72fff1fSGreg Roach$tree = $individual->tree(); 16a72fff1fSGreg Roach 17a72fff1fSGreg Roach$container_class = ''; 18a72fff1fSGreg Roachif ($fact->isPendingDeletion()) { 19a72fff1fSGreg Roach $container_class = 'wt-old'; 20a72fff1fSGreg Roach} elseif ($fact->isPendingAddition()) { 21a72fff1fSGreg Roach $container_class = 'wt-new'; 22a72fff1fSGreg Roach} 23a72fff1fSGreg Roach 24a72fff1fSGreg Roach?> 25a72fff1fSGreg Roach<div class="accordion-item <?= $container_class ?>"> 26a72fff1fSGreg Roach <div class="accordion-header" id="name-header-<?= $fact->id() ?>"> 27a72fff1fSGreg Roach <button class="accordion-button collapsed gap-1" type="button" data-bs-toggle="collapse" data-bs-target="#name-content-<?= $fact->id() ?>" aria-expanded="false" aria-controls="name-content-<?= $fact->id() ?>"> 28a72fff1fSGreg Roach <?= view('icons/expand') ?> 29a72fff1fSGreg Roach <?= view('icons/collapse') ?> 30a72fff1fSGreg Roach <span class="label"><?= I18N::translate('Gender') ?></span> 31a72fff1fSGreg Roach <?= Registry::elementFactory()->make('INDI:SEX')->value($fact->value(), $tree) ?> 32a72fff1fSGreg Roach </button> 33a72fff1fSGreg Roach </div> 34a72fff1fSGreg Roach <div id="name-content-<?= $fact->id() ?>" class="accordion-collapse collapse" data-bs-parent="#individual-names" aria-labelledby="name-header-<?= $fact->id() ?>"> 35a72fff1fSGreg Roach <div class="accordion-body"> 36a72fff1fSGreg Roach <?= view('fact-sources', ['fact' => $fact]) ?> 37a72fff1fSGreg Roach <?= view('fact-notes', ['fact' => $fact]) ?> 38a72fff1fSGreg Roach 39a72fff1fSGreg Roach <?php if ($fact->canEdit()) : ?> 40a72fff1fSGreg Roach <div class="d-flex"> 41a72fff1fSGreg Roach <a class="btn btn-link ms-auto" href="<?= e(route(EditFactPage::class, ['xref' => $fact->record()->xref(), 'fact_id' => $fact->id(), 'tree' => $fact->record()->tree()->name()])) ?>" 42a72fff1fSGreg Roach title="<?= I18N::translate('Edit the gender') ?>"> 43a72fff1fSGreg Roach <?= view('icons/edit') ?> 44a72fff1fSGreg Roach <span class="visually-hidden"><?= I18N::translate('Edit the gender') ?></span> 45a72fff1fSGreg Roach </a> 46a72fff1fSGreg Roach </div> 47a72fff1fSGreg Roach <?php endif ?> 48a72fff1fSGreg Roach </div> 49a72fff1fSGreg Roach </div> 50a72fff1fSGreg Roach</div> 51