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\ManageTrees; 76fd01894SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\RenumberTreeAction; 80c0910bfSGreg Roachuse Fisharebest\Webtrees\I18N; 96fd01894SGreg Roachuse Fisharebest\Webtrees\Tree; 106fd01894SGreg Roach 116fd01894SGreg Roach/** 126fd01894SGreg Roach * @var Tree $tree 136fd01894SGreg Roach * @var string $title 146fd01894SGreg Roach * @var array<string> $xrefs 156fd01894SGreg Roach */ 160c0910bfSGreg Roach 170c0910bfSGreg Roach?> 180c0910bfSGreg Roach 196fd01894SGreg Roach<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), route(ManageTrees::class, ['tree' => $tree->name()]) => I18N::translate('Manage family trees'), $title]]) ?> 20dd6b2bfcSGreg Roach 21dd6b2bfcSGreg Roach<h1><?= $title ?></h1> 22dd6b2bfcSGreg Roach 23dd6b2bfcSGreg Roach<p> 24dd6b2bfcSGreg Roach <?= I18N::translate('In a family tree, each record has an internal reference number (called an “XREF”) such as “F123” or “R14”.') ?> 25dd6b2bfcSGreg Roach</p> 26dd6b2bfcSGreg Roach 27dd6b2bfcSGreg Roach<p> 28dd6b2bfcSGreg Roach <?= 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.') ?> 29dd6b2bfcSGreg Roach</p> 30dd6b2bfcSGreg Roach 31dd6b2bfcSGreg Roach<p> 32dd6b2bfcSGreg Roach <?= 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))) ?> 33dd6b2bfcSGreg Roach</p> 34dd6b2bfcSGreg Roach 35dd6b2bfcSGreg Roach<?php if (!empty($xrefs)) : ?> 36dd6b2bfcSGreg Roach <p> 37dd6b2bfcSGreg Roach <?= I18N::translate('You can renumber this family tree.') ?> 38dd6b2bfcSGreg Roach </p> 39dd6b2bfcSGreg Roach 406fd01894SGreg Roach <form method="post" action="<?= e(route(RenumberTreeAction::class, ['tree' => $tree->name()])) ?>"> 41dd6b2bfcSGreg Roach <button type="submit" class="btn btn-primary"> 42dd6b2bfcSGreg Roach <?= view('icons/save') ?> 43dd6b2bfcSGreg Roach <?= /* I18N: A button label. */ 44dd6b2bfcSGreg Roach I18N::translate('continue') ?> 45dd6b2bfcSGreg Roach </button> 46dd6b2bfcSGreg Roach 47dd6b2bfcSGreg Roach <?= I18N::translate('Caution! This may take a long time. Be patient.') ?> 4881443e3cSGreg Roach 4981443e3cSGreg Roach <?= csrf_field() ?> 50dd6b2bfcSGreg Roach </form> 51dd6b2bfcSGreg Roach<?php endif ?> 52