1dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\Auth; ?> 2dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\I18N; ?> 3dd6b2bfcSGreg Roach 4dd6b2bfcSGreg Roach<div class="dropdown wt-page-menu"> 5dd6b2bfcSGreg 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"> 6d993d560SGreg Roach <?= view('icons/edit') ?> 7dd6b2bfcSGreg Roach <?= I18N::translate('edit') ?> 8dd6b2bfcSGreg Roach </button> 904fe0783SGreg Roach 10dd6b2bfcSGreg Roach <div class="dropdown-menu dropdown-menu-right wt-page-menu-items" aria-labelledby="page-menu"> 1104fe0783SGreg Roach <a class="dropdown-item" href="<?= e(route('add-name', ['ged' => $individual->tree()->name(), 'xref' => $individual->xref()])) ?>"> 1204fe0783SGreg Roach <?= view('icons/add') ?> 13dd6b2bfcSGreg Roach <?= I18N::translate('Add a name') ?> 14dd6b2bfcSGreg Roach </a> 15dd6b2bfcSGreg Roach 16dd6b2bfcSGreg Roach <?php if ($count_names > 1) : ?> 1704fe0783SGreg Roach <a class="dropdown-item" href="<?= e(route('reorder-names', ['ged' => $individual->tree()->name(), 'xref' => $individual->xref()])) ?>"> 1804fe0783SGreg Roach <?= view('icons/reorder') ?> 19dd6b2bfcSGreg Roach <?= I18N::translate('Re-order names') ?> 20dd6b2bfcSGreg Roach </a> 21*8e64ca84SGreg Roach <?php else : ?> 22*8e64ca84SGreg Roach <div class="dropdown-item disabled"> 23*8e64ca84SGreg Roach <?= view('icons/spacer') ?> 24*8e64ca84SGreg Roach <?= I18N::translate('Re-order names') ?> 25*8e64ca84SGreg Roach </div> 26dd6b2bfcSGreg Roach <?php endif ?> 27dd6b2bfcSGreg Roach 2804fe0783SGreg Roach <div class="dropdown-divider"></div> 2904fe0783SGreg Roach 3004fe0783SGreg Roach <?php if ($count_sex === 0) : ?> 3104fe0783SGreg Roach <a class="dropdown-item" href="<?= e(route('add-fact', ['fact' => 'SEX', 'ged' => $individual->tree()->name(), 'xref' => $individual->xref()])) ?>"> 3204fe0783SGreg Roach <?= view('icons/edit') ?> 33dd6b2bfcSGreg Roach <?= I18N::translate('Edit the gender') ?> 34dd6b2bfcSGreg Roach </a> 35*8e64ca84SGreg Roach <?php endif ?> 36*8e64ca84SGreg Roach 37*8e64ca84SGreg Roach <?php foreach ($individual->facts(['SEX']) as $fact) : ?> 38*8e64ca84SGreg Roach <?php if ($fact->canEdit()) : ?> 39*8e64ca84SGreg Roach <a class="dropdown-item" href="<?= e(route('edit-fact', ['xref' => $individual->xref(), 'fact_id' => $fact->id(), 'ged' => $individual->tree()->name()])) ?>"> 40*8e64ca84SGreg Roach <?= view('icons/edit') ?> 41*8e64ca84SGreg Roach <?= I18N::translate('Edit the gender') ?> 42*8e64ca84SGreg Roach </a> 43*8e64ca84SGreg Roach <?php endif ?> 44*8e64ca84SGreg Roach <?php endforeach ?> 4504fe0783SGreg Roach 4604fe0783SGreg Roach <div class="dropdown-divider"></div> 47*8e64ca84SGreg Roach 48*8e64ca84SGreg Roach <a class="dropdown-item" href="<?= e(route('add-fact', ['ged' => $individual->tree()->name(), 'xref' => $individual->xref(), 'fact' => 'OBJE'])) ?>"> 49*8e64ca84SGreg Roach <?= view('icons/add') ?> 50*8e64ca84SGreg Roach <?= I18N::translate('Add a media object') ?> 51*8e64ca84SGreg Roach </a> 52*8e64ca84SGreg Roach 53*8e64ca84SGreg Roach <?php if ($individual->facts(['OBJE'])->count() > 1) : ?> 54*8e64ca84SGreg Roach <a class="dropdown-item" href="<?= e(route('reorder-media', ['ged' => $individual->tree()->name(), 'xref' => $individual->xref()])) ?>"> 55*8e64ca84SGreg Roach <?= view('icons/edit') ?> 56*8e64ca84SGreg Roach <?= I18N::translate('Re-order media') ?> 57*8e64ca84SGreg Roach </a> 58*8e64ca84SGreg Roach <?php else : ?> 59*8e64ca84SGreg Roach <div class="dropdown-item disabled"> 60*8e64ca84SGreg Roach <?= view('icons/spacer') ?> 61*8e64ca84SGreg Roach <?= I18N::translate('Re-order media') ?> 62*8e64ca84SGreg Roach </div> 63dd6b2bfcSGreg Roach <?php endif ?> 64dd6b2bfcSGreg Roach 65*8e64ca84SGreg Roach <div class="dropdown-divider"></div> 66*8e64ca84SGreg Roach 6704fe0783SGreg Roach <a class="dropdown-item" href="#" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', strip_tags($individual->fullName())) ?>" onclick="return confirm(this.dataset.confirm) && delete_record('<?= e($individual->xref()) ?>', '<?= e($individual->tree()->name()) ?>');"> 6804fe0783SGreg Roach <?= view('icons/delete') ?> 69dd6b2bfcSGreg Roach <?= I18N::translate('Delete') ?> 70dd6b2bfcSGreg Roach </a> 71dd6b2bfcSGreg Roach 72f4afa648SGreg Roach <?php if (Auth::isAdmin() || $individual->tree()->getPreference('SHOW_GEDCOM_RECORD')) : ?> 7304fe0783SGreg Roach <a class="dropdown-item" href="<?= e(route('edit-raw-record', ['ged' => $individual->tree()->name(), 'xref' => $individual->xref()])) ?>"> 7404fe0783SGreg Roach <?= view('icons/edit') ?> 75dd6b2bfcSGreg Roach <?= I18N::translate('Edit the raw GEDCOM') ?> 76dd6b2bfcSGreg Roach </a> 77dd6b2bfcSGreg Roach <?php endif ?> 78dd6b2bfcSGreg Roach </div> 79dd6b2bfcSGreg Roach</div> 80