xref: /webtrees/resources/views/modules/ancestors-chart/page.phtml (revision 10e0649788c8d7d4974d81c048ca2b225df8f22e)
150b578bcSGreg Roach<?php
250b578bcSGreg Roach
3*10e06497SGreg Roachdeclare(strict_types=1);
4*10e06497SGreg Roach
550b578bcSGreg Roachuse Fisharebest\Webtrees\I18N;
67c2c99faSGreg Roachuse Fisharebest\Webtrees\Individual;
77c2c99faSGreg Roachuse Fisharebest\Webtrees\Tree;
87c2c99faSGreg Roach
97c2c99faSGreg Roach/**
107c2c99faSGreg Roach * @var string               $ajax_url
117c2c99faSGreg Roach * @var int                  $generations
127c2c99faSGreg Roach * @var Individual|null      $individual
137c2c99faSGreg Roach * @var int                  $maximum_generations
147c2c99faSGreg Roach * @var int                  $minimum_generations
157c2c99faSGreg Roach * @var string               $style
167c2c99faSGreg Roach * @var array<string,string> $styles
177c2c99faSGreg Roach * @var string               $title
187c2c99faSGreg Roach * @var Tree                 $tree
197c2c99faSGreg Roach */
2050b578bcSGreg Roach
2150b578bcSGreg Roach?>
229b5537c3SGreg Roach
239b5537c3SGreg Roach<h2 class="wt-page-title">
249b5537c3SGreg Roach    <?= $title ?>
259b5537c3SGreg Roach</h2>
269b5537c3SGreg Roach
2771378461SGreg Roach<form method="post" class="wt-page-options wt-page-options-ancestors-chart d-print-none">
289e3c2cf9SGreg Roach    <div class="row">
299b5537c3SGreg Roach        <label class="col-sm-3 col-form-label wt-page-options-label" for="xref">
309b5537c3SGreg Roach            <?= I18N::translate('Individual') ?>
319b5537c3SGreg Roach        </label>
329b5537c3SGreg Roach        <div class="col-sm-9 wt-page-options-value">
3300efc03cSGreg Roach            <?= view('components/select-individual', ['name' => 'xref', 'individual' => $individual, 'tree' => $tree, 'required' => true]) ?>
349b5537c3SGreg Roach        </div>
359b5537c3SGreg Roach    </div>
369b5537c3SGreg Roach
379e3c2cf9SGreg Roach    <div class="row">
389b5537c3SGreg Roach        <label class="col-sm-3 col-form-label wt-page-options-label" for="generations">
399b5537c3SGreg Roach            <?= I18N::translate('Generations') ?>
409b5537c3SGreg Roach        </label>
419b5537c3SGreg Roach        <div class="col-sm-9 wt-page-options-value">
427dca5265SGreg Roach            <input class="form-control" id="generations" name="generations" type="number" min="<?= e($minimum_generations) ?>" max="<?= e($maximum_generations) ?>" value="<?= e($generations) ?>" required="required">
439b5537c3SGreg Roach        </div>
449b5537c3SGreg Roach    </div>
459b5537c3SGreg Roach
469e3c2cf9SGreg Roach    <fieldset class="row mb-3">
479b5537c3SGreg Roach        <legend class="col-form-label col-sm-3 wt-page-options-label">
489b5537c3SGreg Roach            <?= I18N::translate('Layout') ?>
499b5537c3SGreg Roach        </legend>
509b5537c3SGreg Roach        <div class="col-sm-9 wt-page-options-value">
5171378461SGreg Roach            <?= view('components/radios-inline', ['name' => 'style', 'options' => $styles, 'selected' => $style]) ?>
529b5537c3SGreg Roach        </div>
539b5537c3SGreg Roach    </fieldset>
549b5537c3SGreg Roach
559e3c2cf9SGreg Roach    <div class="row mb-3">
569b5537c3SGreg Roach        <div class="col-form-label col-sm-3 wt-page-options-label"></div>
579b5537c3SGreg Roach        <div class="col-sm-9 wt-page-options-value">
589b5537c3SGreg Roach            <input class="btn btn-primary" type="submit" value="<?= /* I18N: A button label. */ I18N::translate('view') ?>">
599b5537c3SGreg Roach        </div>
609b5537c3SGreg Roach    </div>
6181443e3cSGreg Roach
6281443e3cSGreg Roach    <?= csrf_field() ?>
639b5537c3SGreg Roach</form>
649b5537c3SGreg Roach
65d4786c66SGreg Roach<div class="wt-ajax-load wt-page-content wt-chart wt-chart-ancestors" data-wt-ajax-url="<?= e($ajax_url) ?>"></div>
66