xref: /webtrees/resources/views/modules/hourglass-chart/page.phtml (revision 5bfc689774bb9a6401271c4ed15a6d50652c991b)
1<?php
2
3use Fisharebest\Webtrees\I18N;
4use Fisharebest\Webtrees\Individual;
5use Fisharebest\Webtrees\Tree;
6
7/**
8 * @var string     $ajax_url
9 * @var int        $generations
10 * @var Individual $individual
11 * @var int        $maximum_generations
12 * @var int        $minimum_generations
13 * @var bool       $spouses
14 * @var string     $title
15 * @var Tree       $tree
16 */
17
18?>
19
20<h2 class="wt-page-title">
21    <?= $title ?>
22</h2>
23
24<form method="post" class="wt-page-options wt-page-options-hourglass-chart d-print-none">
25    <?= csrf_field() ?>
26
27    <div class="row form-group">
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 form-group">
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 form-group 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 form-group 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</form>
61
62<div class="wt-ajax-load wt-page-content wt-chart wt-chart-hourglass" data-wt-ajax-url="<?= e($ajax_url) ?>"></div>
63