Addon version actualisée
This commit is contained in:
parent
710089acf1
commit
1fd6805186
@ -20,21 +20,33 @@ class addon extends common {
|
||||
|
||||
public static $actions = [
|
||||
'index' => self::GROUP_ADMIN,
|
||||
'moduleDelete' => self::GROUP_ADMIN,
|
||||
'delete' => self::GROUP_ADMIN,
|
||||
'export' => self::GROUP_ADMIN,
|
||||
'import' => self::GROUP_ADMIN
|
||||
'import' => self::GROUP_ADMIN,
|
||||
'store' => self::GROUP_ADMIN,
|
||||
'item' => self::GROUP_ADMIN,
|
||||
'upload' => self::GROUP_ADMIN,
|
||||
'uploadItem'=> self::GROUP_ADMIN
|
||||
];
|
||||
|
||||
const URL_STORE = 'http://zwiicms.fr/?modules/';
|
||||
const BASEURL_STORE = 'http://zwiicms.fr/';
|
||||
|
||||
// Gestion des modules
|
||||
public static $modInstal = [];
|
||||
|
||||
// pour tests
|
||||
public static $valeur = [];
|
||||
|
||||
// le catalogue
|
||||
public static $storeList = [];
|
||||
public static $storeItem = [];
|
||||
|
||||
|
||||
/*
|
||||
* Effacement d'un module installé et non utilisé
|
||||
*/
|
||||
public function moduleDelete() {
|
||||
public function delete() {
|
||||
|
||||
// Jeton incorrect
|
||||
if ($this->getUrl(3) !== $_SESSION['csrf']) {
|
||||
@ -72,63 +84,14 @@ class addon extends common {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gestion des modules
|
||||
/***
|
||||
* Installation d'un module
|
||||
* Fonction utilisée par upload et storeUpload
|
||||
*/
|
||||
public function index() {
|
||||
|
||||
// Lister les modules
|
||||
// $infoModules[nom_module]['realName'], ['version'], ['update'], ['delete'], ['dataDirectory']
|
||||
$infoModules = helper::getModules();
|
||||
|
||||
// Clés moduleIds dans les pages
|
||||
$inPages = helper::arrayCollumn($this->getData(['page']),'moduleId', 'SORT_DESC');
|
||||
foreach( $inPages as $key=>$value){
|
||||
$inPagesTitle[ $this->getData(['page', $key, 'title' ]) ] = $value;
|
||||
}
|
||||
|
||||
// Parcourir les données des modules
|
||||
foreach ($infoModules as $key=>$value) {
|
||||
// Construire le tableau de sortie
|
||||
self::$modInstal[] = [
|
||||
$key,
|
||||
$infoModules[$key]['realName'],
|
||||
$infoModules[$key]['version'],
|
||||
implode(', ', array_keys($inPagesTitle,$key)),
|
||||
//array_key_exists('delete',$infoModules[$key]) && $infoModules[$key]['delete'] === true && implode(', ',array_keys($inPages,$key)) === ''
|
||||
$infoModules[$key]['delete'] === true && implode(', ',array_keys($inPages,$key)) === ''
|
||||
? template::button('moduleDelete' . $key, [
|
||||
'class' => 'moduleDelete buttonRed',
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/moduleDelete/' . $key . '/' . $_SESSION['csrf'],
|
||||
'value' => template::ico('cancel')
|
||||
])
|
||||
: '',
|
||||
implode(', ',array_keys($inPages,$key)) !== ''
|
||||
? template::button('moduleExport' . $key, [
|
||||
'href' => helper::baseUrl(). $this->getUrl(0) . '/export/' . $key . '/' . $_SESSION['csrf'],// appel de fonction vaut exécution, utiliser un paramètre
|
||||
'value' => template::ico('download')
|
||||
])
|
||||
: '',
|
||||
implode(', ',array_keys($inPages,$key)) === ''
|
||||
? template::button('moduleExport' . $key, [
|
||||
'href' => helper::baseUrl(). $this->getUrl(0) . '/import/' . $key . '/' . $_SESSION['csrf'],// appel de fonction vaut exécution, utiliser un paramètre
|
||||
'value' => template::ico('upload')
|
||||
])
|
||||
: ''
|
||||
];
|
||||
}
|
||||
|
||||
// Retour du formulaire ?
|
||||
if($this->isPost()) {
|
||||
// Installation d'un module
|
||||
$success = true;
|
||||
$checkValidMaj = $this->getInput('configModulesCheck', helper::FILTER_BOOLEAN);
|
||||
$zipFilename = $this->getInput('configModulesInstallation', helper::FILTER_STRING_SHORT);
|
||||
if( $zipFilename !== ''){
|
||||
private function install ($moduleName, $checkValid){
|
||||
$tempFolder = 'datamodules';//uniqid();
|
||||
$zip = new ZipArchive();
|
||||
if ($zip->open(self::FILE_DIR.'source/'.$zipFilename) === TRUE) {
|
||||
if ($zip->open($moduleName) === TRUE) {
|
||||
$notification = 'Archive ouverte';
|
||||
mkdir (self::TEMP_DIR . $tempFolder);
|
||||
$zip->extractTo(self::TEMP_DIR . $tempFolder );
|
||||
@ -171,12 +134,13 @@ class addon extends common {
|
||||
$update = substr($file, $posdeb + 1, $posend - $posdeb - 1);
|
||||
}
|
||||
// Si version actuelle >= version indiquée dans UPDATE la mise à jour est validée
|
||||
$infoModules = helper::getModules();
|
||||
if( $infoModules[$moduleName]['update'] >= $update ) $valUpdate = true;
|
||||
|
||||
// Module déjà installé ?
|
||||
$moduleInstal = false;
|
||||
foreach( self::$modInstal as $key=>$value){
|
||||
if($moduleName === $value[0]){
|
||||
foreach($infoModules as $key=>$value ){
|
||||
if($moduleName === $key){
|
||||
$moduleInstal = true;
|
||||
}
|
||||
}
|
||||
@ -187,7 +151,7 @@ class addon extends common {
|
||||
$valInstalVersion = floatval( $infoModules[$moduleName]['version'] );
|
||||
$newVersion = false;
|
||||
if( $valNewVersion > $valInstalVersion ) $newVersion = true;
|
||||
$validMaj = $valUpdate && ( $newVersion || $checkValidMaj);
|
||||
$validMaj = $valUpdate && ( $newVersion || $checkValid);
|
||||
|
||||
// Nouvelle installation ou mise à jour du module
|
||||
if( ! $moduleInstal || $validMaj ){
|
||||
@ -228,18 +192,212 @@ class addon extends common {
|
||||
$success = false;
|
||||
$notification = 'Impossible d\'ouvrir l\'archive';
|
||||
}
|
||||
return(['success' => $success,
|
||||
'notification'=> $notification
|
||||
]);
|
||||
}
|
||||
|
||||
/***
|
||||
* Installation d'un module à partir du gestionnaire de fichier
|
||||
*/
|
||||
public function upload() {
|
||||
// Soumission du formulaire
|
||||
if($this->isPost()) {
|
||||
// Installation d'un module
|
||||
$checkValidMaj = $this->getInput('configModulesCheck', helper::FILTER_BOOLEAN);
|
||||
$zipFilename = $this->getInput('configModulesInstallation', helper::FILTER_STRING_SHORT);
|
||||
if( $zipFilename !== ''){
|
||||
$success = [
|
||||
'success' => false,
|
||||
'notification'=> ''
|
||||
];
|
||||
$state = $this->install(self::FILE_DIR.'source/'.$zipFilename, $checkValidMaj);
|
||||
}
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . $this->getUrl(),
|
||||
'notification' => $notification,
|
||||
'state' => $success
|
||||
'notification' => $state['notification'],
|
||||
'state' => $state['success']
|
||||
]);
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => 'Téléverser un module',
|
||||
'view' => 'upload'
|
||||
]);
|
||||
}
|
||||
|
||||
/***
|
||||
* Installation d'un module par le catalogue
|
||||
*/
|
||||
public function uploadItem() {
|
||||
// Jeton incorrect
|
||||
if ($this->getUrl(3) !== $_SESSION['csrf']) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'store',
|
||||
'state' => false,
|
||||
'notification' => 'Action non autorisée'
|
||||
]);
|
||||
} else {
|
||||
// Récupérer le module en ligne
|
||||
$moduleName = $this->getUrl(2);
|
||||
// Informations sur les module en ligne
|
||||
$store = json_decode(helper::urlGetContents(self::URL_STORE . 'list'), true);
|
||||
// Url du module à télécharger
|
||||
$moduleFilePath = $store[$moduleName]['file'];
|
||||
// Télécharger le fichier
|
||||
$moduleData = helper::urlGetContents(self::BASEURL_STORE . self::FILE_DIR . 'source/' . $moduleFilePath);
|
||||
// Extraire de l'arborescence
|
||||
$d = explode('/',$moduleFilePath);
|
||||
$moduleFile = $d[count($d)-1];
|
||||
// Créer le dossier modules
|
||||
if (!is_dir(self::FILE_DIR . 'source/modules')) {
|
||||
mkdir (self::FILE_DIR . 'source/modules');
|
||||
}
|
||||
// Sauver les données du fichiers
|
||||
file_put_contents(self::FILE_DIR . 'source/modules/' . $moduleFile, $moduleData);
|
||||
|
||||
/**
|
||||
* $if( $moduleFile !== ''){
|
||||
* $success = [
|
||||
* 'success' => false,
|
||||
* 'notification'=> ''
|
||||
* ];
|
||||
* $state = $this->install(self::FILE_DIR.'source/modules/'.$moduleFile, false);
|
||||
*}
|
||||
*/
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . 'addon/store',
|
||||
'notification' => $moduleFile . ' téléchargé dans le dossier modules du gestionnaire de fichiers',
|
||||
'state' => true
|
||||
]);
|
||||
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => 'Catalogue de modules',
|
||||
'view' => 'store'
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Catalogue des modules sur le site ZwiiCMS.fr
|
||||
*/
|
||||
public function store() {
|
||||
$store = json_decode(helper::urlGetContents(self::URL_STORE . 'list'), true);
|
||||
if ($store) {
|
||||
// Modules installés
|
||||
$infoModules = helper::getModules();
|
||||
// Clés moduleIds dans les pages
|
||||
$inPages = helper::arrayCollumn($this->getData(['page']),'moduleId', 'SORT_DESC');
|
||||
foreach( $inPages as $key=>$value){
|
||||
$inPagesTitle[ $this->getData(['page', $key, 'title' ]) ] = $value;
|
||||
}
|
||||
// Parcourir les données des modules
|
||||
foreach ($store as $key=>$value) {
|
||||
// Module non installé
|
||||
$ico = template::ico('download');
|
||||
$class = '';
|
||||
// Le module est installé
|
||||
if (array_key_exists($key,$infoModules) === true) {
|
||||
$class = 'buttonGreen';
|
||||
$ico = template::ico('update');
|
||||
}
|
||||
// Le module est installé et utilisé
|
||||
if (in_array($key,$inPages) === true) {
|
||||
$class = 'buttonRed';
|
||||
$ico = template::ico('update');
|
||||
}
|
||||
self::$storeList [] = [
|
||||
'<a href="' . self::URL_STORE . $key . '" target="_blank" >'.$store[$key]['title'].'</a>',
|
||||
$store[$key]['fileVersion'],
|
||||
mb_detect_encoding(strftime('%d %B %Y', $store[$key]['fileDate']), 'UTF-8', true)
|
||||
? strftime('%d %B %Y', $store[$key]['fileDate'])
|
||||
: utf8_encode(strftime('%d %B %Y', $store[$key]['fileDate'])),
|
||||
implode(', ', array_keys($inPagesTitle,$key)),
|
||||
template::button('moduleExport' . $key, [
|
||||
'class' => $class,
|
||||
'href' => helper::baseUrl(). $this->getUrl(0) . '/uploadItem/' . $key.'/' . $_SESSION['csrf'],// appel de fonction vaut exécution, utiliser un paramètre
|
||||
'value' => $ico
|
||||
])
|
||||
];
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => 'Gestion des modules',
|
||||
'title' => 'Catalogue de modules en ligne',
|
||||
'view' => 'store'
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Détail d'un objet du catalogue
|
||||
*/
|
||||
public function item() {
|
||||
$store = json_decode(helper::urlGetContents(self::URL_STORE . 'list'), true);
|
||||
self::$storeItem = $store [$this->getUrl(2)] ;
|
||||
self::$storeItem ['fileDate'] = mb_detect_encoding(strftime('%d %B %Y',self::$storeItem ['fileDate']), 'UTF-8', true)
|
||||
? strftime('%d %B %Y', self::$storeItem ['fileDate'])
|
||||
: utf8_encode(strftime('%d %B %Y', self::$storeItem ['fileDate']));
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' =>'Module ' . self::$storeItem['title'],
|
||||
'view' => 'item'
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gestion des modules
|
||||
*/
|
||||
public function index() {
|
||||
|
||||
// Lister les modules
|
||||
// $infoModules[nom_module]['realName'], ['version'], ['update'], ['delete'], ['dataDirectory']
|
||||
$infoModules = helper::getModules();
|
||||
|
||||
// Clés moduleIds dans les pages
|
||||
$inPages = helper::arrayCollumn($this->getData(['page']),'moduleId', 'SORT_DESC');
|
||||
foreach( $inPages as $key=>$value){
|
||||
$inPagesTitle[ $this->getData(['page', $key, 'title' ]) ] = $value;
|
||||
}
|
||||
|
||||
// Parcourir les données des modules
|
||||
foreach ($infoModules as $key=>$value) {
|
||||
// Construire le tableau de sortie
|
||||
self::$modInstal[] = [
|
||||
$key,
|
||||
$infoModules[$key]['realName'],
|
||||
$infoModules[$key]['version'],
|
||||
implode(', ', array_keys($inPagesTitle,$key)),
|
||||
//|| ('delete',$infoModules[$key]) && $infoModules[$key]['delete'] === true && implode(', ',array_keys($inPages,$key)) === ''
|
||||
$infoModules[$key]['delete'] === true && implode(', ',array_keys($inPages,$key)) === ''
|
||||
? template::button('moduleDelete' . $key, [
|
||||
'class' => 'moduleDelete buttonRed',
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/delete/' . $key . '/' . $_SESSION['csrf'],
|
||||
'value' => template::ico('cancel')
|
||||
])
|
||||
: '',
|
||||
implode(', ',array_keys($inPages,$key)) !== ''
|
||||
? template::button('moduleExport' . $key, [
|
||||
'href' => helper::baseUrl(). $this->getUrl(0) . '/export/' . $key . '/' . $_SESSION['csrf'],// appel de fonction vaut exécution, utiliser un paramètre
|
||||
'value' => template::ico('download')
|
||||
])
|
||||
: '',
|
||||
implode(', ',array_keys($inPages,$key)) === ''
|
||||
? template::button('moduleExport' . $key, [
|
||||
'href' => helper::baseUrl(). $this->getUrl(0) . '/import/' . $key . '/' . $_SESSION['csrf'],// appel de fonction vaut exécution, utiliser un paramètre
|
||||
'value' => template::ico('upload')
|
||||
])
|
||||
: ''
|
||||
];
|
||||
}
|
||||
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => 'Modules installés',
|
||||
'view' => 'index'
|
||||
]);
|
||||
}
|
||||
@ -315,14 +473,13 @@ class addon extends common {
|
||||
$fileName = $this->getUrl(2) . '.zip';
|
||||
$this->makeZip ($fileName, $tmpFolder, []);
|
||||
if (file_exists($fileName)) {
|
||||
ob_start();
|
||||
header('Content-Type: application/octet-stream');
|
||||
header('Content-Disposition: attachment; filename="' . $fileName . '"');
|
||||
header('Content-Length: ' . filesize($fileName));
|
||||
ob_clean();
|
||||
ob_end_flush();
|
||||
readfile( $fileName);
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'display' => self::DISPLAY_RAW
|
||||
]);
|
||||
unlink($fileName);
|
||||
$this->removeDir($tmpFolder);
|
||||
exit();
|
||||
@ -350,7 +507,7 @@ class addon extends common {
|
||||
'notification' => 'Action non autorisée'
|
||||
]);
|
||||
}
|
||||
else{
|
||||
else {
|
||||
// Soumission du formulaire
|
||||
if($this->isPost()) {
|
||||
// Récupérer le fichier et le décompacter
|
||||
@ -423,4 +580,5 @@ class addon extends common {
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,4 @@
|
||||
<?php echo template::formOpen('configModulesGestion'); ?>
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::button('configModulesBack', [
|
||||
'class' => 'buttonGrey',
|
||||
@ -15,43 +14,23 @@
|
||||
'value' => 'Aide'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2 offset6">
|
||||
<?php echo template::submit('configModulesSubmit',[
|
||||
'value' => 'Valider',
|
||||
'ico' => 'check'
|
||||
<div class="col3 offset2">
|
||||
<?php echo template::button('configStoreUpload', [
|
||||
'href' => helper::baseUrl() . 'addon/upload',
|
||||
'value' => 'Téléverser un module'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3">
|
||||
<?php echo template::button('configModulesStore', [
|
||||
'href' => helper::baseUrl() . 'addon/store',
|
||||
'value' => 'Catalogue en ligne'
|
||||
]); ?>
|
||||
</div>
|
||||
|
||||
<!-- Aide à propos de la gestion des modules, view index -->
|
||||
<div class="helpDisplayContent">
|
||||
</div>
|
||||
<!-- Aide à propos de la gestion des modules, view index -->
|
||||
<div class="helpDisplayContent">
|
||||
<?php echo file_get_contents( 'core/module/addon/view/index/index.help.html') ;?>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Installer ou mettre à jour un module </h4>
|
||||
<div class="row">
|
||||
<div class="col6 offset3">
|
||||
<?php echo template::file('configModulesInstallation', [
|
||||
'label' => 'Archive ZIP :',
|
||||
'type' => 2
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('configModulesCheck', true, 'Mise à jour forcée', [
|
||||
'checked' => false,
|
||||
'help' => 'Permet de forcer une mise à jour même si la version du module est inférieure ou égale à celle du module installé.',
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo template::formClose(); ?>
|
||||
</div>
|
||||
<?php if($module::$modInstal): ?>
|
||||
<?php echo template::table([2, 2, 2, 2, 1, 1, 1], $module::$modInstal, ['Module installé', 'Alias', 'Version', 'Page(s)', 'Supprimer', 'Exporter', 'Importer']); ?>
|
||||
<?php else: ?>
|
||||
|
14
core/module/addon/view/item/item.css
Normal file
14
core/module/addon/view/item/item.css
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* This file is part of Zwii.
|
||||
*
|
||||
* For full copyright and license information, please see the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @author Rémi Jean <remi.jean@outlook.com>
|
||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
|
||||
* @license GNU General Public License, version 3
|
||||
* @link http://zwiicms.fr/
|
||||
*/
|
||||
|
41
core/module/addon/view/item/item.php
Normal file
41
core/module/addon/view/item/item.php
Normal file
@ -0,0 +1,41 @@
|
||||
<div class="row">
|
||||
<div class="col9">
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo $module::$storeItem['content']; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php
|
||||
echo '<img class="downloadItemPicture" src="' . $module::BASEURL_STORE . 'site/file/source/' . $module::$storeItem['picture'] .
|
||||
'" alt="' . $module::$storeItem['picture'] . '">';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12 textAlignCenter">
|
||||
<?php echo 'Version n°' . $module::$storeItem['fileVersion']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12 textAlignCenter">
|
||||
<?php echo ' du ' . $module::$storeItem['fileDate']; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12 textAlignCenter">
|
||||
<span>Auteur :
|
||||
<?php echo $module::$storeItem['fileAuthor']; ?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12 textAlignCenter">
|
||||
<span>Licence :
|
||||
<?php echo $module::$storeItem['fileLicense']; ?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
18
core/module/addon/view/store/store.css
Normal file
18
core/module/addon/view/store/store.css
Normal file
@ -0,0 +1,18 @@
|
||||
/**
|
||||
* This file is part of Zwii.
|
||||
*
|
||||
* For full copyright and license information, please see the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @author Rémi Jean <remi.jean@outlook.com>
|
||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
|
||||
* @license GNU General Public License, version 3
|
||||
* @link http://zwiicms.fr/
|
||||
*/
|
||||
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
15
core/module/addon/view/store/store.php
Normal file
15
core/module/addon/view/store/store.php
Normal file
@ -0,0 +1,15 @@
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::button('configStoreBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . 'addon',
|
||||
'ico' => 'left',
|
||||
'value' => 'Retour'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if($module::$storeList): ?>
|
||||
<?php echo template::table([4, 2, 2, 3, 1], $module::$storeList, ['Module', 'Version', 'Date', 'Pages', 'Télécharger']); ?>
|
||||
<?php else: ?>
|
||||
<?php echo template::speech('Le catalogue est vide.'); ?>
|
||||
<?php endif; ?>
|
18
core/module/addon/view/upload/upload.css
Normal file
18
core/module/addon/view/upload/upload.css
Normal file
@ -0,0 +1,18 @@
|
||||
/**
|
||||
* This file is part of Zwii.
|
||||
*
|
||||
* For full copyright and license information, please see the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*
|
||||
* @author Rémi Jean <remi.jean@outlook.com>
|
||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
|
||||
* @license GNU General Public License, version 3
|
||||
* @link http://zwiicms.fr/
|
||||
*/
|
||||
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
6
core/module/addon/view/upload/upload.help.html
Normal file
6
core/module/addon/view/upload/upload.help.html
Normal file
@ -0,0 +1,6 @@
|
||||
<h3>IMPORTER OU METTRE A JOUR</h3>
|
||||
<p>Vous avez au préalable chargé le fichier zip du module sur votre serveur en utilisant le 'Catalogue en ligne', écran précédent.</p>
|
||||
<p>D'autres modules sont également disponibles sur le <a href="https://forum.zwiicms.fr/categories/t%C3%A9l%C3%A9chargements-de-modules" target="_blank" rel="noopener">forum de ZwiiCMS</a>,
|
||||
téléversez les sur votre serveur avec 'Gérer les fichiers'.</p>
|
||||
<p>Lors d'une mise à jour Zwii contrôle la version du module à installer, pour réinstaller un module de même numéro de version vous devez cocher 'Mise à jour forcée'.
|
||||
Il est déconseillé d'installer un module plus ancien.</p>
|
52
core/module/addon/view/upload/upload.php
Normal file
52
core/module/addon/view/upload/upload.php
Normal file
@ -0,0 +1,52 @@
|
||||
<?php echo template::formOpen('configModulesUpload'); ?>
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::button('configModulesBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . 'addon',
|
||||
'ico' => 'left',
|
||||
'value' => 'Retour'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::button('addonIndexHelp', [
|
||||
'class' => 'buttonHelp',
|
||||
'ico' => 'help',
|
||||
'value' => 'Aide'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2 offset6">
|
||||
<?php echo template::submit('configModulesSubmit',[
|
||||
'value' => 'Valider',
|
||||
'ico' => 'check'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Aide à propos de la gestion des modules, view upload -->
|
||||
<div class="helpDisplayContent">
|
||||
<?php echo file_get_contents( 'core/module/addon/view/upload/upload.help.html') ;?>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Installer ou mettre à jour un module </h4>
|
||||
<div class="row">
|
||||
<div class="col6 offset3">
|
||||
<?php echo template::file('configModulesInstallation', [
|
||||
'label' => 'Archive ZIP :',
|
||||
'type' => 2
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('configModulesCheck', true, 'Mise à jour forcée', [
|
||||
'checked' => false,
|
||||
'help' => 'Permet de forcer une mise à jour même si la version du module est inférieure ou égale à celle du module installé.',
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo template::formClose(); ?>
|
Loading…
Reference in New Issue
Block a user