xref: /webtrees/resources/views/modules/ancestors-chart/page.phtml (revision b11cdcd45131b1585d66693fab363cfeb18c51a4)
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                  $generations
12 * @var Individual|null      $individual
13 * @var int                  $maximum_generations
14 * @var int                  $minimum_generations
15 * @var string               $style
16 * @var array<string,string> $styles
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-ancestors-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="generations">
39            <?= I18N::translate('Generations') ?>
40        </label>
41        <div class="col-sm-9 wt-page-options-value">
42            <input class="form-control" id="generations" name="generations" type="number" min="<?= e($minimum_generations) ?>" max="<?= e($maximum_generations) ?>" value="<?= e($generations) ?>" required="required">
43        </div>
44    </div>
45
46    <fieldset class="row mb-3">
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/radios-inline', ['name' => 'style', 'options' => $styles, 'selected' => $style]) ?>
52        </div>
53    </fieldset>
54
55    <div class="row mb-3">
56        <div class="col-form-label col-sm-3 wt-page-options-label"></div>
57        <div class="col-sm-9 wt-page-options-value">
58            <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ I18N::translate('view') ?>">
59        </div>
60    </div>
61
62    <?= csrf_field() ?>
63</form>
64
65<div class="wt-ajax-load wt-page-content wt-chart wt-chart-ancestors" data-wt-ajax-url="<?= e($ajax_url) ?>"></div>
66