xref: /webtrees/resources/views/modules/family-book-chart/page.phtml (revision 4a9a60957058ca2a34e30a0d6f783e1540606590)
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        $book_size
12 * @var int        $generations
13 * @var Individual $individual
14 * @var int        $maximum_book_size
15 * @var int        $minimum_book_size
16 * @var int        $maximum_generations
17 * @var int        $minimum_generations
18 * @var bool       $spouses
19 * @var string     $title
20 * @var Tree       $tree
21 */
22
23?>
24
25<h2 class="wt-page-title">
26    <?= $title ?>
27</h2>
28
29<form method="post" class="wt-page-options wt-page-options-family-book-chart d-print-none">
30    <div class="row">
31        <label class="col-sm-3 col-form-label wt-page-options-label" for="xref">
32            <?= I18N::translate('Individual') ?>
33        </label>
34        <div class="col-sm-9 wt-page-options-value">
35            <?= view('components/select-individual', ['name' => 'xref', 'individual' => $individual, 'tree' => $tree, 'required' => true]) ?>
36        </div>
37    </div>
38
39    <div class="row">
40        <label class="col-sm-3 col-form-label wt-page-options-label" for="book_size">
41            <?= I18N::translate('Generations') ?>
42        </label>
43        <div class="col-sm-9 wt-page-options-value">
44            <?= view('components/select-number', ['name' => 'book_size', 'selected' => $book_size, 'options' => range($minimum_book_size, $maximum_book_size)]) ?>
45        </div>
46    </div>
47
48    <div class="row">
49        <label class="col-sm-3 col-form-label wt-page-options-label" for="generations">
50            <?= I18N::translate('Descendant generations') ?>
51        </label>
52        <div class="col-sm-9 wt-page-options-value">
53            <?= view('components/select-number', ['name' => 'generations', 'selected' => $generations, 'options' => range($minimum_generations, $maximum_generations)]) ?>
54        </div>
55    </div>
56
57    <fieldset class="row mb-3">
58        <legend class="col-form-label col-sm-3 wt-page-options-label">
59            <?= I18N::translate('Spouses') ?>
60        </legend>
61        <div class="col-sm-9 wt-page-options-value">
62            <?= view('components/checkbox', ['label' => I18N::translate('Show spouses'), 'name' => 'spouses', 'checked' => $spouses]) ?>
63        </div>
64    </fieldset>
65
66    <div class="row mb-3">
67        <div class="col-sm-3 wt-page-options-label"></div>
68        <div class="col-sm-9 wt-page-options-value">
69            <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ I18N::translate('view') ?>">
70        </div>
71    </div>
72
73    <?= csrf_field() ?>
74</form>
75
76<div class="wt-ajax-load wt-page-content wt-chart wt-chart-family-book" data-wt-ajax-url="<?= e($ajax_url) ?>"></div>
77