xref: /webtrees/resources/views/modules/lifespans-chart/page.phtml (revision 10e0649788c8d7d4974d81c048ca2b225df8f22e)
171378461SGreg Roach<?php
271378461SGreg Roach
3*10e06497SGreg Roachdeclare(strict_types=1);
4*10e06497SGreg Roach
571378461SGreg Roachuse Fisharebest\Webtrees\I18N;
67c2c99faSGreg Roachuse Fisharebest\Webtrees\Tree;
77c2c99faSGreg Roach
87c2c99faSGreg Roach/**
97c2c99faSGreg Roach * @var string        $ajax_url
107c2c99faSGreg Roach * @var string        $reset_url
117c2c99faSGreg Roach * @var string        $title
127c2c99faSGreg Roach * @var Tree          $tree
137c2c99faSGreg Roach * @var array<string> $xrefs
147c2c99faSGreg Roach */
1571378461SGreg Roach
1671378461SGreg Roach?>
179b5537c3SGreg Roach
189b5537c3SGreg Roach<h2 class="wt-page-title">
199b5537c3SGreg Roach    <?= $title ?>
209b5537c3SGreg Roach</h2>
219b5537c3SGreg Roach
2271378461SGreg Roach<form method="post" class="wt-page-options wt-page-options-lifespans-chart d-print-none">
239b5537c3SGreg Roach    <?php foreach ($xrefs as $xref) : ?>
249b5537c3SGreg Roach        <input name="xrefs[]" type="hidden" value="<?= e($xref) ?>">
259b5537c3SGreg Roach    <?php endforeach ?>
269b5537c3SGreg Roach
279e3c2cf9SGreg Roach    <div class="row">
289b5537c3SGreg Roach        <label class="col-sm-3 col-form-label wt-page-options-label" for="addxref">
299b5537c3SGreg Roach            <?= I18N::translate('Add individuals') ?>
309b5537c3SGreg Roach        </label>
319b5537c3SGreg Roach        <div class="col-sm-9 wt-page-options-value">
32a60f9d1cSGreg Roach            <?= view('components/select-individual', ['name' => 'addxref', 'tree' => $tree]) ?>
33b6c326d8SGreg Roach            <?= view('components/checkbox', ['label' => /* I18N: Label for a configuration option */ I18N::translate('Include the individual’s immediate family'), 'name' => 'addfam']) ?>
349b5537c3SGreg Roach        </div>
359b5537c3SGreg Roach    </div>
369b5537c3SGreg Roach
379e3c2cf9SGreg Roach    <div class="row">
389b5537c3SGreg Roach        <div class="col-sm-12 col-form-label wt-page-options-label">
399b5537c3SGreg Roach            <?= I18N::translate('Select individuals by place or date') ?>
409b5537c3SGreg Roach        </div>
419b5537c3SGreg Roach    </div>
429b5537c3SGreg Roach
439e3c2cf9SGreg Roach    <div class="row">
44a60f9d1cSGreg Roach        <label class="col-sm-3 col-form-label wt-page-options-label" for="place_id">
459b5537c3SGreg Roach            <?= I18N::translate('Place') ?>
469b5537c3SGreg Roach        </label>
479b5537c3SGreg Roach        <div class="col-sm-9 wt-page-options-value">
48a60f9d1cSGreg Roach            <?= view('components/select-place', ['name' => 'place_id', 'tree' => $tree]) ?>
499b5537c3SGreg Roach        </div>
509b5537c3SGreg Roach    </div>
519b5537c3SGreg Roach
529e3c2cf9SGreg Roach    <div class="row">
539b5537c3SGreg Roach        <label class="col-sm-3 col-form-label wt-page-options-label" for="start">
549b5537c3SGreg Roach            <?= I18N::translate('Start year') ?>
559b5537c3SGreg Roach        </label>
569b5537c3SGreg Roach        <div class="col-sm-9 wt-page-options-value">
579b5537c3SGreg Roach            <input class="form-control" id="start" name="start" type="text">
589b5537c3SGreg Roach        </div>
599b5537c3SGreg Roach    </div>
609b5537c3SGreg Roach
619e3c2cf9SGreg Roach    <div class="row">
629b5537c3SGreg Roach        <label class="col-sm-3 col-form-label wt-page-options-label" for="end">
639b5537c3SGreg Roach            <?= I18N::translate('End year') ?>
649b5537c3SGreg Roach        </label>
659b5537c3SGreg Roach        <div class="col-sm-9 wt-page-options-value">
669b5537c3SGreg Roach            <input class="form-control" id="end" name="end" type="text">
679b5537c3SGreg Roach        </div>
689b5537c3SGreg Roach    </div>
699b5537c3SGreg Roach
709e3c2cf9SGreg Roach    <div class="row mb-3">
719b5537c3SGreg Roach        <div class="col-form-label col-sm-3 wt-page-options-label"></div>
729b5537c3SGreg Roach        <div class="col-sm-9 wt-page-options-value">
739b5537c3SGreg Roach            <button type="submit" class="btn btn-primary" type="submit">
7471378461SGreg Roach                <?= /* I18N: A button label. */
7571378461SGreg Roach                I18N::translate('add') ?>
769b5537c3SGreg Roach            </button>
779b5537c3SGreg Roach            <a class="btn btn-secondary" href="<?= e($reset_url) ?>">
7871378461SGreg Roach                <?= /* I18N: A button label. */
7971378461SGreg Roach                I18N::translate('reset') ?>
809b5537c3SGreg Roach            </a>
819b5537c3SGreg Roach        </div>
829b5537c3SGreg Roach    </div>
839b5537c3SGreg Roach
8481443e3cSGreg Roach    <?= csrf_field() ?>
859b5537c3SGreg Roach</form>
869b5537c3SGreg Roach
87d4786c66SGreg Roach<div class="wt-ajax-load wt-page-content wt-chart wt-timeline-chart" data-wt-ajax-url="<?= e($ajax_url) ?>"></div>
88