xref: /webtrees/resources/views/modules/fanchart/page.phtml (revision b2000e41e11e639ec77e52c58e48ae0ed90443f4)
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                  $maximum_width
13 * @var int                  $minimum_generations
14 * @var int                  $minimum_width
15 * @var string               $style
16 * @var array<string,string> $styles
17 * @var string               $title
18 * @var Tree                 $tree
19 * @var int                  $width
20 */
21
22?>
23
24<h2 class="wt-page-title">
25    <?= $title ?>
26</h2>
27
28<form method="post" class="wt-page-options wt-page-options-fan-chart d-print-none">
29    <?= csrf_field() ?>
30
31    <div class="row form-group">
32        <label class="col-sm-3 col-form-label wt-page-options-label" for="xref">
33            <?= I18N::translate('Individual') ?>
34        </label>
35        <div class="col-sm-9 wt-page-options-value">
36            <?= view('components/select-individual', ['name' => 'xref', 'individual' => $individual, 'tree' => $tree, 'required' => true]) ?>
37        </div>
38    </div>
39
40    <div class="row form-group">
41        <label class="col-sm-3 col-form-label wt-page-options-label" for="style">
42            <?= I18N::translate('Layout') ?>
43        </label>
44        <div class="col-sm-9 wt-page-options-value">
45            <?= view('components/select', ['name' => 'style', 'selected' => $style, 'options' => $styles]) ?>
46        </div>
47    </div>
48
49    <div class="row form-group">
50        <label class="col-sm-3 col-form-label wt-page-options-label" for="generations">
51            <?= I18N::translate('Generations') ?>
52        </label>
53        <div class="col-sm-9 wt-page-options-value">
54            <?= view('components/select-number', ['name' => 'generations', 'selected' => $generations, 'options' => range($minimum_generations, $maximum_generations)]) ?>
55        </div>
56    </div>
57
58    <div class="row form-group">
59        <label class="col-sm-3 col-form-label wt-page-options-label" for="width">
60            <?= I18N::translate('Zoom') ?>
61        </label>
62        <div class="col-sm-9 wt-page-options-value">
63            <div class="input-group">
64                <input class="form-control" id="width" max="<?= $maximum_width ?>" min="<?= $minimum_width ?>" name="width" required="required" type="number" value="<?= $width ?>">
65                <div class="input-group-append">
66                    <span class="input-group-text">
67                        %
68                    </span>
69                </div>
70            </div>
71        </div>
72    </div>
73
74    <div class="row form-group">
75        <div class="col-form-label col-sm-3 wt-page-options-label"></div>
76        <div class="col-sm-9 wt-page-options-value">
77            <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ I18N::translate('view') ?>">
78        </div>
79    </div>
80</form>
81
82<div class="wt-ajax-load wt-page-content wt-chart wt-chart-fan" data-ajax-url="<?= e($ajax_url) ?>"></div>
83