xref: /webtrees/resources/views/modules/random_media/config.phtml (revision b11cdcd45131b1585d66693fab363cfeb18c51a4)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\I18N;
6
7/**
8 * @var string               $controls
9 * @var string               $filter
10 * @var array<string,string> $filters
11 * @var array<string,string> $formats
12 * @var string               $start
13 */
14
15?>
16
17<div class="row mb-3">
18    <label class="col-sm-3 col-form-label" for="filter">
19        <?= I18N::translate('Show only individuals, events, or all') ?>
20    </label>
21    <div class="col-sm-9">
22        <?= view('components/select', ['name' => 'filter', 'selected' => $filter, 'options' => ['indi' => I18N::translate('Individuals'), 'event' => I18N::translate('Facts and events'), 'all' => I18N::translate('All')]]) ?>
23    </div>
24</div>
25
26<fieldset class="row mb-3">
27    <legend class="col-form-label col-sm-3">
28        <?= I18N::translate('Type') ?>
29    </legend>
30    <div class="col-sm-9">
31        <?php foreach ($formats as $type => $label) : ?>
32            <?= view('components/checkbox', ['label' => $label, 'name' => $type, 'checked' => (bool) $filters[$type]]) ?>
33        <?php endforeach ?>
34    </div>
35</fieldset>
36
37<div class="row mb-3">
38    <label class="col-sm-3 col-form-label" for="controls">
39        <?= I18N::translate('Show slide show controls') ?>
40    </label>
41    <div class="col-sm-9">
42        <?= view('components/radios-inline', ['name' => 'controls', 'options' => [I18N::translate('no'), I18N::translate('yes')], 'selected' => (int) $controls]) ?>
43    </div>
44</div>
45
46<div class="row mb-3">
47    <label class="col-sm-3 col-form-label" for="start">
48        <?= I18N::translate('Start slide show on page load') ?>
49    </label>
50    <div class="col-sm-9">
51        <?= view('components/radios-inline', ['name' => 'start', 'options' => [I18N::translate('no'), I18N::translate('yes')], 'selected' => (int) $start]) ?>
52    </div>
53</div>
54