xref: /webtrees/resources/views/admin/trees-unconnected.phtml (revision 1ff45046fabc22237b5d0d8e489c96f031fc598d)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
6use Fisharebest\Webtrees\Http\RequestHandlers\ManageTrees;
7use Fisharebest\Webtrees\Http\RequestHandlers\UnconnectedAction;
8use Fisharebest\Webtrees\I18N;
9use Fisharebest\Webtrees\Individual;
10use Fisharebest\Webtrees\Tree;
11use Illuminate\Support\Collection;
12
13/**
14 * @var string                            $title
15 * @var bool                              $aliases
16 * @var bool                              $associates
17 * @var array<Collection<int,Individual>> $individual_groups
18 * @var Individual                        $root
19 * @var Tree                              $tree
20 */
21
22?>
23
24<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), route(ManageTrees::class, ['tree' => $tree->name()]) => I18N::translate('Manage family trees'), $title]]) ?>
25
26<h1><?= $title ?></h1>
27
28<form method="post" action="<?= e(route(UnconnectedAction::class, ['tree' => $tree->name()])) ?>">
29    <?= view('components/checkbox-inline', ['label' => I18N::translate('Include associates'), 'checked' => $associates, 'name' => 'associates']) ?>
30    <?= view('components/checkbox-inline', ['label' => I18N::translate('Include aliases'), 'checked' => $aliases, 'name' => 'aliases']) ?>
31
32    <button type="submit" class="btn btn-primary">
33        <?= I18N::translate('update') ?>
34    </button>
35
36    <?= csrf_field() ?>
37</form>
38
39<p><?= I18N::translate('These groups of individuals are not related to %s.', $root->fullName()) ?></p>
40
41<?php foreach ($individual_groups as $group) : ?>
42    <h2><?= I18N::plural('%s individual', '%s individuals', count($group), I18N::number(count($group))) ?></h2>
43    <ul>
44        <?php foreach ($group as $individual) : ?>
45            <li>
46                <a href="<?= e($individual->url()) ?>"><?= $individual->fullName() ?></a>
47            </li>
48        <?php endforeach ?>
49    </ul>
50<?php endforeach ?>
51