15229eadeSGreg Roach<?php 25229eadeSGreg Roach 35229eadeSGreg Roachuse Fisharebest\Webtrees\Auth; 47c7d1e03SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\AddName; 52917771cSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\AddNewFact; 63b3db8adSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\DeleteRecord; 7a53fee79SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\EditFactPage; 83b3db8adSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\EditRawRecordPage; 9*853f2b8aSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ReorderFamiliesPage; 105229eadeSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ReorderMediaPage; 115229eadeSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ReorderNamesPage; 125229eadeSGreg Roachuse Fisharebest\Webtrees\I18N; 13203146cfSGreg Roachuse Fisharebest\Webtrees\Individual; 14*853f2b8aSGreg Roachuse Illuminate\Support\Collection; 155229eadeSGreg Roach 16203146cfSGreg Roach/** 17203146cfSGreg Roach * @var Individual $record 18*853f2b8aSGreg Roach * @var Collection<string> $shares 19203146cfSGreg Roach */ 2060f314e9SGreg Roach 215229eadeSGreg Roach?> 22dd6b2bfcSGreg Roach 23dd6b2bfcSGreg Roach<div class="dropdown wt-page-menu"> 24dd6b2bfcSGreg Roach <button class="btn btn-primary dropdown-toggle wt-page-menu-button" type="button" id="page-menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> 257f85bc37SGreg Roach <?= view('icons/menu') ?> 26dd6b2bfcSGreg Roach <?= I18N::translate('edit') ?> 27dd6b2bfcSGreg Roach </button> 2804fe0783SGreg Roach 29dd6b2bfcSGreg Roach <div class="dropdown-menu dropdown-menu-right wt-page-menu-items" aria-labelledby="page-menu"> 30*853f2b8aSGreg Roach <?php if ($shares->isNotEmpty()): ?> 31*853f2b8aSGreg Roach <button class="dropdown-item" data-toggle="modal" data-target="#wt-shares-modal"> 32*853f2b8aSGreg Roach <?= view('icons/share') ?> 33*853f2b8aSGreg Roach <?= I18N::translate('Share') ?> 34*853f2b8aSGreg Roach </button> 35*853f2b8aSGreg Roach 36*853f2b8aSGreg Roach <hr> 37*853f2b8aSGreg Roach <?php endif ?> 38*853f2b8aSGreg Roach 39203146cfSGreg Roach <a class="dropdown-item" href="<?= e(route(AddName::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref()])) ?>"> 4004fe0783SGreg Roach <?= view('icons/add') ?> 41dd6b2bfcSGreg Roach <?= I18N::translate('Add a name') ?> 42dd6b2bfcSGreg Roach </a> 43dd6b2bfcSGreg Roach 44203146cfSGreg Roach <?php if ($record->facts(['NAME'], false, null, true)->count() > 1) : ?> 45203146cfSGreg Roach <a class="dropdown-item" href="<?= e(route(ReorderNamesPage::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref()])) ?>"> 4604fe0783SGreg Roach <?= view('icons/reorder') ?> 47dd6b2bfcSGreg Roach <?= I18N::translate('Re-order names') ?> 48dd6b2bfcSGreg Roach </a> 498e64ca84SGreg Roach <?php else : ?> 508e64ca84SGreg Roach <div class="dropdown-item disabled"> 518e64ca84SGreg Roach <?= view('icons/spacer') ?> 528e64ca84SGreg Roach <?= I18N::translate('Re-order names') ?> 538e64ca84SGreg Roach </div> 54dd6b2bfcSGreg Roach <?php endif ?> 55dd6b2bfcSGreg Roach 5604fe0783SGreg Roach <div class="dropdown-divider"></div> 5704fe0783SGreg Roach 58203146cfSGreg Roach <?php if ($record->facts(['SEX'], false, null, true)->isEmpty()) : ?> 59203146cfSGreg Roach <a class="dropdown-item" href="<?= e(route(AddNewFact::class, ['fact' => 'SEX', 'tree' => $record->tree()->name(), 'xref' => $record->xref()])) ?>"> 6004fe0783SGreg Roach <?= view('icons/edit') ?> 61dd6b2bfcSGreg Roach <?= I18N::translate('Edit the gender') ?> 62dd6b2bfcSGreg Roach </a> 638e64ca84SGreg Roach <?php endif ?> 648e64ca84SGreg Roach 65203146cfSGreg Roach <?php foreach ($record->facts(['SEX'], false, null, true) as $fact) : ?> 668e64ca84SGreg Roach <?php if ($fact->canEdit()) : ?> 67203146cfSGreg Roach <a class="dropdown-item" href="<?= e(route(EditFactPage::class, ['xref' => $record->xref(), 'fact_id' => $fact->id(), 'tree' => $record->tree()->name()])) ?>"> 688e64ca84SGreg Roach <?= view('icons/edit') ?> 698e64ca84SGreg Roach <?= I18N::translate('Edit the gender') ?> 708e64ca84SGreg Roach </a> 718e64ca84SGreg Roach <?php endif ?> 728e64ca84SGreg Roach <?php endforeach ?> 7304fe0783SGreg Roach 7404fe0783SGreg Roach <div class="dropdown-divider"></div> 758e64ca84SGreg Roach 76203146cfSGreg Roach <?php if ($record->spouseFamilies()->count() > 1 || $record->childFamilies()->count() > 1) : ?> 77203146cfSGreg Roach <a class="dropdown-item" href="<?= e(route(ReorderFamiliesPage::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref()])) ?>"> 7883615acfSGreg Roach <?= view('icons/reorder') ?> 7983615acfSGreg Roach <?= I18N::translate('Re-order families') ?> 8083615acfSGreg Roach </a> 8183615acfSGreg Roach <?php else : ?> 8283615acfSGreg Roach <div class="dropdown-item disabled"> 8383615acfSGreg Roach <?= view('icons/spacer') ?> 8483615acfSGreg Roach <?= I18N::translate('Re-order families') ?> 8583615acfSGreg Roach </div> 8683615acfSGreg Roach <?php endif ?> 8783615acfSGreg Roach 8883615acfSGreg Roach <div class="dropdown-divider"></div> 8983615acfSGreg Roach 90203146cfSGreg Roach <a class="dropdown-item" href="<?= e(route(AddNewFact::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref(), 'fact' => 'OBJE'])) ?>"> 918e64ca84SGreg Roach <?= view('icons/add') ?> 928e64ca84SGreg Roach <?= I18N::translate('Add a media object') ?> 938e64ca84SGreg Roach </a> 948e64ca84SGreg Roach 95203146cfSGreg Roach <?php if ($record->facts(['OBJE'], false, null, true)->count() > 1) : ?> 96203146cfSGreg Roach <a class="dropdown-item" href="<?= e(route(ReorderMediaPage::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref()])) ?>"> 97a6c1d617SGreg Roach <?= view('icons/reorder') ?> 988e64ca84SGreg Roach <?= I18N::translate('Re-order media') ?> 998e64ca84SGreg Roach </a> 1008e64ca84SGreg Roach <?php else : ?> 1018e64ca84SGreg Roach <div class="dropdown-item disabled"> 1028e64ca84SGreg Roach <?= view('icons/spacer') ?> 1038e64ca84SGreg Roach <?= I18N::translate('Re-order media') ?> 1048e64ca84SGreg Roach </div> 105dd6b2bfcSGreg Roach <?php endif ?> 106dd6b2bfcSGreg Roach 1078e64ca84SGreg Roach <div class="dropdown-divider"></div> 1088e64ca84SGreg Roach 109203146cfSGreg Roach <a class="dropdown-item" href="#" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', strip_tags($record->fullName())) ?>" data-post-url="<?= e(route(DeleteRecord::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref()])) ?>"> 11004fe0783SGreg Roach <?= view('icons/delete') ?> 111dd6b2bfcSGreg Roach <?= I18N::translate('Delete') ?> 112dd6b2bfcSGreg Roach </a> 113dd6b2bfcSGreg Roach 114203146cfSGreg Roach <?php if (Auth::isAdmin() || $record->tree()->getPreference('SHOW_GEDCOM_RECORD')) : ?> 115203146cfSGreg Roach <a class="dropdown-item" href="<?= e(route(EditRawRecordPage::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref()])) ?>"> 11604fe0783SGreg Roach <?= view('icons/edit') ?> 117dd6b2bfcSGreg Roach <?= I18N::translate('Edit the raw GEDCOM') ?> 118dd6b2bfcSGreg Roach </a> 119dd6b2bfcSGreg Roach <?php endif ?> 120dd6b2bfcSGreg Roach </div> 121dd6b2bfcSGreg Roach</div> 122