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