summaryrefslogtreecommitdiff
path: root/resources/views/statistics/families/top10-list-age.phtml
blob: 299ca92579c6b5ba256c7dbe91b360c74e71a68c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php

declare(strict_types=1);

use Fisharebest\Webtrees\Family;
use Fisharebest\Webtrees\I18N;
use Fisharebest\Webtrees\Individual;

/* @var array      $records */
/* @var Family     $family */
/* @var Individual $child1 */
/* @var Individual $child2 */
?>

<?php if ($records) : ?>
    <ul class="list-group list-group-flush">
        <?php foreach ($records as $record) : ?>
            <?php $child1 = $record['child1']; ?>
            <?php $child2 = $record['child2']; ?>
            <?php $family = $record['family']; ?>
            <li class="list-group-item d-flex justify-content-between align-items-center">
                <span>
                    <a href="<?= e($child2->url()) ?>"><?= $child2->fullName() ?></a> <?= I18N::translate('and') ?> <a href="<?= e($child1->url()) ?>"><?= $child1->fullName() ?></a>
                    <br>
                    <a href="<?= e($family->url()) ?>">[<?= I18N::translate('View this family') ?>]</a>
                </span>
                <span class="badge badge-secondary badge-pill ml-3"><?= $record['age'] ?></span>
            </li>
        <?php endforeach; ?>
    </ul>
<?php else : ?>
    <div class="card-body">
        <?= I18N::translate('This information is not available.') ?>
    </div>
<?php endif; ?>