xref: /webtrees/resources/views/admin/trees-unconnected.phtml (revision 10e0649788c8d7d4974d81c048ca2b225df8f22e)
1da2d94b3SGreg Roach<?php
2da2d94b3SGreg Roach
3*10e06497SGreg Roachdeclare(strict_types=1);
4*10e06497SGreg Roach
50c0910bfSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
66fd01894SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ManageTrees;
796716c47SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\UnconnectedAction;
8da2d94b3SGreg Roachuse Fisharebest\Webtrees\I18N;
9da2d94b3SGreg Roachuse Fisharebest\Webtrees\Individual;
10da2d94b3SGreg Roachuse Fisharebest\Webtrees\Tree;
114fd89268SGreg Roachuse Illuminate\Support\Collection;
12da2d94b3SGreg Roach
13da2d94b3SGreg Roach/**
14da2d94b3SGreg Roach * @var string                            $title
15f925fcc4SGreg Roach * @var bool                              $aliases
16da2d94b3SGreg Roach * @var bool                              $associates
174fd89268SGreg Roach * @var array<Collection<int,Individual>> $individual_groups
18da2d94b3SGreg Roach * @var Individual                        $root
19da2d94b3SGreg Roach * @var Tree                              $tree
20da2d94b3SGreg Roach */
21da2d94b3SGreg Roach
22da2d94b3SGreg Roach?>
23dd6b2bfcSGreg Roach
246fd01894SGreg Roach<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), route(ManageTrees::class, ['tree' => $tree->name()]) => I18N::translate('Manage family trees'), $title]]) ?>
25dd6b2bfcSGreg Roach
26dd6b2bfcSGreg Roach<h1><?= $title ?></h1>
27dd6b2bfcSGreg Roach
28315eb316SGreg Roach<form method="post" action="<?= e(route(UnconnectedAction::class, ['tree' => $tree->name()])) ?>">
29b6c326d8SGreg Roach    <?= view('components/checkbox-inline', ['label' => I18N::translate('Include associates'), 'checked' => $associates, 'name' => 'associates']) ?>
30f925fcc4SGreg Roach    <?= view('components/checkbox-inline', ['label' => I18N::translate('Include aliases'), 'checked' => $aliases, 'name' => 'aliases']) ?>
3181443e3cSGreg Roach
32da2d94b3SGreg Roach    <button type="submit" class="btn btn-primary">
33dd6b2bfcSGreg Roach        <?= I18N::translate('update') ?>
34dd6b2bfcSGreg Roach    </button>
3581443e3cSGreg Roach
3681443e3cSGreg Roach    <?= csrf_field() ?>
37dd6b2bfcSGreg Roach</form>
38dd6b2bfcSGreg Roach
3939ca88baSGreg Roach<p><?= I18N::translate('These groups of individuals are not related to %s.', $root->fullName()) ?></p>
40dd6b2bfcSGreg Roach
41dd6b2bfcSGreg Roach<?php foreach ($individual_groups as $group) : ?>
42dd6b2bfcSGreg Roach    <h2><?= I18N::plural('%s individual', '%s individuals', count($group), I18N::number(count($group))) ?></h2>
43dd6b2bfcSGreg Roach    <ul>
44dd6b2bfcSGreg Roach        <?php foreach ($group as $individual) : ?>
45dd6b2bfcSGreg Roach            <li>
4639ca88baSGreg Roach                <a href="<?= e($individual->url()) ?>"><?= $individual->fullName() ?></a>
47dd6b2bfcSGreg Roach            </li>
48dd6b2bfcSGreg Roach        <?php endforeach ?>
49dd6b2bfcSGreg Roach    </ul>
50dd6b2bfcSGreg Roach<?php endforeach ?>
51