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