xref: /webtrees/resources/views/statistics/families/top10-list-age.phtml (revision 4ab569c4c8308c69f44f469a505a990cdf849c72)
18add1155SRico Sonntag<?php
2d70512abSGreg Roach
38add1155SRico Sonntagdeclare(strict_types=1);
48add1155SRico Sonntag
58add1155SRico Sonntaguse Fisharebest\Webtrees\I18N;
68add1155SRico Sonntag
7dc270d8cSGreg Roach/**
8dc270d8cSGreg Roach * @var array<array> $records
9dc270d8cSGreg Roach */
10dc270d8cSGreg Roach
118add1155SRico Sonntag?>
128add1155SRico Sonntag
13dd7dd2a1SRico Sonntag<?php if ($records) : ?>
148add1155SRico Sonntag    <ul class="list-group list-group-flush">
158add1155SRico Sonntag        <?php foreach ($records as $record) : ?>
168add1155SRico Sonntag            <?php $child1 = $record['child1']; ?>
178add1155SRico Sonntag            <?php $child2 = $record['child2']; ?>
188add1155SRico Sonntag            <?php $family = $record['family']; ?>
198add1155SRico Sonntag            <li class="list-group-item d-flex justify-content-between align-items-center">
208add1155SRico Sonntag                <span>
2139ca88baSGreg Roach                    <a href="<?= e($child2->url()) ?>"><?= $child2->fullName() ?></a> <?= I18N::translate('and') ?> <a href="<?= e($child1->url()) ?>"><?= $child1->fullName() ?></a>
228add1155SRico Sonntag                    <br>
238add1155SRico Sonntag                    <a href="<?= e($family->url()) ?>">[<?= I18N::translate('View this family') ?>]</a>
248add1155SRico Sonntag                </span>
25*4ab569c4SGreg Roach                <span class="badge bg-secondary rounded-pill ms-3"><?= $record['age'] ?></span>
268add1155SRico Sonntag            </li>
278add1155SRico Sonntag        <?php endforeach; ?>
288add1155SRico Sonntag    </ul>
29dd7dd2a1SRico Sonntag<?php else : ?>
30dd7dd2a1SRico Sonntag    <div class="card-body">
3139c990acSGreg Roach        <?= I18N::translate('This information is not available.') ?>
32dd7dd2a1SRico Sonntag    </div>
33dd7dd2a1SRico Sonntag<?php endif; ?>
34