xref: /webtrees/resources/views/admin/trees-renumber.phtml (revision 32a5d3c79b94ed250a9e5d16bc05ba1d4229ebbb)
1<?php
2
3use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
4use Fisharebest\Webtrees\Http\RequestHandlers\ManageTrees;
5use Fisharebest\Webtrees\Http\RequestHandlers\RenumberTreeAction;
6use Fisharebest\Webtrees\I18N;
7use Fisharebest\Webtrees\Tree;
8
9/**
10 * @var Tree          $tree
11 * @var string        $title
12 * @var array<string> $xrefs
13 */
14
15?>
16
17<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), route(ManageTrees::class, ['tree' => $tree->name()]) => I18N::translate('Manage family trees'), $title]]) ?>
18
19<h1><?= $title ?></h1>
20
21<p>
22    <?= I18N::translate('In a family tree, each record has an internal reference number (called an “XREF”) such as “F123” or “R14”.') ?>
23</p>
24
25<p>
26    <?= I18N::translate('You can renumber the records in a family tree, so that these internal reference numbers are not duplicated in any other family tree.') ?>
27</p>
28
29<p>
30    <?= I18N::plural('This family tree has %s record which uses the same “XREF” as another family tree.', 'This family tree has %s records which use the same “XREF” as another family tree.', count($xrefs), I18N::number(count($xrefs))) ?>
31</p>
32
33<?php if (!empty($xrefs)) : ?>
34    <p>
35        <?= I18N::translate('You can renumber this family tree.') ?>
36    </p>
37
38    <form method="post" action="<?= e(route(RenumberTreeAction::class, ['tree' => $tree->name()])) ?>">
39        <?= csrf_field() ?>
40        <button type="submit" class="btn btn-primary">
41            <?= view('icons/save') ?>
42            <?= /* I18N: A button label. */
43            I18N::translate('continue') ?>
44        </button>
45
46        <?= I18N::translate('Caution! This may take a long time. Be patient.') ?>
47    </form>
48<?php endif ?>
49