xref: /webtrees/resources/views/admin/trees-unconnected.phtml (revision 5bfc689774bb9a6401271c4ed15a6d50652c991b)
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    <?= csrf_field() ?>
28
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    <button type="submit" class="btn btn-primary">
32        <?= I18N::translate('update') ?>
33    </button>
34</form>
35
36<p><?= I18N::translate('These groups of individuals are not related to %s.', $root->fullName()) ?></p>
37
38<?php foreach ($individual_groups as $group) : ?>
39    <h2><?= I18N::plural('%s individual', '%s individuals', count($group), I18N::number(count($group))) ?></h2>
40    <ul>
41        <?php foreach ($group as $individual) : ?>
42            <li>
43                <a href="<?= e($individual->url()) ?>"><?= $individual->fullName() ?></a>
44            </li>
45        <?php endforeach ?>
46    </ul>
47<?php endforeach ?>
48