xref: /webtrees/resources/views/modules/hourglass-chart/page.phtml (revision 090a06287954f43677f06ea778b3f67c029de8fe)
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="form-group">
46        <div class="row">
47            <legend class="col-form-label col-sm-3 wt-page-options-label">
48                <?= I18N::translate('Layout') ?>
49            </legend>
50            <div class="col-sm-9 wt-page-options-value">
51                <?= view('components/checkbox', ['label' => I18N::translate('Show spouses'), 'name' => 'spouses', 'checked' => $spouses]) ?>
52            </div>
53        </div>
54    </fieldset>
55
56    <div class="row form-group">
57        <div class="col-sm-3 wt-page-options-label"></div>
58        <div class="col-sm-9 wt-page-options-value">
59            <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ I18N::translate('view') ?>">
60        </div>
61    </div>
62</form>
63
64<div class="wt-ajax-load wt-page-content wt-chart wt-chart-hourglass" data-ajax-url="<?= e($ajax_url) ?>"></div>
65