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; 95229eadeSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ReorderMediaPage; 105229eadeSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ReorderNamesPage; 111afbbc50SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ReorderFamiliesPage; 125229eadeSGreg Roachuse Fisharebest\Webtrees\I18N; 13*203146cfSGreg Roachuse Fisharebest\Webtrees\Individual; 145229eadeSGreg Roach 15*203146cfSGreg Roach/** 16*203146cfSGreg Roach * @var Individual $record 17*203146cfSGreg Roach */ 185229eadeSGreg Roach?> 19dd6b2bfcSGreg Roach 20dd6b2bfcSGreg Roach<div class="dropdown wt-page-menu"> 21dd6b2bfcSGreg 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"> 22d993d560SGreg Roach <?= view('icons/edit') ?> 23dd6b2bfcSGreg Roach <?= I18N::translate('edit') ?> 24dd6b2bfcSGreg Roach </button> 2504fe0783SGreg Roach 26dd6b2bfcSGreg Roach <div class="dropdown-menu dropdown-menu-right wt-page-menu-items" aria-labelledby="page-menu"> 27*203146cfSGreg Roach <a class="dropdown-item" href="<?= e(route(AddName::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref()])) ?>"> 2804fe0783SGreg Roach <?= view('icons/add') ?> 29dd6b2bfcSGreg Roach <?= I18N::translate('Add a name') ?> 30dd6b2bfcSGreg Roach </a> 31dd6b2bfcSGreg Roach 32*203146cfSGreg Roach <?php if ($record->facts(['NAME'], false, null, true)->count() > 1) : ?> 33*203146cfSGreg Roach <a class="dropdown-item" href="<?= e(route(ReorderNamesPage::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref()])) ?>"> 3404fe0783SGreg Roach <?= view('icons/reorder') ?> 35dd6b2bfcSGreg Roach <?= I18N::translate('Re-order names') ?> 36dd6b2bfcSGreg Roach </a> 378e64ca84SGreg Roach <?php else : ?> 388e64ca84SGreg Roach <div class="dropdown-item disabled"> 398e64ca84SGreg Roach <?= view('icons/spacer') ?> 408e64ca84SGreg Roach <?= I18N::translate('Re-order names') ?> 418e64ca84SGreg Roach </div> 42dd6b2bfcSGreg Roach <?php endif ?> 43dd6b2bfcSGreg Roach 4404fe0783SGreg Roach <div class="dropdown-divider"></div> 4504fe0783SGreg Roach 46*203146cfSGreg Roach <?php if ($record->facts(['SEX'], false, null, true)->isEmpty()) : ?> 47*203146cfSGreg Roach <a class="dropdown-item" href="<?= e(route(AddNewFact::class, ['fact' => 'SEX', 'tree' => $record->tree()->name(), 'xref' => $record->xref()])) ?>"> 4804fe0783SGreg Roach <?= view('icons/edit') ?> 49dd6b2bfcSGreg Roach <?= I18N::translate('Edit the gender') ?> 50dd6b2bfcSGreg Roach </a> 518e64ca84SGreg Roach <?php endif ?> 528e64ca84SGreg Roach 53*203146cfSGreg Roach <?php foreach ($record->facts(['SEX'], false, null, true) as $fact) : ?> 548e64ca84SGreg Roach <?php if ($fact->canEdit()) : ?> 55*203146cfSGreg Roach <a class="dropdown-item" href="<?= e(route(EditFactPage::class, ['xref' => $record->xref(), 'fact_id' => $fact->id(), 'tree' => $record->tree()->name()])) ?>"> 568e64ca84SGreg Roach <?= view('icons/edit') ?> 578e64ca84SGreg Roach <?= I18N::translate('Edit the gender') ?> 588e64ca84SGreg Roach </a> 598e64ca84SGreg Roach <?php endif ?> 608e64ca84SGreg Roach <?php endforeach ?> 6104fe0783SGreg Roach 6204fe0783SGreg Roach <div class="dropdown-divider"></div> 638e64ca84SGreg Roach 64*203146cfSGreg Roach <?php if ($record->spouseFamilies()->count() > 1 || $record->childFamilies()->count() > 1) : ?> 65*203146cfSGreg Roach <a class="dropdown-item" href="<?= e(route(ReorderFamiliesPage::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref()])) ?>"> 6683615acfSGreg Roach <?= view('icons/reorder') ?> 6783615acfSGreg Roach <?= I18N::translate('Re-order families') ?> 6883615acfSGreg Roach </a> 6983615acfSGreg Roach <?php else : ?> 7083615acfSGreg Roach <div class="dropdown-item disabled"> 7183615acfSGreg Roach <?= view('icons/spacer') ?> 7283615acfSGreg Roach <?= I18N::translate('Re-order families') ?> 7383615acfSGreg Roach </div> 7483615acfSGreg Roach <?php endif ?> 7583615acfSGreg Roach 7683615acfSGreg Roach <div class="dropdown-divider"></div> 7783615acfSGreg Roach 78*203146cfSGreg Roach <a class="dropdown-item" href="<?= e(route(AddNewFact::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref(), 'fact' => 'OBJE'])) ?>"> 798e64ca84SGreg Roach <?= view('icons/add') ?> 808e64ca84SGreg Roach <?= I18N::translate('Add a media object') ?> 818e64ca84SGreg Roach </a> 828e64ca84SGreg Roach 83*203146cfSGreg Roach <?php if ($record->facts(['OBJE'], false, null, true)->count() > 1) : ?> 84*203146cfSGreg Roach <a class="dropdown-item" href="<?= e(route(ReorderMediaPage::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref()])) ?>"> 85a6c1d617SGreg Roach <?= view('icons/reorder') ?> 868e64ca84SGreg Roach <?= I18N::translate('Re-order media') ?> 878e64ca84SGreg Roach </a> 888e64ca84SGreg Roach <?php else : ?> 898e64ca84SGreg Roach <div class="dropdown-item disabled"> 908e64ca84SGreg Roach <?= view('icons/spacer') ?> 918e64ca84SGreg Roach <?= I18N::translate('Re-order media') ?> 928e64ca84SGreg Roach </div> 93dd6b2bfcSGreg Roach <?php endif ?> 94dd6b2bfcSGreg Roach 958e64ca84SGreg Roach <div class="dropdown-divider"></div> 968e64ca84SGreg Roach 97*203146cfSGreg 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()])) ?>"> 9804fe0783SGreg Roach <?= view('icons/delete') ?> 99dd6b2bfcSGreg Roach <?= I18N::translate('Delete') ?> 100dd6b2bfcSGreg Roach </a> 101dd6b2bfcSGreg Roach 102*203146cfSGreg Roach <?php if (Auth::isAdmin() || $record->tree()->getPreference('SHOW_GEDCOM_RECORD')) : ?> 103*203146cfSGreg Roach <a class="dropdown-item" href="<?= e(route(EditRawRecordPage::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref()])) ?>"> 10404fe0783SGreg Roach <?= view('icons/edit') ?> 105dd6b2bfcSGreg Roach <?= I18N::translate('Edit the raw GEDCOM') ?> 106dd6b2bfcSGreg Roach </a> 107dd6b2bfcSGreg Roach <?php endif ?> 108dd6b2bfcSGreg Roach </div> 109dd6b2bfcSGreg Roach</div> 110