xref: /webtrees/resources/views/modules/hourglass-chart/page.phtml (revision ac71572d8462e396ed5a307f05b29381e49f9e6e)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\I18N;
6use Fisharebest\Webtrees\Individual;
7use Fisharebest\Webtrees\Tree;
8
9/**
10 * @var string     $ajax_url
11 * @var int        $generations
12 * @var Individual $individual
13 * @var int        $maximum_generations
14 * @var int        $minimum_generations
15 * @var bool       $spouses
16 * @var string     $title
17 * @var Tree       $tree
18 */
19
20?>
21
22<h2 class="wt-page-title">
23    <?= $title ?>
24</h2>
25
26<form method="post" class="wt-page-options wt-page-options-hourglass-chart d-print-none">
27    <div class="row">
28        <label class="col-sm-3 col-form-label wt-page-options-label" for="xref">
29            <?= I18N::translate('Individual') ?>
30        </label>
31        <div class="col-sm-9 wt-page-options-value">
32            <?= view('components/select-individual', ['name' => 'xref', 'individual' => $individual, 'tree' => $tree, 'required' => true]) ?>
33        </div>
34    </div>
35
36    <div class="row">
37        <label class="col-sm-3 col-form-label wt-page-options-label" for="generations">
38            <?= I18N::translate('Generations') ?>
39        </label>
40        <div class="col-sm-9 wt-page-options-value">
41            <?= view('components/select-number', ['name' => 'generations', 'selected' => $generations, 'options' => range($minimum_generations, $maximum_generations)]) ?>
42        </div>
43    </div>
44
45    <fieldset class="row mb-3">
46        <legend class="col-form-label col-sm-3 wt-page-options-label">
47            <?= I18N::translate('Layout') ?>
48        </legend>
49        <div class="col-sm-9 wt-page-options-value">
50            <?= view('components/checkbox', ['label' => I18N::translate('Show spouses'), 'name' => 'spouses', 'checked' => $spouses]) ?>
51        </div>
52    </fieldset>
53
54    <div class="row mb-3">
55        <div class="col-sm-3 wt-page-options-label"></div>
56        <div class="col-sm-9 wt-page-options-value">
57            <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ I18N::translate('view') ?>">
58        </div>
59    </div>
60
61    <?= csrf_field() ?>
62</form>
63
64<div class="wt-ajax-load wt-page-content wt-chart wt-chart-hourglass" data-wt-ajax-url="<?= e($ajax_url) ?>"></div>
65