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