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