xref: /webtrees/resources/views/modules/family-book-chart/page.phtml (revision c5b48766684db09f7f8372612300a247ec6929e4)
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        $book_size
10 * @var int        $generations
11 * @var Individual $individual
12 * @var int        $maximum_book_size
13 * @var int        $minimum_book_size
14 * @var int        $maximum_generations
15 * @var int        $minimum_generations
16 * @var bool       $spouses
17 * @var string     $title
18 * @var Tree       $tree
19 */
20
21?>
22
23<h2 class="wt-page-title">
24    <?= $title ?>
25</h2>
26
27<form method="post" class="wt-page-options wt-page-options-family-book-chart d-print-none">
28    <?= csrf_field() ?>
29
30    <div class="row form-group">
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 form-group">
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 form-group">
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 form-group 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 form-group 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</form>
73
74<div class="wt-ajax-load wt-page-content wt-chart wt-chart-family-book" data-wt-ajax-url="<?= e($ajax_url) ?>"></div>
75