forked from ZwiiCMS-Team/ZwiiCMS
Installation des thèmes
This commit is contained in:
parent
83ecfc4ba6
commit
655da7a2cc
@ -122,8 +122,8 @@ class install extends common {
|
|||||||
// Créer sitemap
|
// Créer sitemap
|
||||||
$this->createSitemap();
|
$this->createSitemap();
|
||||||
|
|
||||||
// Installation du thème
|
// Installation du thème sélectionné
|
||||||
$dataThemes = file_get_contents("core/module/install/ressource/themes/themes.json");
|
$dataThemes = file_get_contents('core/module/install/ressource/themes/themes.json');
|
||||||
$dataThemes = json_decode($dataThemes, true);
|
$dataThemes = json_decode($dataThemes, true);
|
||||||
$themeId = $dataThemes [$this->getInput('installTheme', helper::FILTER_STRING_SHORT)]['filename'];
|
$themeId = $dataThemes [$this->getInput('installTheme', helper::FILTER_STRING_SHORT)]['filename'];
|
||||||
if ($themeId !== 'default' ) {
|
if ($themeId !== 'default' ) {
|
||||||
@ -131,6 +131,13 @@ class install extends common {
|
|||||||
$theme->import('core/module/install/ressource/themes/' . $themeId);
|
$theme->import('core/module/install/ressource/themes/' . $themeId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Copie des thèmes dans les fichiers
|
||||||
|
if (!is_dir(self::FILE_DIR . 'source/theme' )) {
|
||||||
|
mkdir(self::FILE_DIR . 'source/theme');
|
||||||
|
}
|
||||||
|
$this->copyDir('core/module/install/ressource/themes', self::FILE_DIR . 'source/theme');
|
||||||
|
unlink(self::FILE_DIR . 'source/theme/themes.json');
|
||||||
|
|
||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
'redirect' => helper::baseUrl(false),
|
'redirect' => helper::baseUrl(false),
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
<div class="col6">
|
<div class="col6">
|
||||||
<?php echo template::select('installTheme', $module::$themes, [
|
<?php echo template::select('installTheme', $module::$themes, [
|
||||||
'label' => 'Thème',
|
'label' => 'Thème',
|
||||||
|
'help' => 'Le thème pourrait être changé après l\'installation'
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user