v9.0.0 : masque de gestion des themes export

This commit is contained in:
fredtempez 2018-12-27 12:45:00 +01:00
parent 6eab8bad97
commit 012812f4c1
2 changed files with 33 additions and 22 deletions

View File

@ -542,13 +542,13 @@ class theme extends common {
} }
$zip->close(); $zip->close();
// Téléchargement du ZIP // Téléchargement du ZIP
header('Content-Description: File Transfer'); header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream'); header('Content-Type: application/octet-stream');
header('Content-Transfer-Encoding: binary'); header('Content-Transfer-Encoding: binary');
header('Content-Disposition: attachment; filename="' . $zipFilename . '"'); header('Content-Disposition: attachment; filename="' . $zipFilename . '"');
header('Content-Length: ' . filesize('site/tmp/' . $zipFilename)); header('Content-Length: ' . filesize('site/tmp/' . $zipFilename));
readfile('site/tmp/' . $zipFilename); readfile('site/tmp/' . $zipFilename);
// Nettoyage du dossier
unlink ('site/tmp/' . $zipFilename); unlink ('site/tmp/' . $zipFilename);
rmdir ($folderTemp); rmdir ($folderTemp);
// Valeurs en sortie // Valeurs en sortie

View File

@ -1,5 +1,4 @@
<?php ?> <?php ?>
<div class="row">
<div class="col2"> <div class="col2">
<?php echo template::button('themeBack', [ <?php echo template::button('themeBack', [
'class' => 'buttonGrey', 'class' => 'buttonGrey',
@ -8,17 +7,29 @@
'value' => 'Accueil' 'value' => 'Accueil'
]); ?> ]); ?>
</div> </div>
<div class="col2"> <div class="row">
<div class="col6">
<div class="block">
<h4>Importer les données du thème</h4>
<div class="col5 offset3">
<?php echo template::button('themeImport', [ <?php echo template::button('themeImport', [
'href' => helper::baseUrl() . 'theme/import', 'href' => helper::baseUrl() . 'theme/import',
'value' => 'Importer les données du thème' 'value' => 'Importer les données du thème'
]); ?> ]); ?>
</div> </div>
<div class="col2"> </div>
</div>
<div class="col6">
<div class="block">
<h4>Exporter les données du thème</h4>
<div class="col5 offset3">
<?php echo template::button('themeExport', [ <?php echo template::button('themeExport', [
'href' => helper::baseUrl() . 'theme/export', 'href' => helper::baseUrl() . 'theme/export',
'value' => 'Exporter les données du thème' 'value' => 'Générer une archive ZIP'
]); ?> ]); ?>
</div> </div>
<p \>L'archive ZIP contient la structure du thème avec l'arborescence complète à copier dans le dossier site. Les images sont comprises dans l'archive.
</div>
</div>
</div> </div>
<?php?> <?php?>