summaryrefslogtreecommitdiff
path: root/resources/views/modules/relationships-chart/config.phtml
blob: d4212c3d3a82facaa01cb1854fce72e0a16c0358 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php use Fisharebest\Webtrees\Bootstrap4; ?>
<?php use Fisharebest\Webtrees\I18N; ?>

<?= view('components/breadcrumbs', ['links' => [route('admin-control-panel') => I18N::translate('Control panel'), route('admin-modules') => I18N::translate('Modules'), $title]]) ?>

<h1><?= $title ?></h1>
<p>
    <?= I18N::translate('Searching for all possible relationships can take a lot of time in complex trees.') ?>
</p>

<form method="post">
    <?= csrf_field() ?>
    <?php foreach ($all_trees as $tree) : ?>
        <h2><?= e($tree->title()) ?></h2>
        <div class="row form-group">
            <label class="col-sm-3 col-form-label" for="relationship-ancestors-<?= $tree->id() ?>">
                <?= /* I18N: Configuration option */
                I18N::translate('Relationships') ?>
            </label>
            <div class="col-sm-9">
                <?= Bootstrap4::select($ancestors_options, $tree->getPreference('RELATIONSHIP_ANCESTORS', $default_ancestors), ['id' => 'relationship-ancestors-' . $tree->id(), 'name' => 'relationship-ancestors-' . $tree->id()]) ?>
            </div>
        </div>

        <fieldset class="form-group">
            <div class="row">
                <legend class="col-form-label col-sm-3">
                    <?= /* I18N: Configuration option */
                    I18N::translate('How much recursion to use when searching for relationships') ?>
                </legend>
                <div class="col-sm-9">
                    <?= Bootstrap4::radioButtons('relationship-recursion-' . $tree->id(), $recursion_options, $tree->getPreference('RELATIONSHIP_RECURSION', $default_recursion), true) ?>
                </div>
            </div>
        </fieldset>
    <?php endforeach ?>

    <div class="row form-group">
        <div class="offset-sm-3 col-sm-9">
            <button type="submit" class="btn btn-primary">
                <?= view('icons/save') ?>
                <?= I18N::translate('save') ?>
            </button>
        </div>
    </div>
</form>