xref: /webtrees/resources/views/admin/trees-check.phtml (revision 3a3c35160db2b0ae62787c386f75885682bfd3bd)
1<?php
2
3use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
4use Fisharebest\Webtrees\Http\RequestHandlers\ManageTrees;
5use Fisharebest\Webtrees\I18N;
6use Fisharebest\Webtrees\Tree;
7
8/**
9 * @var array<string> $errors
10 * @var array<string> $infos
11 * @var string        $more_url
12 * @var string        $title
13 * @var Tree          $tree
14 * @var array<string> $warnings
15 */
16
17?>
18
19<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), route(ManageTrees::class, ['tree' => $tree->name()]) => I18N::translate('Manage family trees'), $title]]) ?>
20
21<h1><?= $title ?></h1>
22
23<h2>
24    <?= I18N::translate('GEDCOM errors') ?>
25</h2>
26
27<ul class="list-group">
28    <?php foreach ($errors as $error) : ?>
29        <li class="list-group-item list-group-item-danger"><?= $error ?></li>
30    <?php endforeach ?>
31
32    <?php foreach ($warnings as $warning) : ?>
33        <li class="list-group-item list-group-item-warning"><?= $warning ?></li>
34    <?php endforeach ?>
35
36    <?php foreach ($infos as $info) : ?>
37        <li class="list-group-item list-group-item-info"><?= $info ?></li>
38    <?php endforeach ?>
39
40    <?php if ($errors === [] && $warnings === []) : ?>
41        <li class="list-group-item"><?= I18N::translate('No errors have been found.') ?></li>
42    <?php endif ?>
43</ul>
44
45<?php if ($more_url !== '') : ?>
46    <p>
47        <?= I18N::translate('The server’s time limit has been reached.') ?>
48        <a class="btn btn-primary" href="<?= e($more_url) ?>">
49            <?= I18N::translate('show more') ?>
50        </a>
51    </p>
52<?php endif ?>
53