1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
<?php use Fisharebest\Webtrees\Auth; ?>
<?php use Fisharebest\Webtrees\I18N; ?>
<div class="dropdown wt-page-menu">
<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">
<?= view('icons/edit') ?>
<?= I18N::translate('edit') ?>
</button>
<div class="dropdown-menu dropdown-menu-right wt-page-menu-items" aria-labelledby="page-menu">
<a class="dropdown-item menu-fam-change" href="<?= e(route('change-family-members', ['ged' => $record->tree()->name(), 'xref' => $record->xref()])) ?>">
<?= I18N::translate('Change family members') ?>
</a>
<?php if ($record->husband() === null): ?>
<a class="dropdown-item menu-fam-addchil" href="<?= e(route('add-spouse-to-family', ['ged' => $record->tree()->name(), 'xref' => $record->xref(), 'famtag' => 'HUSB'])) ?>">
<?= I18N::translate('Add a husband') ?>
</a>
<?php endif ?>
<?php if ($record->wife() === null): ?>
<a class="dropdown-item menu-fam-addchil" href="<?= e(route('add-spouse-to-family', ['ged' => $record->tree()->name(), 'xref' => $record->xref(), 'famtag' => 'WIFE'])) ?>">
<?= I18N::translate('Add a wife') ?>
</a>
<?php endif ?>
<a class="dropdown-item menu-fam-addchil" href="<?= e(route('add-child-to-family', ['gender' => 'U', 'ged' => $record->tree()->name(), 'xref' => $record->xref()])) ?>">
<?= I18N::translate('Add a child') ?>
</a>
<?php if ($record->numberOfChildren() > 1) : ?>
<a class="dropdown-item menu-fam-orderchil" href="<?= e(route('reorder-children', ['ged' => $record->tree()->name(), 'xref' => $record->xref()])) ?>">
<?= I18N::translate('Re-order children') ?>
</a>
<?php endif ?>
<div class="dropdown-divider"></div>
<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()) ?>');">
<?= I18N::translate('Delete') ?>
</a>
<?php if (Auth::isAdmin() || $record->tree()->getPreference('SHOW_GEDCOM_RECORD')) : ?>
<div class="dropdown-divider"></div>
<a class="dropdown-item menu-fam-editraw" href="<?= e(route('edit-raw-record', ['ged' => $record->tree()->name(), 'xref' => $record->xref()])) ?>">
<?= I18N::translate('Edit the raw GEDCOM') ?>
</a>
<?php endif ?>
</div>
</div>
|