xref: /webtrees/resources/views/individual-page-menu.phtml (revision dd6b2bfcc550270bb6d6778e11576148f71e4330)
1*dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\Auth; ?>
2*dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\FontAwesome; ?>
3*dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\I18N; ?>
4*dd6b2bfcSGreg Roach
5*dd6b2bfcSGreg Roach<div class="dropdown wt-page-menu">
6*dd6b2bfcSGreg 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">
7*dd6b2bfcSGreg Roach        <?= FontAwesome::decorativeIcon('edit') ?>
8*dd6b2bfcSGreg Roach        <?= I18N::translate('edit') ?>
9*dd6b2bfcSGreg Roach    </button>
10*dd6b2bfcSGreg Roach    <div class="dropdown-menu dropdown-menu-right wt-page-menu-items" aria-labelledby="page-menu">
11*dd6b2bfcSGreg Roach        <?php if ($count_sex === 0) : ?>
12*dd6b2bfcSGreg Roach            <a class="dropdown-item menu-indi-editraw" href="<?= e(route('add-fact', ['fact' => 'SEX', 'ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref()])) ?>">
13*dd6b2bfcSGreg Roach                <?= I18N::translate('Edit the gender') ?>
14*dd6b2bfcSGreg Roach            </a>
15*dd6b2bfcSGreg Roach
16*dd6b2bfcSGreg Roach        <?php endif ?>
17*dd6b2bfcSGreg Roach
18*dd6b2bfcSGreg Roach        <a class="dropdown-item menu-indi-editraw" href="<?= e(route('add-name', ['ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref()])) ?>">
19*dd6b2bfcSGreg Roach            <?= I18N::translate('Add a name') ?>
20*dd6b2bfcSGreg Roach        </a>
21*dd6b2bfcSGreg Roach
22*dd6b2bfcSGreg Roach        <?php if ($count_names > 1) : ?>
23*dd6b2bfcSGreg Roach            <a class="dropdown-item menu-indi-editraw" href="<?= e(route('reorder-names', ['ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref()])) ?>">
24*dd6b2bfcSGreg Roach                <?= I18N::translate('Re-order names') ?>
25*dd6b2bfcSGreg Roach            </a>
26*dd6b2bfcSGreg Roach        <?php endif ?>
27*dd6b2bfcSGreg Roach
28*dd6b2bfcSGreg Roach        <?php if (empty($individual->getFacts('SEX'))) : ?>
29*dd6b2bfcSGreg Roach            <a class="dropdown-item menu-indi-editraw" href="<?= e(route('add-fact', ['fact' => 'SEX', 'ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref()])) ?>">
30*dd6b2bfcSGreg Roach                <?= I18N::translate('Edit the gender') ?>
31*dd6b2bfcSGreg Roach            </a>
32*dd6b2bfcSGreg Roach        <?php endif ?>
33*dd6b2bfcSGreg Roach
34*dd6b2bfcSGreg Roach
35*dd6b2bfcSGreg Roach        <a class="dropdown-item menu-indi-del" href="#" data-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', strip_tags($individual->getFullName())) ?>" onclick="return confirm(this.dataset.confirm) && delete_record('<?= e($individual->getXref()) ?>', '<?= e($individual->getTree()->getName()) ?>');">
36*dd6b2bfcSGreg Roach            <?= I18N::translate('Delete') ?>
37*dd6b2bfcSGreg Roach        </a>
38*dd6b2bfcSGreg Roach
39*dd6b2bfcSGreg Roach        <?php if (Auth::isAdmin() || $individual->getTree()->getPreference('SHOW_GEDCOM_RECORD')) : ?>
40*dd6b2bfcSGreg Roach            <div class="dropdown-divider"></div>
41*dd6b2bfcSGreg Roach
42*dd6b2bfcSGreg Roach            <a class="dropdown-item menu-indi-editraw" href="<?= e(route('edit-raw-record', ['ged' => $individual->getTree()->getName(), 'xref' => $individual->getXref()])) ?>">
43*dd6b2bfcSGreg Roach                <?= I18N::translate('Edit the raw GEDCOM') ?>
44*dd6b2bfcSGreg Roach            </a>
45*dd6b2bfcSGreg Roach        <?php endif ?>
46*dd6b2bfcSGreg Roach    </div>
47*dd6b2bfcSGreg Roach</div>
48