ZwiiCMS/core/module/config/view/setup/setup.php

187 lines
7.2 KiB
PHP
Raw Normal View History

2022-03-01 19:41:31 +01:00
<div id="setupContainer" class="tabContent">
2021-10-30 12:31:24 +02:00
<div class="row">
<div class="col12">
<div class="block">
2022-10-03 11:50:29 +02:00
<h4><?php echo helper::translate('Paramètres'); ?>
2021-11-01 20:05:09 +01:00
<span id="setupHelpButton" class="helpDisplayButton">
2022-09-29 08:45:59 +02:00
<a href="https://doc.zwiicms.fr/parametres" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php echo template::ico('help', ['margin' => 'left']); ?>
2021-11-04 18:49:15 +01:00
</a>
2021-11-01 20:05:09 +01:00
</span>
</h4>
2021-10-30 12:31:24 +02:00
<div class="row">
<div class="col4">
2021-10-30 18:36:43 +02:00
<?php echo template::file('configFavicon', [
2021-10-30 12:31:24 +02:00
'type' => 1,
'help' => 'Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.',
'label' => 'Favicon',
'value' => $this->getData(['config', 'favicon'])
]); ?>
</div>
<div class="col4">
2021-10-30 18:36:43 +02:00
<?php echo template::file('configFaviconDark', [
2021-10-30 12:31:24 +02:00
'type' => 1,
'help' => 'Sélectionnez une icône adaptée à un thème sombre.<br>Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.',
'label' => 'Favicon thème sombre',
'value' => $this->getData(['config', 'faviconDark'])
]); ?>
</div>
<div class="col4">
2021-10-30 18:12:34 +02:00
<?php echo template::select('configTimezone', $module::$timezones, [
2021-10-30 12:31:24 +02:00
'label' => 'Fuseau horaire',
'selected' => $this->getData(['config', 'timezone']),
'help' => 'Le fuseau horaire est utile au bon référencement'
]); ?>
</div>
</div>
<div class="row">
<div class="col6">
2022-09-29 08:45:59 +02:00
<?php echo template::checkbox('configCookieConsent', true, 'Message de consentement aux cookies', [
'checked' => $this->getData(['config', 'cookieConsent']),
'help' => 'Activation obligatoire selon les lois françaises sauf si vous utilisez votre propre système de consentement.'
]); ?>
</div>
2021-10-30 12:31:24 +02:00
<div class="col6">
2022-04-28 12:51:25 +02:00
<?php echo template::checkbox('configRewrite', true, 'Apache URL intelligentes', [
2021-10-30 12:31:24 +02:00
'checked' => helper::checkRewrite(),
2022-04-28 12:51:25 +02:00
'help' => 'Supprime le point d\'interrogation dans les URL, l\'option est indisponible avec les autres serveurs Web',
2022-04-28 11:17:51 +02:00
'disabled' => strpos($_SERVER["SERVER_SOFTWARE"], 'Apache') > 0 ? true : false
2021-10-30 12:31:24 +02:00
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
2022-10-03 18:37:25 +02:00
<h4><?php echo helper::translate('Mise à jour automatisée'); ?>
2021-11-01 20:05:09 +01:00
<span id="updateHelpButton" class="helpDisplayButton">
2022-09-29 08:45:59 +02:00
<a href="https://doc.zwiicms.fr/mise-a-jour" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php echo template::ico('help', ['margin' => 'left']); ?>
2021-11-02 18:29:32 +01:00
</a>
2021-11-01 20:05:09 +01:00
</span>
</h4>
2021-10-30 12:31:24 +02:00
<div class="row">
2022-01-05 18:13:25 +01:00
<div class="col6">
2021-10-30 18:36:43 +02:00
<?php echo template::checkbox('configAutoUpdate', true, 'Rechercher une mise à jour en ligne', [
2022-09-29 08:45:59 +02:00
'checked' => $this->getData(['config', 'autoUpdate']),
'help' => 'La vérification est quotidienne. Option désactivée si la configuration du serveur ne le permet pas.',
'disabled' => !$module::$onlineVersion
]); ?>
2021-10-30 12:31:24 +02:00
</div>
2022-01-05 18:13:25 +01:00
<div class="col6">
2021-10-30 18:36:43 +02:00
<?php echo template::checkbox('configAutoUpdateHtaccess', true, 'Préserver le fichier htaccess racine', [
2022-09-29 08:45:59 +02:00
'checked' => $this->getData(['config', 'autoUpdateHtaccess']),
'help' => 'Lors d\'une mise à jour automatique, conserve le fichier htaccess de la racine du site.',
'disabled' => !$module::$onlineVersion
]); ?>
2021-10-30 12:31:24 +02:00
</div>
2022-01-05 18:13:25 +01:00
</div>
<div class="row">
<div class="col6">
2022-09-29 08:45:59 +02:00
<?php echo '<pre>Version installée : <strong>' . common::ZWII_VERSION . '</strong></pre>'; ?>
<?php echo $module::$onlineVersion ? '<pre>Version en ligne : <strong>' . $module::$onlineVersion . '</strong></pre>' : ''; ?>
2022-01-05 18:13:25 +01:00
</div>
<div class="col4 verticalAlignBottom">
2021-10-30 18:36:43 +02:00
<?php echo template::button('configUpdateForced', [
2021-10-30 12:31:24 +02:00
'ico' => 'download-cloud',
'href' => helper::baseUrl() . 'install/update',
2022-01-05 18:13:25 +01:00
'value' => $module::$updateButtonText,
2021-10-30 12:31:24 +02:00
'class' => 'buttonRed',
2022-01-05 18:13:25 +01:00
'disabled' => !$module::$onlineVersion
2021-10-30 12:31:24 +02:00
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
2022-10-03 11:50:29 +02:00
<h4><?php echo helper::translate('Maintenance'); ?>
2021-11-01 20:05:09 +01:00
<span id="maintenanceHelpButton" class="helpDisplayButton">
2022-09-29 08:45:59 +02:00
<a href="https://doc.zwiicms.fr/mode-maintenance" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php echo template::ico('help', ['margin' => 'left']); ?>
2021-11-04 18:49:15 +01:00
</a>
2021-11-01 20:05:09 +01:00
</span>
</h4>
2021-10-30 12:31:24 +02:00
<div class="row">
<div class="col6">
2021-10-30 18:36:43 +02:00
<?php echo template::checkbox('configAutoBackup', true, 'Sauvegarde automatique quotidienne du site', [
2022-09-29 08:45:59 +02:00
'checked' => $this->getData(['config', 'autoBackup']),
'help' => 'Une archive contenant le dossier /site/data est copiée dans le dossier \'site/backup\'. La sauvegarde est conservée pendant 30 jours.</p><p>Les fichiers du site ne sont pas sauvegardés automatiquement. Activation recommandée.'
]); ?>
2021-10-30 12:31:24 +02:00
</div>
<div class="col6">
2021-10-30 18:36:43 +02:00
<?php echo template::checkbox('configMaintenance', true, 'Site en maintenance', [
2021-10-30 12:31:24 +02:00
'checked' => $this->getData(['config', 'maintenance'])
]); ?>
</div>
</div>
2022-02-18 12:43:48 +01:00
<div class="row">
<div class="col4 offset1">
2021-10-30 12:31:24 +02:00
<?php echo template::button('configBackupButton', [
'href' => helper::baseUrl() . 'config/backup',
2022-02-18 12:43:48 +01:00
'value' => 'Sauvegarder les données du site',
2021-10-30 12:31:24 +02:00
'ico' => 'download-cloud'
]); ?>
</div>
2022-02-18 12:43:48 +01:00
<div class="col4 offset1">
2021-10-30 12:31:24 +02:00
<?php echo template::button('configRestoreButton', [
'href' => helper::baseUrl() . 'config/restore',
2022-02-18 12:43:48 +01:00
'value' => 'Restaurer les données du site',
2021-10-30 12:31:24 +02:00
'ico' => 'upload-cloud'
]); ?>
</div>
2022-02-18 12:43:48 +01:00
</div>
<div class="row">
<div class="col4 offset1">
2021-10-30 12:31:24 +02:00
<?php echo template::button('configBackupCopyButton', [
'href' => helper::baseUrl() . 'config/copyBackups',
2022-02-18 12:43:48 +01:00
'value' => 'Copier sauvegardes auto',
'ico' => 'docs'
]); ?>
</div>
<div class="col4 offset1">
<?php echo template::button('configBackupDelButton', [
'href' => helper::baseUrl() . 'config/delBackups',
'value' => 'Vider dossier sauvegardes auto',
'ico' => 'trash',
2022-02-18 12:43:48 +01:00
'class' => 'buttonRed'
]); ?>
</div>
2021-10-30 12:31:24 +02:00
</div>
</div>
</div>
</div>
2022-05-08 18:07:41 +02:00
<div class="row">
<div class="col12">
<div class="block">
2022-10-03 11:50:29 +02:00
<h4><?php echo helper::translate('Scripts externes'); ?>
2022-05-08 18:07:41 +02:00
<span id="specialeHelpButton" class="helpDisplayButton">
2022-09-29 08:45:59 +02:00
<a href="https://doc.zwiicms.fr/scripts-externes" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php echo template::ico('help', ['margin' => 'left']); ?>
2022-05-08 18:07:41 +02:00
</a>
</span>
</h4>
<div class="row">
2022-07-31 19:17:56 +02:00
<div class="col4 offset1 verticalAlignBottom">
2022-05-08 18:07:41 +02:00
<?php echo template::button('socialScriptHead', [
'href' => helper::baseUrl() . 'config/script/head',
'value' => 'Script dans head',
'ico' => 'pencil'
]); ?>
</div>
2022-07-31 19:17:56 +02:00
<div class="col4 offset1 verticalAlignBottom">
2022-05-08 18:07:41 +02:00
<?php echo template::button('socialScriptBody', [
'href' => helper::baseUrl() . 'config/script/body',
'value' => 'Script dans body',
'ico' => 'pencil'
2022-09-29 08:45:59 +02:00
]); ?>
2022-05-08 18:07:41 +02:00
</div>
</div>
</div>
</div>
</div>
2022-09-29 08:45:59 +02:00
</div>