xref: /webtrees/resources/views/modules/pedigree-chart/page.phtml (revision f91b18eb982c7e34a27d159389c9b2e0f48d8614)
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        $max_generations
12 * @var int        $min_generations
13 * @var string     $title
14 * @var Tree       $tree
15 */
16
17?>
18
19<h2 class="wt-page-title">
20    <?= $title ?>
21</h2>
22
23<form method="post" class="wt-page-options wt-page-options-pedigree-chart d-print-none">
24    <?= csrf_field() ?>
25
26    <div class="row form-group">
27        <label class="col-sm-3 col-form-label wt-page-options-label" for="xref">
28            <?= I18N::translate('Individual') ?>
29        </label>
30        <div class="col-sm-9 wt-page-options-value">
31            <?= view('components/select-individual', ['name' => 'xref', 'individual' => $individual, 'tree' => $tree]) ?>
32        </div>
33    </div>
34
35    <div class="row form-group">
36        <label class="col-sm-3 col-form-label wt-page-options-label" for="generations">
37            <?= I18N::translate('Generations') ?>
38        </label>
39        <div class="col-sm-9 wt-page-options-value">
40            <?= view('components/select-number', ['name' => 'generations', 'selected' => $generations, 'options' => range($min_generations, $max_generations)]) ?>
41        </div>
42    </div>
43
44    <div class="row form-group">
45        <label class="col-sm-3 col-form-label wt-page-options-label" for="style">
46            <?= I18N::translate('Layout') ?>
47        </label>
48        <div class="col-sm-9 wt-page-options-value">
49            <?= view('components/radios-inline', ['name' => 'style', 'options' => ['left' => view('icons/pedigree-left') . I18N::translate('left'), 'right' => view('icons/pedigree-right') . I18N::translate('right'), 'up' => view('icons/pedigree-up') . I18N::translate('up'), 'down' => view('icons/pedigree-down') . I18N::translate('down'),], 'selected' => $style]) ?>
50        </div>
51    </div>
52
53    <div class="row form-group">
54        <div class="col-sm-3 wt-page-options-label"></div>
55        <div class="col-sm-9 wt-page-options-value">
56            <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */
57            I18N::translate('view') ?>">
58        </div>
59    </div>
60</form>
61
62<div class="wt-ajax-load wt-page-content wt-chart wt-chart-pedigree" data-ajax-url="<?= e($ajax_url) ?>"></div>
63