xref: /webtrees/resources/views/family-page-menu.phtml (revision 3b3db8adf3fd54bb8a196a781da9123905e54adf)
1*3b3db8adSGreg Roach<?php
2*3b3db8adSGreg Roach
3*3b3db8adSGreg Roachuse Fisharebest\Webtrees\Auth;
4*3b3db8adSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\DeleteRecord;
5*3b3db8adSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\EditRawRecordPage;
6*3b3db8adSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ReorderChildrenPage;
7*3b3db8adSGreg Roachuse Fisharebest\Webtrees\I18N;
8*3b3db8adSGreg Roach
9*3b3db8adSGreg Roach?>
10dd6b2bfcSGreg Roach
11dd6b2bfcSGreg Roach<div class="dropdown wt-page-menu">
12dd6b2bfcSGreg 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">
13d993d560SGreg Roach        <?= view('icons/edit') ?>
14dd6b2bfcSGreg Roach        <?= I18N::translate('edit') ?>
15dd6b2bfcSGreg Roach    </button>
1604fe0783SGreg Roach
17dd6b2bfcSGreg Roach    <div class="dropdown-menu dropdown-menu-right wt-page-menu-items" aria-labelledby="page-menu">
18d72b284aSGreg Roach        <a class="dropdown-item" href="<?= e(route('change-family-members', ['tree' => $record->tree()->name(), 'xref' => $record->xref()])) ?>">
1904fe0783SGreg Roach            <?= view('icons/family') ?>
20dd6b2bfcSGreg Roach            <?= I18N::translate('Change family members') ?>
21dd6b2bfcSGreg Roach        </a>
22dd6b2bfcSGreg Roach
2317dd427eSGreg Roach        <?php if ($record->husband() === null): ?>
24d72b284aSGreg Roach            <a class="dropdown-item" href="<?= e(route('add-spouse-to-family', ['tree' => $record->tree()->name(), 'xref' => $record->xref(), 'famtag' => 'HUSB'])) ?>">
2504fe0783SGreg Roach                <?= view('icons/add') ?>
2617dd427eSGreg Roach                <?= I18N::translate('Add a husband') ?>
2717dd427eSGreg Roach            </a>
2817dd427eSGreg Roach        <?php endif ?>
2917dd427eSGreg Roach
3017dd427eSGreg Roach        <?php if ($record->wife() === null): ?>
31d72b284aSGreg Roach            <a class="dropdown-item" href="<?= e(route('add-spouse-to-family', ['tree' => $record->tree()->name(), 'xref' => $record->xref(), 'famtag' => 'WIFE'])) ?>">
3204fe0783SGreg Roach                <?= view('icons/add') ?>
3317dd427eSGreg Roach                <?= I18N::translate('Add a wife') ?>
3417dd427eSGreg Roach            </a>
3517dd427eSGreg Roach        <?php endif ?>
3617dd427eSGreg Roach
37d72b284aSGreg Roach        <a class="dropdown-item" href="<?= e(route('add-child-to-family', ['gender' => 'U', 'tree' => $record->tree()->name(), 'xref' => $record->xref()])) ?>">
3804fe0783SGreg Roach            <?= view('icons/add') ?>
3917dd427eSGreg Roach            <?= I18N::translate('Add a child') ?>
40dd6b2bfcSGreg Roach        </a>
41dd6b2bfcSGreg Roach
4239ca88baSGreg Roach        <?php if ($record->numberOfChildren() > 1) : ?>
435229eadeSGreg Roach            <a class="dropdown-item" href="<?= e(route(ReorderChildrenPage::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref()])) ?>">
4404fe0783SGreg Roach                <?= view('icons/reorder') ?>
45dd6b2bfcSGreg Roach                <?= I18N::translate('Re-order children') ?>
46dd6b2bfcSGreg Roach            </a>
47dd6b2bfcSGreg Roach        <?php endif ?>
48dd6b2bfcSGreg Roach
49dd6b2bfcSGreg Roach        <div class="dropdown-divider"></div>
50dd6b2bfcSGreg Roach
51*3b3db8adSGreg Roach        <a class="dropdown-item" 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?') ?>" data-post-url="<?= e(route(DeleteRecord::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref()])) ?>">
5204fe0783SGreg Roach            <?= view('icons/delete') ?>
53dd6b2bfcSGreg Roach            <?= I18N::translate('Delete') ?>
54dd6b2bfcSGreg Roach        </a>
55dd6b2bfcSGreg Roach
56f4afa648SGreg Roach        <?php if (Auth::isAdmin() || $record->tree()->getPreference('SHOW_GEDCOM_RECORD')) : ?>
57*3b3db8adSGreg Roach            <a class="dropdown-item" href="<?= e(route(EditRawRecordPage::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref()])) ?>">
5804fe0783SGreg Roach                <?= view('icons/edit') ?>
59dd6b2bfcSGreg Roach                <?= I18N::translate('Edit the raw GEDCOM') ?>
60dd6b2bfcSGreg Roach            </a>
61dd6b2bfcSGreg Roach        <?php endif ?>
62dd6b2bfcSGreg Roach    </div>
63dd6b2bfcSGreg Roach</div>
64