xref: /webtrees/resources/views/family-page-parents.phtml (revision 0acf1b4bae16cbf21a23b10e22e968d2efdf4aea)
117dd427eSGreg Roach<?php
217dd427eSGreg Roach
310e06497SGreg Roachdeclare(strict_types=1);
410e06497SGreg Roach
57c2c99faSGreg Roachuse Fisharebest\Webtrees\Family;
67c7d1e03SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\AddSpouseToFamilyPage;
717dd427eSGreg Roachuse Fisharebest\Webtrees\I18N;
87c2c99faSGreg Roachuse Fisharebest\Webtrees\Individual;
97c2c99faSGreg Roach
107c2c99faSGreg Roach/**
117c2c99faSGreg Roach * @var Family $family
127c2c99faSGreg Roach */
1317dd427eSGreg Roach
1417dd427eSGreg Roach?>
1517dd427eSGreg Roach<div class="d-flex">
1617dd427eSGreg Roach    <div class="align-self-center">
1717dd427eSGreg Roach        <div class="d-flex">
1817dd427eSGreg Roach            <div class="wt-chart-horizontal-spacer">
1917dd427eSGreg Roach                <div class="wt-chart-horizontal-first-parent"></div>
2017dd427eSGreg Roach            </div>
2117dd427eSGreg Roach
2217dd427eSGreg Roach            <div class="align-self-center">
237c2c99faSGreg Roach                <?php if ($family->husband() instanceof Individual) : ?>
2417dd427eSGreg Roach                    <?= view('chart-box', ['individual' => $family->husband()]) ?>
2517dd427eSGreg Roach                <?php else : ?>
2617dd427eSGreg Roach                <div class="wt-chart-box">
270d55b628SGreg Roach                    <?php if ($family->canEdit()) : ?>
28efd4768bSGreg Roach                        <a class="btn btn-link" href="<?= e(route(AddSpouseToFamilyPage::class, ['tree' => $family->tree()->name(), 'xref' => $family->xref(), 'sex' => 'M'])) ?>">
2917dd427eSGreg Roach                            <?= I18N::translate('Add a husband')?>
3017dd427eSGreg Roach                        </a>
310d55b628SGreg Roach                    <?php endif ?>
3217dd427eSGreg Roach                </div>
3317dd427eSGreg Roach                <?php endif ?>
3417dd427eSGreg Roach            </div>
3517dd427eSGreg Roach
36*0acf1b4bSGreg Roach            <?= view('family-page-grandparents', ['family' => $family, 'parent_family' => $family->husband()?->childFamilies()->first(), 'individual' => $family->husband()]) ?>
3717dd427eSGreg Roach        </div>
3817dd427eSGreg Roach
3917dd427eSGreg Roach        <div class="d-flex">
4017dd427eSGreg Roach            <div class="wt-chart-horizontal-spacer">
4117dd427eSGreg Roach                <div class="wt-chart-horizontal-last-parent"></div>
4217dd427eSGreg Roach            </div>
4317dd427eSGreg Roach
4417dd427eSGreg Roach            <div class="align-self-center">
457c2c99faSGreg Roach                <?php if ($family->wife() instanceof Individual) : ?>
4617dd427eSGreg Roach                    <?= view('chart-box', ['individual' => $family->wife()]) ?>
4717dd427eSGreg Roach                <?php else : ?>
4817dd427eSGreg Roach                    <div class="wt-chart-box">
490d55b628SGreg Roach                        <?php if ($family->canEdit()) : ?>
50efd4768bSGreg Roach                            <a class="btn btn-link" href="<?= e(route(AddSpouseToFamilyPage::class, ['tree' => $family->tree()->name(), 'xref' => $family->xref(), 'sex' => 'F'])) ?>">
5117dd427eSGreg Roach                                <?= I18N::translate('Add a wife')?>
5217dd427eSGreg Roach                            </a>
530d55b628SGreg Roach                        <?php endif ?>
5417dd427eSGreg Roach                    </div>
5517dd427eSGreg Roach                <?php endif ?>
5617dd427eSGreg Roach            </div>
5717dd427eSGreg Roach
58*0acf1b4bSGreg Roach            <?= view('family-page-grandparents', ['family' => $family, 'parent_family' => $family->wife()?->childFamilies()->first(), 'individual' => $family->wife()]) ?>
5917dd427eSGreg Roach        </div>
6017dd427eSGreg Roach    </div>
6117dd427eSGreg Roach</div>
62