xref: /webtrees/resources/views/modules/family-book-chart/parents.phtml (revision ac71572d8462e396ed5a307f05b29381e49f9e6e)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\Family;
6
7/**
8 * @var Family|null $family
9 * @var int         $generations
10 */
11
12?>
13<div class="d-flex">
14    <div class="align-self-center">
15        <div class="d-flex">
16            <div class="wt-chart-horizontal-spacer">
17                <div class="wt-chart-horizontal-first-parent"></div>
18            </div>
19
20            <div class="align-self-center">
21                <?= view('chart-box', ['individual' => $family ? $family->husband() : null]) ?>
22            </div>
23
24            <?php if ($generations > 1) : ?>
25                <div class="wt-chart-horizontal-spacer">
26                    <div class="wt-chart-horizontal-line"></div>
27                </div>
28
29                <?= view('modules/family-book-chart/parents', ['family' => $family && $family->husband() ? $family->husband()->childFamilies()->first() : null, 'generations' => $generations - 1]) ?>
30            <?php endif ?>
31        </div>
32
33        <div class="d-flex">
34            <div class="wt-chart-horizontal-spacer">
35                <div class="wt-chart-horizontal-last-parent"></div>
36            </div>
37
38            <div class="align-self-center">
39                <?= view('chart-box', ['individual' => $family ? $family->wife() : null ]) ?>
40            </div>
41
42            <?php if ($generations > 1) : ?>
43                <div class="wt-chart-horizontal-spacer">
44                    <div class="wt-chart-horizontal-line"></div>
45                </div>
46
47                <?= view('modules/family-book-chart/parents', ['family' => $family && $family->wife() ? $family->wife()->childFamilies()->first() : null, 'generations' => $generations - 1]) ?>
48            <?php endif ?>
49        </div>
50    </div>
51</div>
52
53