xref: /webtrees/resources/views/statistics/families/top10-list-age.phtml (revision f7cf8a155e2743f3d124eef3d30a558ab062fa4b)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\I18N;
6
7/**
8 * @var array<array> $records
9 */
10
11?>
12
13<?php if ($records) : ?>
14    <ul class="list-group list-group-flush">
15        <?php foreach ($records as $record) : ?>
16            <?php $child1 = $record['child1']; ?>
17            <?php $child2 = $record['child2']; ?>
18            <?php $family = $record['family']; ?>
19            <li class="list-group-item d-flex justify-content-between align-items-center">
20                <span>
21                    <a href="<?= e($child2->url()) ?>"><?= $child2->fullName() ?></a> <?= I18N::translate('and') ?> <a href="<?= e($child1->url()) ?>"><?= $child1->fullName() ?></a>
22                    <br>
23                    <a href="<?= e($family->url()) ?>">[<?= I18N::translate('View this family') ?>]</a>
24                </span>
25                <span class="badge badge-secondary badge-pill ml-3"><?= $record['age'] ?></span>
26            </li>
27        <?php endforeach; ?>
28    </ul>
29<?php else : ?>
30    <div class="card-body">
31        <?= I18N::translate('This information is not available.') ?>
32    </div>
33<?php endif; ?>
34