Gestion des thèmes

This commit is contained in:
Deltacms 2023-07-08 09:07:21 +02:00
parent 8424b197b1
commit 38e78d15f0
5 changed files with 9 additions and 7 deletions

View File

@ -201,7 +201,7 @@ $text['core_theme_view']['manage'][11] = 'Download theme';
$text['core_theme_view']['manage'][12] = 'Site theme';
$text['core_theme_view']['manage'][13] = 'Administration theme';
$text['core_theme_view']['manage'][14] = "Are you sure you want to reset the site theme to its original state ?";
$text['core_theme_view']['manage'][15] = "Your custom.css file will be overwritten, you will be able to find it in the automatic backup that will be created, continue?";
$text['core_theme_view']['manage'][15] = "Your custom.css file will be overwritten, you will be able to find it in the automatic backup that will be created, continue? If Yes, a cacheless refresh of your browser will probably be necessary.";
$text['core_theme_view']['manage'][16] = "Enter a name without extension (optional)";
$text['core_theme_view']['menu'][0] = 'Back';
$text['core_theme_view']['menu'][1] = 'Help';

View File

@ -201,7 +201,7 @@ $text['core_theme_view']['manage'][11] = 'Descargar tema';
$text['core_theme_view']['manage'][12] = 'Tema del sitio';
$text['core_theme_view']['manage'][13] = 'Tema administrativo';
$text['core_theme_view']['manage'][14] = "¿Está seguro de que desea restablecer el tema del sitio a su estado original?";
$text['core_theme_view']['manage'][15] = "Su archivo custom.css se sobrescribirá, puede encontrarlo en la copia de seguridad automática que se creará, ¿continuar?";
$text['core_theme_view']['manage'][15] = "Su archivo custom.css se sobrescribirá, puede encontrarlo en la copia de seguridad automática que se creará, ¿continuar? Si es así, probablemente será necesaria una actualización sin caché de su navegador.";
$text['core_theme_view']['manage'][16] = "Ingrese un nombre sin extensión (opcional)";
$text['core_theme_view']['menu'][0] = 'Atrás';
$text['core_theme_view']['menu'][1] = 'Ayuda';

View File

@ -201,7 +201,7 @@ $text['core_theme_view']['manage'][11] = 'Télécharger le thème';
$text['core_theme_view']['manage'][12] = 'Thème du site';
$text['core_theme_view']['manage'][13] = 'Thème de l\'administration';
$text['core_theme_view']['manage'][14] = "Êtes-vous sûr de vouloir réinitialiser à son état d\'origine le thème du site ?";
$text['core_theme_view']['manage'][15] = "Votre fichier custom.css va être écrasé, vous pourrez le retrouver dans la sauvegarde automatique qui va être créée, continuez ?";
$text['core_theme_view']['manage'][15] = "Votre fichier custom.css va être écrasé, vous pourrez le retrouver dans la sauvegarde automatique qui va être créée, continuez ? Si oui un rafraîchissement sans cache de votre navigateur sera probablement nécessaire.";
$text['core_theme_view']['manage'][16] = "Saisissez un nom sans extension (facultatif)";
$text['core_theme_view']['menu'][0] = 'Retour';
$text['core_theme_view']['menu'][1] = 'Aide';

View File

@ -657,7 +657,7 @@ class theme extends common {
break;
case 'manage':
$this->initData('theme');
$redirect = helper::baseUrl() . 'theme/manage';
$redirect = helper::baseUrl() . 'theme/manage';
break;
case 'custom':
unlink(self::DATA_DIR.'custom.css');
@ -760,10 +760,12 @@ class theme extends common {
$zipFilename = $this->getInput('themeManageImport', helper::FILTER_STRING_SHORT, true);
$data = $this->import(self::FILE_DIR.'source/' . $zipFilename);
if ($data['success']) {
header("Refresh:0");
// Régénérer theme.css et admin.css
if (file_exists(self::DATA_DIR . 'theme.css')) unlink(self::DATA_DIR . 'theme.css');
if (file_exists(self::DATA_DIR . 'theme.css')) unlink(self::DATA_DIR . 'theme.css');
//$this->setData(['admin', 'maj', true]);
// Expires semble sans effet un ctrl + F5 sera nécessaire
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
header("Location: index.php");
} else {
// Valeurs en sortie
$this->addOutput([

View File

@ -22,4 +22,4 @@
height: 100%;
max-height: 600px;
object-fit: cover;
}
}