xref: /webtrees/resources/views/modules/place-hierarchy/events.phtml (revision afa67798854828b1edc33dd077960ec2b18e6140)
1<?php
2
3use Fisharebest\Webtrees\Family;
4use Fisharebest\Webtrees\I18N;
5use Fisharebest\Webtrees\Individual;
6use Fisharebest\Webtrees\Tree;
7use Illuminate\Support\Collection;
8
9/**
10 * @var Collection<Family>     $famlist
11 * @var Collection<Individual> $indilist
12 * @var Tree                                       $tree
13 */
14
15?>
16
17<ul class="nav nav-tabs" role="tablist">
18    <li class="nav-item" role="presentation">
19        <a class="nav-link active<?= $indilist->isEmpty() ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#individuals">
20            <?= I18N::translate('Individuals') ?>
21            <?= view('components/badge', ['count' => count($indilist)]) ?>
22        </a>
23    </li>
24    <li class="nav-item" role="presentation">
25        <a class="nav-link<?= $famlist->isEmpty() ? ' text-muted' : '' ?>" data-toggle="tab" role="tab" href="#families">
26            <?= I18N::translate('Families') ?>
27            <?= view('components/badge', ['count' => count($famlist)]) ?>
28        </a>
29    </li>
30</ul>
31<div class="tab-content">
32    <div class="tab-pane fade show active" role="tabpanel" id="individuals">
33        <?php if ($indilist->isEmpty()) : ?>
34            <p><?= I18N::translate('No results found.') ?></p>
35        <?php else : ?>
36            <?= view('lists/individuals-table', [
37            'individuals' => $indilist,
38            'sosa'        => false,
39            'tree'        => $tree,
40            ]) ?>
41        <?php endif ?>
42    </div>
43
44    <div class="tab-pane fade" role="tabpanel" id="families">
45        <?php if ($famlist->isEmpty()) : ?>
46            <p><?= I18N::translate('No results found.') ?></p>
47        <?php else : ?>
48            <?= view('lists/families-table', ['families' => $famlist, 'tree' => $tree]) ?>
49        <?php endif ?>
50    </div>
51</div>
52