xref: /webtrees/resources/views/admin/trees-duplicates.phtml (revision 0115bc1678cafd957052cd2d256563ad3e242cc1)
1<?php use Fisharebest\Webtrees\I18N; ?>
2
3<?= view('components/breadcrumbs', ['links' => [route('admin-control-panel') => I18N::translate('Control panel'), route('admin-trees') => I18N::translate('Manage family trees'), $title]]) ?>
4
5<h1><?= $title ?></h1>
6
7<?php foreach ($duplicates as $category => $records) : ?>
8    <h2><?= $category ?></h2>
9
10    <?php if (!empty($records)) : ?>
11        <ul>
12            <?php foreach ($records as $duplicates) : ?>
13                <li>
14                    <?= $duplicates[0]->getFullName() ?>
15                    <?php foreach ($duplicates as $record) : ?>
1617                        <a href="<?= e($record->url()) ?>">
18                            <?= $record->xref() ?>
19                        </a>
20                    <?php endforeach ?>
21                    <?php if (count($duplicates) === 2) : ?>
2223                        <a href="<?= e(route('merge-records', ['ged' => $tree->name(), 'xref1' => $duplicates[0]->xref(), 'xref2' => $duplicates[1]->xref()])) ?>">
24                            <?= I18N::translate('Merge') ?>
25                        </a>
26                    <?php endif ?>
27                </li>
28            <?php endforeach ?>
29        </ul>
30    <?php else : ?>
31        <p><?= I18N::translate('No duplicates have been found.') ?></p>
32    <?php endif ?>
33<?php endforeach ?>
34