xref: /webtrees/resources/views/lists/individual-table-parents.phtml (revision 10e0649788c8d7d4974d81c048ca2b225df8f22e)
15e6816beSGreg Roach<?php
25e6816beSGreg Roach
3*10e06497SGreg Roachdeclare(strict_types=1);
4*10e06497SGreg Roach
55e6816beSGreg Roachuse Fisharebest\Webtrees\I18N;
67c2c99faSGreg Roachuse Fisharebest\Webtrees\Individual;
77c2c99faSGreg Roach
87c2c99faSGreg Roach/**
97c2c99faSGreg Roach * @var Individual $individual
107c2c99faSGreg Roach */
115e6816beSGreg Roach
125e6816beSGreg Roach?>
135e6816beSGreg Roach
145e6816beSGreg Roach<?php foreach ($individual->childFamilies() as $family) : ?>
155e6816beSGreg Roach    <div class="wt-individual-list-parents small" style="display: none">
165e6816beSGreg Roach        <?php foreach ($family->spouses() as $spouse) : ?>
175e6816beSGreg Roach            <div class="wt-individual-list-parent">
18b45eba7aSGreg Roach                <?php $spouse = clone $spouse; ?>
195e6816beSGreg Roach                <?php $spouse->setPrimaryName(null); ?>
205e6816beSGreg Roach                <?php if ($spouse->sex() === 'F') : ?>
215e6816beSGreg Roach                    <?= I18N::translate('Mother: %s', $spouse->fullName()) ?>
225e6816beSGreg Roach                <?php else : ?>
235e6816beSGreg Roach                    <?= I18N::translate('Father: %s', $spouse->fullName()) ?>
245e6816beSGreg Roach                <?php endif ?>
255e6816beSGreg Roach            </div>
265e6816beSGreg Roach        <?php endforeach ?>
275e6816beSGreg Roach    </div>
285e6816beSGreg Roach<?php endforeach ?>
29