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