xref: /webtrees/resources/views/family-page-grandparents.phtml (revision 17dd427e21d166f4db62f430a276515adf98d90d)
1<?php
2
3use Fisharebest\Webtrees\I18N;
4
5?>
6
7<div class="d-flex">
8    <div class="wt-chart-horizontal-spacer">
9        <div class="wt-chart-horizontal-line"></div>
10    </div>
11    <div class="align-self-center">
12        <div class="d-flex">
13            <div class="wt-chart-horizontal-spacer">
14                <div class="wt-chart-horizontal-first-parent"></div>
15            </div>
16
17            <div class="align-self-center">
18                <?php if ($individual === null): ?>
19                    <?= view('chart-box', ['individual' => $individual]) ?>
20                <?php elseif ($family === null): ?>
21                    <div class="wt-chart-box">
22                        <a class="btn btn-link" href="<?= e(route('add-parent-to-individual', ['ged' => $individual->tree()->name(), 'xref' => $individual->xref(), 'gender' => 'M'])) ?>">
23                            <?= I18N::translate('Add a father') ?>
24                        </a>
25                    </div>
26                <?php elseif ($family->husband() === null): ?>
27                    <div class="wt-chart-box">
28                        <a class="btn btn-link" href="<?= e(route('add-spouse-to-family', ['ged' => $family->tree()->name(), 'xref' => $family->xref(), 'famtag' => 'HUSB'])) ?>">
29                            <?= I18N::translate('Add a father') ?>
30                        </a>
31                    </div>
32                <?php else: ?>
33                    <?= view('chart-box', ['individual' => $family ? $family->husband() : null]) ?>
34                <?php endif ?>
35            </div>
36        </div>
37
38        <div class="d-flex">
39            <div class="wt-chart-horizontal-spacer">
40                <div class="wt-chart-horizontal-last-parent"></div>
41            </div>
42
43            <div class="align-self-center">
44                <?php if ($individual === null): ?>
45                    <?= view('chart-box', ['individual' => $individual]) ?>
46                <?php elseif ($family === null): ?>
47                    <div class="wt-chart-box">
48                        <a class="btn btn-link" href="<?= e(route('add-parent-to-individual', ['ged' => $individual->tree()->name(), 'xref' => $individual->xref(), 'gender' => 'F'])) ?>">
49                            <?= I18N::translate('Add a mother') ?>
50                        </a>
51                    </div>
52                <?php elseif ($family->wife() === null): ?>
53                    <div class="wt-chart-box">
54                        <a class="btn btn-link" href="<?= e(route('add-spouse-to-family', ['ged' => $family->tree()->name(), 'xref' => $family->xref(), 'famtag' => 'WIFE'])) ?>">
55                            <?= I18N::translate('Add a mother') ?>
56                        </a>
57                    </div>
58                <?php else: ?>
59                    <?= view('chart-box', ['individual' => $family ? $family->wife() : null]) ?>
60                <?php endif ?>
61            </div>
62        </div>
63    </div>
64    <?php if ($family !== null): ?>
65        <div class="align-self-center">
66            <a class="btn btn-text" href="<?= e($family->url()) ?>" title="<?= strip_tags($family->fullName()) ?>">
67                <?= view('icons/arrow-right') ?>
68            </a>
69        </div>
70    <?php endif ?>
71</div>
72
73