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