10c0910bfSGreg Roach<?php 2dd6b2bfcSGreg Roach 3*10e06497SGreg Roachdeclare(strict_types=1); 4*10e06497SGreg Roach 50c0910bfSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel; 66fd01894SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\MergeTreesAction; 76fd01894SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\RenumberTreePage; 80c0910bfSGreg Roachuse Fisharebest\Webtrees\I18N; 96fd01894SGreg Roachuse Fisharebest\Webtrees\Tree; 106fd01894SGreg Roach 116fd01894SGreg Roach/** 126fd01894SGreg Roach * @var string $title 137c2c99faSGreg Roach * @var Tree|null $tree1 147c2c99faSGreg Roach * @var Tree|null $tree2 156fd01894SGreg Roach * @var array<string,string> $tree_list 166fd01894SGreg Roach * @var int $xrefs 176fd01894SGreg Roach */ 180c0910bfSGreg Roach 190c0910bfSGreg Roach?> 200c0910bfSGreg Roach 2157796b09SGreg Roach<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), $title]]) ?> 22dd6b2bfcSGreg Roach 23dd6b2bfcSGreg Roach<h1><?= $title ?></h1> 24dd6b2bfcSGreg Roach 25034b9a15SGreg Roach<?php if ($xrefs > 0) : ?> 26dd6b2bfcSGreg Roach <p> 27dd6b2bfcSGreg Roach <?= I18N::translate('In a family tree, each record has an internal reference number (called an “XREF”) such as “F123” or “R14”.') ?> 28dd6b2bfcSGreg Roach </p> 29dd6b2bfcSGreg Roach <p> 30034b9a15SGreg 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”.', $xrefs, I18N::number($xrefs)) ?> 31dd6b2bfcSGreg Roach </p> 32dd6b2bfcSGreg Roach <p> 33dd6b2bfcSGreg Roach <?= I18N::translate('You must renumber the records in one of the trees before you can merge them.') ?> 34dd6b2bfcSGreg Roach </p> 35dd6b2bfcSGreg Roach <p> 366fd01894SGreg Roach <a class="current" href="<?= e(route(RenumberTreePage::class, ['tree' => $tree1->name()])) ?>"> 37a5aad981SGreg Roach <?= I18N::translate('Renumber XREFs') ?> — <?= e($tree1->title()) ?> 38dd6b2bfcSGreg Roach </a> 39dd6b2bfcSGreg Roach </p> 40dd6b2bfcSGreg Roach <p> 416fd01894SGreg Roach <a class="current" href="<?= e(route(RenumberTreePage::class, ['tree' => $tree2->name()])) ?>"> 42a5aad981SGreg Roach <?= I18N::translate('Renumber XREFs') ?> — <?= e($tree2->title()) ?> 43dd6b2bfcSGreg Roach </a> 44dd6b2bfcSGreg Roach </p> 45dd6b2bfcSGreg Roach<?php endif ?> 46dd6b2bfcSGreg Roach 476fd01894SGreg Roach<form method="post" action="<?= e(route(MergeTreesAction::class)) ?>"> 48315eb316SGreg Roach <div> 49dd6b2bfcSGreg Roach <?= I18N::translate(/* I18N: Copy all the records from [family tree 1] into [family tree 2] */ 50dd6b2bfcSGreg Roach 'Copy all the records from %1$s into %2$s.', 517c2c99faSGreg Roach view('components/select', ['name' => 'tree1_name', 'selected' => $tree1 instanceof Tree ? $tree1->name() : '', 'options' => $tree_list]), 527c2c99faSGreg Roach view('components/select', ['name' => 'tree2_name', 'selected' => $tree2 instanceof Tree ? $tree2->name() : '', 'options' => $tree_list]) 53dd6b2bfcSGreg Roach ) ?> 54315eb316SGreg Roach </div> 55dd6b2bfcSGreg Roach 56315eb316SGreg Roach <div> 57dd6b2bfcSGreg Roach <button type="submit" class="btn btn-primary"> 58dd6b2bfcSGreg Roach <?= view('icons/save') ?> 59dd6b2bfcSGreg Roach <?= I18N::translate('continue') ?> 60dd6b2bfcSGreg Roach </button> 61315eb316SGreg Roach </div> 6281443e3cSGreg Roach 6381443e3cSGreg Roach <?= csrf_field() ?> 64315eb316SGreg Roach</form> 656fd01894SGreg Roach 666fd01894SGreg Roach<?= I18N::translate('Caution! This may take a long time. Be patient.') ?> 67