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