xref: /webtrees/resources/views/lists/individual-table-parents.phtml (revision 10e0649788c8d7d4974d81c048ca2b225df8f22e)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\I18N;
6use Fisharebest\Webtrees\Individual;
7
8/**
9 * @var Individual $individual
10 */
11
12?>
13
14<?php foreach ($individual->childFamilies() as $family) : ?>
15    <div class="wt-individual-list-parents small" style="display: none">
16        <?php foreach ($family->spouses() as $spouse) : ?>
17            <div class="wt-individual-list-parent">
18                <?php $spouse = clone $spouse; ?>
19                <?php $spouse->setPrimaryName(null); ?>
20                <?php if ($spouse->sex() === 'F') : ?>
21                    <?= I18N::translate('Mother: %s', $spouse->fullName()) ?>
22                <?php else : ?>
23                    <?= I18N::translate('Father: %s', $spouse->fullName()) ?>
24                <?php endif ?>
25            </div>
26        <?php endforeach ?>
27    </div>
28<?php endforeach ?>
29