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,24 +1,35 @@
<?php ?> <?php ?>
<div class="col2">
<?php echo template::button('themeBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl(false),
'ico' => 'home',
'value' => 'Accueil'
]); ?>
</div>
<div class="row"> <div class="row">
<div class="col2"> <div class="col6">
<?php echo template::button('themeBack', [ <div class="block">
'class' => 'buttonGrey', <h4>Importer les données du thème</h4>
'href' => helper::baseUrl(false), <div class="col5 offset3">
'ico' => 'home', <?php echo template::button('themeImport', [
'value' => 'Accueil' 'href' => helper::baseUrl() . 'theme/import',
]); ?> 'value' => 'Importer les données du thème'
]); ?>
</div>
</div>
</div> </div>
<div class="col2"> <div class="col6">
<?php echo template::button('themeImport', [ <div class="block">
'href' => helper::baseUrl() . 'theme/import', <h4>Exporter les données du thème</h4>
'value' => 'Importer les données du thème' <div class="col5 offset3">
]); ?> <?php echo template::button('themeExport', [
</div> 'href' => helper::baseUrl() . 'theme/export',
<div class="col2"> 'value' => 'Générer une archive ZIP'
<?php echo template::button('themeExport', [ ]); ?>
'href' => helper::baseUrl() . 'theme/export', </div>
'value' => 'Exporter les données du thème' <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> </div>
<?php?> <?php?>