xref: /webtrees/resources/views/modules/timeline-chart/page.phtml (revision 9b5537c37ce2b6d3b5c1a28c56f73d7ff9b9355c)
1<?php use Fisharebest\Webtrees\Functions\FunctionsEdit; ?>
2<?php use Fisharebest\Webtrees\I18N; ?>
3
4<h2 class="wt-page-title">
5    <?= $title ?>
6</h2>
7
8<form class="wt-page-options wt-page-options-timeline-chart d-print-none">
9    <input type="hidden" name="route" value="module">
10    <input type="hidden" name="module" value="<?= e($module_name) ?>">
11    <input type="hidden" name="action" value="Chart">
12    <input type="hidden" name="ged" value="<?= e($tree->name()) ?>">
13    <input type="hidden" name="scale" value="<?= e($scale) ?>">
14
15    <?php foreach ($individuals as $individual) : ?>
16        <input name="xrefs[]" type="hidden" value="<?= e($individual->xref()) ?>">
17    <?php endforeach ?>
18
19    <div class="row form-group">
20        <label class="col-sm-3 col-form-label wt-page-options-label" for="xref-add">
21            <?= I18N::translate('Individual') ?>
22        </label>
23        <div class="col-sm-9 wt-page-options-value">
24            <?= FunctionsEdit::formControlIndividual($tree, null, [
25                'id'   => 'xref-add',
26                'name' => 'xrefs[]',
27            ]) ?>
28        </div>
29    </div>
30
31    <div class="row form-group">
32        <div class="col-form-label col-sm-3 wt-page-options-label"></div>
33        <div class="col-sm-9 wt-page-options-value">
34            <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */
35            I18N::translate('add') ?>">
36            <a class="btn btn-secondary" href="<?= e($reset_url) ?>">
37                <?= /* I18N: A button label. */ I18N::translate('reset') ?>
38            </a>
39        </div>
40    </div>
41
42    <div class="row form-group">
43        <div class="col-form-label col-sm-3 wt-page-options-label"></div>
44        <div class="col-sm-9 wt-page-options-value">
45            <a href="<?= e($zoom_in_url) ?>" class="icon-zoomin" title="<?= I18N::translate('Zoom in') ?>"></a>
46            <a href="<?= e($zoom_out_url) ?>" class="icon-zoomout" title="<?= I18N::translate('Zoom out') ?>"></a>
47        </div>
48    </div>
49</form>
50
51<div class="row my-4">
52    <?php foreach ($individuals as $n => $individual) : ?>
53    <div class="col-md-6 col-lg-4 col-xl-3 person<?= $n % 6 ?>">
54        <?= $individual->getSexImage('large'); ?>
55        <a href="<?= e($individual->url()) ?>">
56            <?= $individual->getFullName() ?>
57            <?php if ($individual->getAddName() !== '') : ?>
58                <br>
59                <?= $individual->getAddName() ?>
60            <?php endif ?>
61        </a>
62        <a href="<?= e($remove_urls[$individual->xref()]) ?>">
63            <?= I18N::translate('Remove individual') ?>
64        </a>
65        <?php if ($individual->getBirthDate()->isOK()) : ?>
66            <br>
67            <label>
68                <input type="checkbox" name="agebar<?= $n ?>" value="ON" onclick="$('#agebox<?= $n ?>').toggle();">
69                <?= /* I18N: an age indicator, which can be dragged around the screen */ I18N::translate('Show an age cursor') ?>
70            </label>
71        <?php endif ?>
72    </div>
73    <?php endforeach ?>
74</div>
75
76<div class="wt-ajax-load wt-page-content wt-chart wt-timeline-chart" data-ajax-url="<?= e($ajax_url) ?>"></div>
77