13b3db8adSGreg Roach<?php 23b3db8adSGreg Roach 3*10e06497SGreg Roachdeclare(strict_types=1); 4*10e06497SGreg Roach 53b3db8adSGreg Roachuse Fisharebest\Webtrees\Auth; 60f5fd22fSGreg Roachuse Fisharebest\Webtrees\Fact; 7203146cfSGreg Roachuse Fisharebest\Webtrees\Family; 87c7d1e03SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\AddChildToFamilyPage; 908f0fd1cSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\AddNewFact; 107c7d1e03SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\AddSpouseToFamilyPage; 1143322877SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ChangeFamilyMembersPage; 123b3db8adSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\DeleteRecord; 133b3db8adSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\EditRawRecordPage; 143b3db8adSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ReorderChildrenPage; 153b3db8adSGreg Roachuse Fisharebest\Webtrees\I18N; 160f5fd22fSGreg Roachuse Illuminate\Support\Collection; 173b3db8adSGreg Roach 18203146cfSGreg Roach/** 1908f0fd1cSGreg Roach * @var bool $can_upload_media 2036779af1SGreg Roach * @var Collection<int,Fact> $clipboard_facts 21203146cfSGreg Roach * @var Family $record 22203146cfSGreg Roach */ 23203146cfSGreg Roach 243b3db8adSGreg Roach?> 25dd6b2bfcSGreg Roach 26dd6b2bfcSGreg Roach<div class="dropdown wt-page-menu"> 27315eb316SGreg Roach <button class="btn btn-primary dropdown-toggle wt-page-menu-button" type="button" id="page-menu" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> 287f85bc37SGreg Roach <?= view('icons/menu') ?> 29dd6b2bfcSGreg Roach <?= I18N::translate('edit') ?> 30dd6b2bfcSGreg Roach </button> 3104fe0783SGreg Roach 32315eb316SGreg Roach <div class="dropdown-menu dropdown-menu-end wt-page-menu-items" aria-labelledby="page-menu"> 3343322877SGreg Roach <a class="dropdown-item" href="<?= e(route(ChangeFamilyMembersPage::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref()])) ?>"> 3404fe0783SGreg Roach <?= view('icons/family') ?> 35dd6b2bfcSGreg Roach <?= I18N::translate('Change family members') ?> 36dd6b2bfcSGreg Roach </a> 37dd6b2bfcSGreg Roach 3817dd427eSGreg Roach <?php if ($record->husband() === null) : ?> 39efd4768bSGreg Roach <a class="dropdown-item" href="<?= e(route(AddSpouseToFamilyPage::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref(), 'sex' => 'M'])) ?>"> 4004fe0783SGreg Roach <?= view('icons/add') ?> 4117dd427eSGreg Roach <?= I18N::translate('Add a husband') ?> 4217dd427eSGreg Roach </a> 4317dd427eSGreg Roach <?php endif ?> 4417dd427eSGreg Roach 4517dd427eSGreg Roach <?php if ($record->wife() === null) : ?> 46efd4768bSGreg Roach <a class="dropdown-item" href="<?= e(route(AddSpouseToFamilyPage::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref(), 'sex' => 'F'])) ?>"> 4704fe0783SGreg Roach <?= view('icons/add') ?> 4817dd427eSGreg Roach <?= I18N::translate('Add a wife') ?> 4917dd427eSGreg Roach </a> 5017dd427eSGreg Roach <?php endif ?> 5117dd427eSGreg Roach 52efd4768bSGreg Roach <a class="dropdown-item" href="<?= e(route(AddChildToFamilyPage::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref(), 'sex' => 'U'])) ?>"> 5304fe0783SGreg Roach <?= view('icons/add') ?> 5417dd427eSGreg Roach <?= I18N::translate('Add a child') ?> 55dd6b2bfcSGreg Roach </a> 56dd6b2bfcSGreg Roach 5739ca88baSGreg Roach <?php if ($record->numberOfChildren() > 1) : ?> 585229eadeSGreg Roach <a class="dropdown-item" href="<?= e(route(ReorderChildrenPage::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref()])) ?>"> 5904fe0783SGreg Roach <?= view('icons/reorder') ?> 60dd6b2bfcSGreg Roach <?= I18N::translate('Re-order children') ?> 61dd6b2bfcSGreg Roach </a> 62dd6b2bfcSGreg Roach <?php endif ?> 63dd6b2bfcSGreg Roach 6408f0fd1cSGreg Roach <?php if ($can_upload_media) : ?> 6508f0fd1cSGreg Roach <div class="dropdown-divider"></div> 6608f0fd1cSGreg Roach 6708f0fd1cSGreg Roach <a class="dropdown-item" href="<?= e(route(AddNewFact::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref(), 'fact' => 'OBJE'])) ?>"> 6808f0fd1cSGreg Roach <?= view('icons/add') ?> 6908f0fd1cSGreg Roach <?= I18N::translate('Add a media object') ?> 7008f0fd1cSGreg Roach </a> 7108f0fd1cSGreg Roach <?php endif ?> 7208f0fd1cSGreg Roach 730f5fd22fSGreg Roach <?php if ($clipboard_facts->isNotEmpty()) : ?> 740f5fd22fSGreg Roach <div class="dropdown-divider"></div> 750f5fd22fSGreg Roach 760f5fd22fSGreg Roach <?= view('record-page-menu-clipboard', ['clipboard_facts' => $clipboard_facts, 'record' => $record]) ?> 770f5fd22fSGreg Roach <?php endif ?> 780f5fd22fSGreg Roach 79dd6b2bfcSGreg Roach <div class="dropdown-divider"></div> 80dd6b2bfcSGreg Roach 81d4786c66SGreg Roach <a class="dropdown-item" href="#" data-wt-confirm="<?= I18N::translate('Deleting the family will unlink all of the individuals from each other but will leave the individuals in place. Are you sure you want to delete this family?') ?>" data-wt-post-url="<?= e(route(DeleteRecord::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref()])) ?>"> 8204fe0783SGreg Roach <?= view('icons/delete') ?> 83dd6b2bfcSGreg Roach <?= I18N::translate('Delete') ?> 84dd6b2bfcSGreg Roach </a> 85dd6b2bfcSGreg Roach 86bd29d468SGreg Roach <?php if (Auth::isAdmin() || $record->tree()->getPreference('SHOW_GEDCOM_RECORD') === '1') : ?> 873b3db8adSGreg Roach <a class="dropdown-item" href="<?= e(route(EditRawRecordPage::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref()])) ?>"> 8804fe0783SGreg Roach <?= view('icons/edit') ?> 89dd6b2bfcSGreg Roach <?= I18N::translate('Edit the raw GEDCOM') ?> 90dd6b2bfcSGreg Roach </a> 91dd6b2bfcSGreg Roach <?php endif ?> 92dd6b2bfcSGreg Roach </div> 93dd6b2bfcSGreg Roach</div> 94