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