xref: /webtrees/resources/views/statistics/families/top10-list-age.phtml (revision 52bcc40297e06e51c5cc74d5ddd66c750aefef51)
1<?php
2declare(strict_types=1);
3
4use Fisharebest\Webtrees\Family;
5use Fisharebest\Webtrees\I18N;
6use Fisharebest\Webtrees\Individual;
7
8/* @var array      $records */
9/* @var Family     $family */
10/* @var Individual $child1 */
11/* @var Individual $child2 */
12?>
13
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->getFullName() ?></a> <?= I18N::translate('and') ?> <a href="<?= e($child1->url()) ?>"><?= $child1->getFullName() ?></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