xref: /webtrees/resources/views/admin/site-preferences.phtml (revision 9483aecd71c61904a8b3a2a683a942c6571afde6)
1<?php
2
3use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
4use Fisharebest\Webtrees\I18N;
5use Fisharebest\Webtrees\Site;
6
7?>
8
9<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), $title]]) ?>
10
11<h1><?= $title ?></h1>
12
13<form method="post" action="<?= e(route('admin-site-preferences-update')) ?>" class="form-horizontal">
14    <?= csrf_field() ?>
15
16    <!-- INDEX_DIRECTORY -->
17    <div class="row form-group">
18        <label for="INDEX_DIRECTORY" class="col-sm-3 col-form-label">
19            <?= /* I18N: A configuration setting */
20            I18N::translate('Data folder') ?>
21        </label>
22        <div class="col-sm-9">
23            <input type="text" class="form-control" dir="ltr" id="INDEX_DIRECTORY" name="INDEX_DIRECTORY" value="<?= e(Site::getPreference('INDEX_DIRECTORY')) ?>" maxlength="255" placeholder="data/" required>
24            <p class="small text-muted">
25                <?= /* I18N: Help text for the "Data folder" site configuration setting */
26                I18N::translate('This folder will be used by webtrees to store media files, GEDCOM files, temporary files, etc. These files may contain private data, and should not be made available over the internet.') ?>
27            </p>
28            <p class="small text-muted">
29                <?= /* I18N: “Apache” is a software program. */
30                I18N::translate('To protect this private data, webtrees uses an Apache configuration file (.htaccess) which blocks all access to this folder. If your web-server does not support .htaccess files, and you cannot restrict access to this folder, then you can select another folder, away from your web documents.') ?>
31            </p>
32            <p class="small text-muted">
33                <?= I18N::translate('If you select a different folder, you must also move all files (except config.ini.php, index.php, and .htaccess) from the existing folder to the new folder.') ?>
34            </p>
35            <p class="small text-muted">
36                <?= I18N::translate('The folder can be specified in full (e.g. /home/user_name/webtrees_data/) or relative to the installation folder (e.g. ../../webtrees_data/).') ?>
37            </p>
38        </div>
39    </div>
40
41    <!-- TIMEZONE -->
42    <div class="row form-group">
43        <label for="TIMEZONE" class="col-sm-3 col-form-label">
44            <?= I18N::translate('Time zone') ?>
45        </label>
46        <div class="col-sm-9">
47            <?= view('components/select', ['name' => 'TIMEZONE', 'selected' => Site::getPreference('TIMEZONE', 'UTC'), 'options' => array_combine(DateTimeZone::listIdentifiers(), DateTimeZone::listIdentifiers())]) ?>
48            <p class="small text-muted">
49                <?= I18N::translate('The time zone is required for date calculations, such as knowing today’s date.') ?>
50            </p>
51        </div>
52    </div>
53
54    <!-- THEME_DIR -->
55    <div class="row form-group">
56        <label for="THEME_DIR" class="col-sm-3 col-form-label">
57            <?= /* I18N: A configuration setting */
58            I18N::translate('Default theme') ?>
59        </label>
60        <div class="col-sm-9">
61            <?= view('components/select', ['name' => 'THEME_DIR', 'selected' => Site::getPreference('THEME_DIR', 'webtrees'), 'options' => $all_themes]) ?>
62            <p class="small text-muted">
63                <?= /* I18N: Help text for the "Default theme" site configuration setting */
64                I18N::translate('You can change the appearance of webtrees using “themes”. Each theme has a different style, layout, color scheme, etc.') ?>
65            </p>
66            <p class="small text-muted">
67                <?= I18N::translate('Themes can be selected at three levels: user, family tree, and website. User preferences take priority over family tree preferences, which in turn take priority over the website preferences. Selecting “default theme” at one level will use the theme at the next level.') ?>
68            </p>
69        </div>
70    </div>
71
72    <!-- ALLOW_CHANGE_GEDCOM -->
73    <fieldset class="form-group">
74        <div class="row">
75            <legend class="col-form-label col-sm-3">
76                <?= /* I18N: A configuration setting */
77                I18N::translate('Show list of family trees') ?>
78            </legend>
79            <div class="col-sm-9">
80                <?= view('components/radios-inline', ['name' => 'ALLOW_CHANGE_GEDCOM', 'options' => [I18N::translate('no'), I18N::translate('yes')], 'selected' => (int) Site::getPreference('ALLOW_CHANGE_GEDCOM')]) ?>
81                <p class="small text-muted">
82                    <?= /* I18N: Help text for the “Show list of family trees” site configuration setting */
83                    I18N::translate('For websites with more than one family tree, this option will show the list of family trees in the main menu, the search pages, etc.') ?>
84                </p>
85            </div>
86        </div>
87    </fieldset>
88
89    <div class="row form-group">
90        <div class="offset-sm-3 col-sm-9">
91            <button type="submit" class="btn btn-primary">
92                <?= view('icons/save') ?>
93                <?= I18N::translate('save') ?>
94            </button>
95
96            <a href="<?= e(route(ControlPanel::class)) ?>" class="btn btn-secondary">
97                <?= view('icons/cancel') ?>
98                <?= I18N::translate('cancel') ?>
99            </a>
100        </div>
101    </div>
102</form>
103