xref: /webtrees/resources/views/modules/hourglass-chart/parents.phtml (revision 7c2c99fad7cacd17c98be88238ff735d82c6351b)
1cb0eb4a9SGreg Roach<?php
2cb0eb4a9SGreg Roach
3cb0eb4a9SGreg Roachuse Fisharebest\Webtrees\Family;
4*7c2c99faSGreg Roachuse Fisharebest\Webtrees\Individual;
5cb0eb4a9SGreg Roach
6cb0eb4a9SGreg Roach/**
7cb0eb4a9SGreg Roach * @var Family $family
8cb0eb4a9SGreg Roach * @var int    $generations
9cb0eb4a9SGreg Roach */
10cb0eb4a9SGreg Roach
11cb0eb4a9SGreg Roach?>
12cb0eb4a9SGreg Roach
13cb0eb4a9SGreg Roach<div class="d-flex">
14cb0eb4a9SGreg Roach    <div class="align-self-center">
15cb0eb4a9SGreg Roach        <div class="d-flex">
16cb0eb4a9SGreg Roach            <div class="wt-chart-horizontal-spacer">
17cb0eb4a9SGreg Roach                <div class="wt-chart-horizontal-first-parent"></div>
18cb0eb4a9SGreg Roach            </div>
19cb0eb4a9SGreg Roach
20cb0eb4a9SGreg Roach            <div class="align-self-center">
21cb0eb4a9SGreg Roach                <?= view('chart-box', ['individual' => $family->husband()]) ?>
22cb0eb4a9SGreg Roach            </div>
23cb0eb4a9SGreg Roach
24*7c2c99faSGreg Roach            <?php if ($family->husband() instanceof Individual && $family->husband()->childFamilies()->first() instanceof Family) : ?>
25cb0eb4a9SGreg Roach                <div class="wt-chart-horizontal-spacer">
26cb0eb4a9SGreg Roach                    <div class="wt-chart-horizontal-line"></div>
27cb0eb4a9SGreg Roach                </div>
28cb0eb4a9SGreg Roach
29cb0eb4a9SGreg Roach                <?php if ($generations > 1) : ?>
301afbbc50SGreg Roach                    <?= view('modules/hourglass-chart/parents', ['family' => $family->husband()->childFamilies()->first(), 'generations' => $generations - 1]) ?>
31cb0eb4a9SGreg Roach                <?php else : ?>
32cb0eb4a9SGreg Roach                    <div class="align-self-center">
331afbbc50SGreg Roach                        <div class="hourglass-arrow" data-xref="<?= route('module', ['module' => 'hourglass_chart', 'action' => 'Ancestors', 'xref' => $family->husband()->childFamilies()->first()->xref(), 'tree' => $family->husband()->childFamilies()->first()->tree()->name()]) ?>">
34cb0eb4a9SGreg Roach                            <?= view('icons/arrow-right') ?>
35cb0eb4a9SGreg Roach                        </div>
36cb0eb4a9SGreg Roach                    </div>
37cb0eb4a9SGreg Roach                <?php endif ?>
38cb0eb4a9SGreg Roach            <?php endif ?>
39cb0eb4a9SGreg Roach        </div>
40cb0eb4a9SGreg Roach
41cb0eb4a9SGreg Roach        <div class="d-flex">
42cb0eb4a9SGreg Roach            <div class="wt-chart-horizontal-spacer">
43cb0eb4a9SGreg Roach                <div class="wt-chart-horizontal-last-parent"></div>
44cb0eb4a9SGreg Roach            </div>
45cb0eb4a9SGreg Roach
46cb0eb4a9SGreg Roach            <div class="align-self-center">
47cb0eb4a9SGreg Roach                <?= view('chart-box', ['individual' => $family->wife()]) ?>
48cb0eb4a9SGreg Roach            </div>
49cb0eb4a9SGreg Roach
50*7c2c99faSGreg Roach            <?php if ($family->wife() instanceof Individual && $family->wife()->childFamilies()->first() instanceof Family) : ?>
51cb0eb4a9SGreg Roach                <div class="wt-chart-horizontal-spacer">
52cb0eb4a9SGreg Roach                    <div class="wt-chart-horizontal-line"></div>
53cb0eb4a9SGreg Roach                </div>
54cb0eb4a9SGreg Roach
55cb0eb4a9SGreg Roach                <?php if ($generations > 1) : ?>
561afbbc50SGreg Roach                    <?= view('modules/hourglass-chart/parents', ['family' => $family->wife()->childFamilies()->first(), 'generations' => $generations - 1]) ?>
57cb0eb4a9SGreg Roach                <?php else : ?>
58cb0eb4a9SGreg Roach                    <div class="align-self-center">
59cb0eb4a9SGreg Roach                        <div class="align-self-center">
601afbbc50SGreg Roach                            <div class="hourglass-arrow" data-xref="<?= route('module', ['module' => 'hourglass_chart', 'action' => 'Ancestors', 'xref' => $family->wife()->childFamilies()->first()->xref(), 'tree' => $family->wife()->childFamilies()->first()->tree()->name()]) ?>">
61cb0eb4a9SGreg Roach                                <?= view('icons/arrow-right') ?>
62cb0eb4a9SGreg Roach                            </div>
63cb0eb4a9SGreg Roach                        </div>
64cb0eb4a9SGreg Roach                    </div>
65cb0eb4a9SGreg Roach                <?php endif ?>
66cb0eb4a9SGreg Roach            <?php endif ?>
67cb0eb4a9SGreg Roach        </div>
68cb0eb4a9SGreg Roach    </div>
69cb0eb4a9SGreg Roach</div>
70