xref: /webtrees/resources/views/family-page-parents.phtml (revision 9b152ff9230017d2c03aa1bf603a98b18250446d)
1<?php
2
3use Fisharebest\Webtrees\I18N;
4
5?>
6<div class="d-flex">
7    <div class="align-self-center">
8        <div class="d-flex">
9            <div class="wt-chart-horizontal-spacer">
10                <div class="wt-chart-horizontal-first-parent"></div>
11            </div>
12
13            <div class="align-self-center">
14                <?php if ($family->husband()) : ?>
15                    <?= view('chart-box', ['individual' => $family->husband()]) ?>
16                <?php else : ?>
17                <div class="wt-chart-box">
18                    <?php if ($family->canEdit()) : ?>
19                        <a class="btn btn-link" href="<?= e(route('add-spouse-to-family', ['tree' => $family->tree()->name(), 'xref' => $family->xref(), 'famtag' => 'HUSB'])) ?>">
20                            <?= I18N::translate('Add a husband')?>
21                        </a>
22                    <?php endif ?>
23                </div>
24                <?php endif ?>
25            </div>
26
27            <?= view('family-page-grandparents', ['family' => $family->husband() ? $family->husband()->childFamilies()->first() : null, 'individual' => $family->husband()]) ?>
28        </div>
29
30        <div class="d-flex">
31            <div class="wt-chart-horizontal-spacer">
32                <div class="wt-chart-horizontal-last-parent"></div>
33            </div>
34
35            <div class="align-self-center">
36                <?php if ($family->wife()) : ?>
37                    <?= view('chart-box', ['individual' => $family->wife()]) ?>
38                <?php else : ?>
39                    <div class="wt-chart-box">
40                        <?php if ($family->canEdit()) : ?>
41                            <a class="btn btn-link" href="<?= e(route('add-spouse-to-family', ['tree' => $family->tree()->name(), 'xref' => $family->xref(), 'famtag' => 'WIFE'])) ?>">
42                                <?= I18N::translate('Add a wife')?>
43                            </a>
44                        <?php endif ?>
45                    </div>
46                <?php endif ?>
47            </div>
48
49            <?= view('family-page-grandparents', ['family' => $family->wife() ? $family->wife()->childFamilies()->first() : null, 'individual' => $family->wife()]) ?>
50        </div>
51    </div>
52</div>
53
54