xref: /webtrees/resources/views/modules/family-book-chart/page.phtml (revision 98ebe5e457a6f4c1618b893965b4a0f135dc8b4b)
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    <div class="row">
29        <label class="col-sm-3 col-form-label wt-page-options-label" for="xref">
30            <?= I18N::translate('Individual') ?>
31        </label>
32        <div class="col-sm-9 wt-page-options-value">
33            <?= view('components/select-individual', ['name' => 'xref', 'individual' => $individual, 'tree' => $tree, 'required' => true]) ?>
34        </div>
35    </div>
36
37    <div class="row">
38        <label class="col-sm-3 col-form-label wt-page-options-label" for="book_size">
39            <?= I18N::translate('Generations') ?>
40        </label>
41        <div class="col-sm-9 wt-page-options-value">
42            <?= view('components/select-number', ['name' => 'book_size', 'selected' => $book_size, 'options' => range($minimum_book_size, $maximum_book_size)]) ?>
43        </div>
44    </div>
45
46    <div class="row">
47        <label class="col-sm-3 col-form-label wt-page-options-label" for="generations">
48            <?= I18N::translate('Descendant generations') ?>
49        </label>
50        <div class="col-sm-9 wt-page-options-value">
51            <?= view('components/select-number', ['name' => 'generations', 'selected' => $generations, 'options' => range($minimum_generations, $maximum_generations)]) ?>
52        </div>
53    </div>
54
55    <fieldset class="row mb-3">
56        <legend class="col-form-label col-sm-3 wt-page-options-label">
57            <?= I18N::translate('Spouses') ?>
58        </legend>
59        <div class="col-sm-9 wt-page-options-value">
60            <?= view('components/checkbox', ['label' => I18N::translate('Show spouses'), 'name' => 'spouses', 'checked' => $spouses]) ?>
61        </div>
62    </fieldset>
63
64    <div class="row mb-3">
65        <div class="col-sm-3 wt-page-options-label"></div>
66        <div class="col-sm-9 wt-page-options-value">
67            <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ I18N::translate('view') ?>">
68        </div>
69    </div>
70
71    <?= csrf_field() ?>
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