xref: /webtrees/resources/views/family-page-menu.phtml (revision 84586c024c68dbfa3b15df636ed2b74037428442)
1<?php use Fisharebest\Webtrees\Auth; ?>
2<?php use Fisharebest\Webtrees\FontAwesome; ?>
3<?php use Fisharebest\Webtrees\I18N; ?>
4
5<div class="dropdown wt-page-menu">
6    <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        <?= FontAwesome::decorativeIcon('edit') ?>
8        <?= I18N::translate('edit') ?>
9    </button>
10    <div class="dropdown-menu dropdown-menu-right wt-page-menu-items" aria-labelledby="page-menu">
11        <a class="dropdown-item menu-fam-change" href="<?= e(route('change-family-members', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref()])) ?>">
12            <?= I18N::translate('Change family members') ?>
13        </a>
14
15        <a class="dropdown-item menu-fam-addchil" href="<?= e(route('add-child-to-family', ['gender' => 'U', 'ged' => $record->getTree()->getName(), 'xref' => $record->getXref()])) ?>">
16            <?= I18N::translate('Add a child to this family') ?>
17        </a>
18
19        <?php if ($record->getNumberOfChildren() > 1) : ?>
20            <a class="dropdown-item menu-fam-orderchil" href="<?= e(route('reorder-children', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref()])) ?>">
21                <?= I18N::translate('Re-order children') ?>
22            </a>
23        <?php endif ?>
24
25        <div class="dropdown-divider"></div>
26
27        <a class="dropdown-item menu-fam-del" href="#" data-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?') ?>" onclick="return confirm(this.dataset.confirm) && delete_record('<?= e($record->getXref()) ?>', '<?= e($record->getTree()->getName()) ?>');">
28            <?= I18N::translate('Delete') ?>
29        </a>
30
31        <?php if (Auth::isAdmin() || $record->getTree()->getPreference('SHOW_GEDCOM_RECORD')) : ?>
32            <div class="dropdown-divider"></div>
33
34            <a class="dropdown-item menu-fam-editraw" href="<?= e(route('edit-raw-record', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref()])) ?>">
35                <?= I18N::translate('Edit the raw GEDCOM') ?>
36            </a>
37        <?php endif ?>
38    </div>
39</div>
40