forked from ZwiiCMS-Team/ZwiiCMS
v9.0.0 : page de gestion des thèmes
This commit is contained in:
parent
f5cae0f255
commit
bd5648764d
@ -2163,11 +2163,11 @@ class layout extends common {
|
||||
$rightItems .= '<li><a href="' . helper::baseUrl() . 'user" title="Configurer les utilisateurs">' . template::ico('users') . '</a></li>';
|
||||
$rightItems .= '<li><a href="' . helper::baseUrl() . 'theme" title="Personnaliser le thème">' . template::ico('brush') . '</a></li>';
|
||||
$rightItems .= '<li><a href="' . helper::baseUrl() . 'config" title="Configurer le site">' . template::ico('gear') . '</a></li>';
|
||||
// UA
|
||||
// Mise à jour bloquée
|
||||
// if(helper::checkNewVersion()) {
|
||||
// $rightItems .= '<li><a id="barUpdate" href="' . helper::baseUrl() . 'install/update" title="Mettre à jour Zwii">' . template::ico('update colorRed') . '</a></li>';
|
||||
// }
|
||||
// UA
|
||||
// Mise à jour bloquée
|
||||
}
|
||||
$rightItems .= '<li><a href="' . helper::baseUrl() . 'user/edit/' . $this->getUser('id') . '" title="Configurer mon compte">' . template::ico('user', 'right') . $this->getUser('firstname') . ' ' . $this->getUser('lastname') . '</a></li>';
|
||||
$rightItems .= '<li><a id="barLogout" href="' . helper::baseUrl() . 'user/logout" title="Se déconnecter">' . template::ico('logout') . '</a></li>';
|
||||
|
@ -23,7 +23,10 @@ class theme extends common {
|
||||
'index' => self::GROUP_ADMIN,
|
||||
'menu' => self::GROUP_ADMIN,
|
||||
'reset' => self::GROUP_ADMIN,
|
||||
'site' => self::GROUP_ADMIN
|
||||
'site' => self::GROUP_ADMIN,
|
||||
'manage' => self::GROUP_ADMIN,
|
||||
'themeEport' => self::GROUP_ADMIN,
|
||||
'themeImport' => self::GROUP_ADMIN
|
||||
];
|
||||
public static $aligns = [
|
||||
'left' => 'À gauche',
|
||||
@ -440,4 +443,46 @@ class theme extends common {
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Import du thème
|
||||
*/
|
||||
public function manage() {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => 'Gestion des thèmes',
|
||||
'view' => 'manage'
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Export du thème
|
||||
*/
|
||||
public function themeExport() {
|
||||
// Creation du ZIP
|
||||
$fileName = date('Theme Y-m-d-h-i-s', time()) . '.zip';
|
||||
$zip = new ZipArchive();
|
||||
if($zip->open('site/tmp/' . $fileName, ZipArchive::CREATE) === TRUE){
|
||||
foreach('data/theme.json' as $file) {
|
||||
$zip->addFile($file);
|
||||
}
|
||||
}
|
||||
$zip->close();
|
||||
// Téléchargement du ZIP
|
||||
header('Content-Transfer-Encoding: binary');
|
||||
header('Content-Disposition: attachment; filename="' . $fileName . '"');
|
||||
header('Content-Length: ' . filesize('site/tmp/' . $fileName));
|
||||
readfile('site/tmp/' . $fileName);
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'display' => self::DISPLAY_RAW
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Import du thème
|
||||
*/
|
||||
public function themeImport() {
|
||||
}
|
||||
|
||||
}
|
@ -21,6 +21,7 @@ footer {
|
||||
}
|
||||
#themeShowAll,
|
||||
#themeBack,
|
||||
#themeManage,
|
||||
#themeAdvanced {
|
||||
position: relative;
|
||||
z-index: 11;
|
||||
|
@ -5,7 +5,7 @@
|
||||
): ?>
|
||||
<?php echo template::speech('Cliquez sur une zone afin d\'accéder à ses options de personnalisation. Vous pouvez également afficher les zones cachées à l\'aide du bouton ci-dessous.'); ?>
|
||||
<div class="row">
|
||||
<div class="col2 offset3">
|
||||
<div class="col2 offset2">
|
||||
<?php echo template::button('themeBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl(false),
|
||||
@ -13,6 +13,13 @@
|
||||
'value' => 'Accueil'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::button('themeManage', [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/manage',
|
||||
'ico' => 'download',
|
||||
'value' => 'Importer/Exporter'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::button('themeAdvanced', [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/advanced',
|
||||
@ -30,7 +37,7 @@
|
||||
<?php else: ?>
|
||||
<?php echo template::speech('Cliquez sur une zone afin d\'accéder à ses options de personnalisation.'); ?>
|
||||
<div class="row">
|
||||
<div class="col2 offset4">
|
||||
<div class="col2 offset3">
|
||||
<?php echo template::button('themeBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl(false),
|
||||
@ -38,6 +45,13 @@
|
||||
'value' => 'Accueil'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::button('themeManage', [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/manage',
|
||||
'ico' => 'download',
|
||||
'value' => 'Importer/Exporter'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::button('themeAdvanced', [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/advanced',
|
||||
|
24
core/module/theme/view/manage/manage.php
Normal file
24
core/module/theme/view/manage/manage.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php ?>
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::button('themeBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl(false),
|
||||
'ico' => 'home',
|
||||
'value' => 'Accueil'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::button('themeManage', [
|
||||
'href' => helper::baseUrl() . 'theme/themeImport',
|
||||
'value' => 'Importer les données du thème'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::button('themeManage', [
|
||||
'href' => helper::baseUrl() . 'theme/themeExport',
|
||||
'value' => 'Exporter les données du thème'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php?>
|
Loading…
Reference in New Issue
Block a user