xref: /webtrees/resources/views/admin/trees-merge.phtml (revision a7a24840b43d2ed5c53b60c55f1f09e1cc2f01f9)
1<?php use Fisharebest\Webtrees\Bootstrap4; ?>
2<?php use Fisharebest\Webtrees\I18N; ?>
3
4<?= view('components/breadcrumbs', ['links' => [route('admin-control-panel') => I18N::translate('Control panel'), route('admin-trees', ['ged' => $tree->name()]) => I18N::translate('Manage family trees '), $title]]) ?>
5
6<h1><?= $title ?></h1>
7
8<?php if ($xrefs > 0) : ?>
9    <p>
10        <?= I18N::translate('In a family tree, each record has an internal reference number (called an “XREF”) such as “F123” or “R14”.') ?>
11    </p>
12    <p>
13        <?= I18N::plural(/* I18N: An XREF is the identification number used in GEDCOM files. */ 'The two family trees have %1$s record which uses the same “XREF”.', 'The two family trees have %1$s records which use the same “XREF”.', $xrefs, I18N::number($xrefs)) ?>
14    </p>
15    <p>
16        <?= I18N::translate('You must renumber the records in one of the trees before you can merge them.') ?>
17    </p>
18    <p>
19        <a class="current" href="<?= e(route('admin-trees-renumber', ['ged' => $tree1->name()])) ?>">
20            <?= I18N::translate('Renumber family tree') ?><?= e($tree1->title()) ?>
21        </a>
22    </p>
23    <p>
24        <a class="current" href="<?= e(route('admin-trees-renumber', ['ged' => $tree2->name()])) ?>">
25            <?= I18N::translate('Renumber family tree') ?><?= e($tree2->title()) ?>
26        </a>
27    </p>
28<?php endif ?>
29
30<form action="<?= e(route('admin-trees-merge')) ?>" method="post">
31    <?= csrf_field() ?>
32    <p class="form-inline">
33        <?= I18N::translate(/* I18N: Copy all the records from [family tree 1] into [family tree 2] */
34            'Copy all the records from %1$s into %2$s.',
35            Bootstrap4::select($tree_list, $tree1 ? $tree1->name() : '', ['name' => 'tree1_name']),
36            Bootstrap4::select($tree_list, $tree2 ? $tree2->name() : '', ['name' => 'tree2_name'])
37        ) ?>
38    </p>
39
40    <button type="submit" class="btn btn-primary">
41        <?= view('icons/save') ?>
42        <?= I18N::translate('continue') ?>
43    </button>
44</form>
45