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