xref: /webtrees/resources/views/modules/lifespans-chart/page.phtml (revision de736bf7c624049e554db93a70ee45ea43d6bc79)
1<?php
2
3use Fisharebest\Webtrees\I18N;
4use Fisharebest\Webtrees\Tree;
5
6/**
7 * @var string        $ajax_url
8 * @var string        $reset_url
9 * @var string        $title
10 * @var Tree          $tree
11 * @var array<string> $xrefs
12 */
13
14?>
15
16<h2 class="wt-page-title">
17    <?= $title ?>
18</h2>
19
20<form method="post" class="wt-page-options wt-page-options-lifespans-chart d-print-none">
21    <?php foreach ($xrefs as $xref) : ?>
22        <input name="xrefs[]" type="hidden" value="<?= e($xref) ?>">
23    <?php endforeach ?>
24
25    <div class="row">
26        <label class="col-sm-3 col-form-label wt-page-options-label" for="addxref">
27            <?= I18N::translate('Add individuals') ?>
28        </label>
29        <div class="col-sm-9 wt-page-options-value">
30            <?= view('components/select-individual', ['name' => 'addxref', 'tree' => $tree]) ?>
31            <?= view('components/checkbox', ['label' => /* I18N: Label for a configuration option */ I18N::translate('Include the individual’s immediate family'), 'name' => 'addfam']) ?>
32        </div>
33    </div>
34
35    <div class="row">
36        <div class="col-sm-12 col-form-label wt-page-options-label">
37            <?= I18N::translate('Select individuals by place or date') ?>
38        </div>
39    </div>
40
41    <div class="row">
42        <label class="col-sm-3 col-form-label wt-page-options-label" for="place_id">
43            <?= I18N::translate('Place') ?>
44        </label>
45        <div class="col-sm-9 wt-page-options-value">
46            <?= view('components/select-place', ['name' => 'place_id', 'tree' => $tree]) ?>
47        </div>
48    </div>
49
50    <div class="row">
51        <label class="col-sm-3 col-form-label wt-page-options-label" for="start">
52            <?= I18N::translate('Start year') ?>
53        </label>
54        <div class="col-sm-9 wt-page-options-value">
55            <input class="form-control" id="start" name="start" type="text">
56        </div>
57    </div>
58
59    <div class="row">
60        <label class="col-sm-3 col-form-label wt-page-options-label" for="end">
61            <?= I18N::translate('End year') ?>
62        </label>
63        <div class="col-sm-9 wt-page-options-value">
64            <input class="form-control" id="end" name="end" type="text">
65        </div>
66    </div>
67
68    <div class="row mb-3">
69        <div class="col-form-label col-sm-3 wt-page-options-label"></div>
70        <div class="col-sm-9 wt-page-options-value">
71            <button type="submit" class="btn btn-primary" type="submit">
72                <?= /* I18N: A button label. */
73                I18N::translate('add') ?>
74            </button>
75            <a class="btn btn-secondary" href="<?= e($reset_url) ?>">
76                <?= /* I18N: A button label. */
77                I18N::translate('reset') ?>
78            </a>
79        </div>
80    </div>
81
82    <?= csrf_field() ?>
83</form>
84
85<div class="wt-ajax-load wt-page-content wt-chart wt-timeline-chart" data-wt-ajax-url="<?= e($ajax_url) ?>"></div>
86