xref: /webtrees/resources/views/admin/site-preferences.phtml (revision 4874f72da8279544d9c0a459e2920a9986acfaa0)
1<?php use Fisharebest\Webtrees\I18N; ?>
2<?php use Fisharebest\Webtrees\Site; ?>
3
4<?= view('components/breadcrumbs', ['links' => [route('admin-control-panel') => I18N::translate('Control panel'), $title]]) ?>
5
6<h1><?= $title ?></h1>
7
8<form method="post" action="<?= e(route('admin-site-preferences-update')) ?>" class="form-horizontal">
9    <?= csrf_field() ?>
10
11    <!-- INDEX_DIRECTORY -->
12    <div class="row form-group">
13        <label for="INDEX_DIRECTORY" class="col-sm-3 col-form-label">
14            <?= /* I18N: A configuration setting */
15            I18N::translate('Data folder') ?>
16        </label>
17        <div class="col-sm-9">
18            <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>
19            <p class="small text-muted">
20                <?= /* I18N: Help text for the "Data folder" site configuration setting */
21                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.') ?>
22            </p>
23            <p class="small text-muted">
24                <?= /* I18N: “Apache” is a software program. */
25                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.') ?>
26            </p>
27            <p class="small text-muted">
28                <?= 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.') ?>
29            </p>
30            <p class="small text-muted">
31                <?= 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/).') ?>
32            </p>
33        </div>
34    </div>
35
36    <!-- TIMEZONE -->
37    <div class="row form-group">
38        <label for="TIMEZONE" class="col-sm-3 col-form-label">
39            <?= I18N::translate('Time zone') ?>
40        </label>
41        <div class="col-sm-9">
42            <?= view('components/select', ['name' => 'TIMEZONE', 'selected' => Site::getPreference('TIMEZONE', 'UTC'), 'options' => array_combine(DateTimeZone::listIdentifiers(), DateTimeZone::listIdentifiers())]) ?>
43            <p class="small text-muted">
44                <?= I18N::translate('The time zone is required for date calculations, such as knowing today’s date.') ?>
45            </p>
46        </div>
47    </div>
48
49    <!-- THEME_DIR -->
50    <div class="row form-group">
51        <label for="THEME_DIR" class="col-sm-3 col-form-label">
52            <?= /* I18N: A configuration setting */
53            I18N::translate('Default theme') ?>
54        </label>
55        <div class="col-sm-9">
56            <?= view('components/select', ['name' => 'THEME_DIR', 'selected' => Site::getPreference('THEME_DIR', 'webtrees'), 'options' => $all_themes]) ?>
57            <p class="small text-muted">
58                <?= /* I18N: Help text for the "Default theme" site configuration setting */
59                I18N::translate('You can change the appearance of webtrees using “themes”. Each theme has a different style, layout, color scheme, etc.') ?>
60            </p>
61            <p class="small text-muted">
62                <?= 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.') ?>
63            </p>
64        </div>
65    </div>
66
67    <!-- ALLOW_CHANGE_GEDCOM -->
68    <fieldset class="form-group">
69        <div class="row">
70            <legend class="col-form-label col-sm-3">
71                <?= /* I18N: A configuration setting */
72                I18N::translate('Show list of family trees') ?>
73            </legend>
74            <div class="col-sm-9">
75                <?= view('components/radios-inline', ['name' => 'ALLOW_CHANGE_GEDCOM', 'options' => [I18N::translate('no'), I18N::translate('yes')], 'selected' => (int) Site::getPreference('ALLOW_CHANGE_GEDCOM')]) ?>
76                <p class="small text-muted">
77                    <?= /* I18N: Help text for the “Show list of family trees” site configuration setting */
78                    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.') ?>
79                </p>
80            </div>
81        </div>
82    </fieldset>
83
84    <div class="row form-group">
85        <div class="offset-sm-3 col-sm-9">
86            <button type="submit" class="btn btn-primary">
87                <?= view('icons/save') ?>
88                <?= I18N::translate('save') ?>
89            </button>
90
91            <a href="<?= e(route('admin-control-panel')) ?>" class="btn btn-secondary">
92                <?= view('icons/cancel') ?>
93                <?= I18N::translate('cancel') ?>
94            </a>
95        </div>
96    </div>
97</form>
98