Merge remote-tracking branch 'origin/114_dev' into 12_dev
This commit is contained in:
commit
1d50ee3f93
@ -51,7 +51,9 @@ class gallery extends common {
|
||||
'sortGalleries' => self::GROUP_MODERATOR,
|
||||
'sortPictures' => self::GROUP_MODERATOR,
|
||||
'edit' => self::GROUP_MODERATOR,
|
||||
'add' => self::GROUP_MODERATOR,
|
||||
'theme' => self::GROUP_MODERATOR,
|
||||
'option' => self::GROUP_MODERATOR,
|
||||
'index' => self::GROUP_VISITOR
|
||||
];
|
||||
|
||||
@ -413,6 +415,58 @@ class gallery extends common {
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajout d'une galerie
|
||||
*/
|
||||
public function add() {
|
||||
// Soumission du formulaire d'ajout d'une galerie
|
||||
if($this->isPost()) {
|
||||
if (!$this->getInput('galleryAddFilterResponse')) {
|
||||
$galleryId = helper::increment($this->getInput('galleryAddName', helper::FILTER_ID, true), (array) $this->getData(['module', $this->getUrl(0), 'content']));
|
||||
// définir une vignette par défaut
|
||||
$directory = $this->getInput('galleryAddDirectory', helper::FILTER_STRING_SHORT, true);
|
||||
$iterator = new DirectoryIterator($directory);
|
||||
foreach($iterator as $fileInfos) {
|
||||
if($fileInfos->isDot() === false AND $fileInfos->isFile() AND @getimagesize($fileInfos->getPathname())) {
|
||||
// Créer la miniature si manquante
|
||||
if (!file_exists( str_replace('source','thumb',$fileInfos->getPath()) . '/' . self::THUMBS_SEPARATOR . strtolower($fileInfos->getFilename()))) {
|
||||
$this->makeThumb($fileInfos->getPathname(),
|
||||
str_replace('source','thumb',$fileInfos->getPath()) . '/' . self::THUMBS_SEPARATOR . strtolower($fileInfos->getFilename()),
|
||||
self::THUMBS_WIDTH);
|
||||
}
|
||||
// Miniatures
|
||||
$homePicture = strtolower($fileInfos->getFilename());
|
||||
break;
|
||||
}
|
||||
}
|
||||
$this->setData(['module', $this->getUrl(0), 'content', $galleryId, [
|
||||
'config' => [
|
||||
'name' => $this->getInput('galleryAddName'),
|
||||
'directory' => $this->getInput('galleryAddDirectory', helper::FILTER_STRING_SHORT, true),
|
||||
'homePicture' => $homePicture,
|
||||
'sort' => $this->getInput('galleryAddSort'),
|
||||
'position' => count($this->getData(['module', $this->getUrl(0), 'content'])) + 1,
|
||||
'fullScreen' => $this->getInput('galleryAddFullscreen', helper::FILTER_BOOLEAN),
|
||||
'showPageContent' => $this->getInput('galleryAddShowPageContent', helper::FILTER_BOOLEAN)
|
||||
],
|
||||
'legend' => [],
|
||||
'positions' => []
|
||||
]]);
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . $this->getUrl(0) . '/config', // '#galleryAddForm'*/,
|
||||
'notification' => 'Modifications enregistrées',
|
||||
'state' => true
|
||||
]);
|
||||
}
|
||||
} else {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => 'Ajout d\'une galerie',
|
||||
'view' => 'add'
|
||||
]);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Suppression
|
||||
*/
|
||||
@ -607,10 +661,10 @@ class gallery extends common {
|
||||
// Mise à jour des données de module
|
||||
$this->update();
|
||||
// Une seule galerie, bifurquer sur celle-ci
|
||||
$gallery = count($this->getData(['module', $this->getUrl(0), 'content'])) === 1
|
||||
$gallery = $this->getData(['module', $this->getUrl(0), 'theme', 'showUniqueGallery']) === true &&
|
||||
count($this->getData(['module', $this->getUrl(0), 'content'])) === 1
|
||||
? array_key_first($this->getData(['module', $this->getUrl(0), 'content']))
|
||||
: $this->getUrl(1);
|
||||
|
||||
// Images d'une galerie
|
||||
if($gallery) {
|
||||
// La galerie n'existe pas
|
||||
@ -780,7 +834,8 @@ class gallery extends common {
|
||||
'legendAlign' => $this->getinput('galleryThemeLegendAlign', helper::FILTER_STRING_SHORT),
|
||||
'legendTextColor' => $this->getinput('galleryThemeLegendTextColor', helper::FILTER_STRING_SHORT),
|
||||
'legendBgColor' => $this->getinput('galleryThemeLegendBgColor', helper::FILTER_STRING_SHORT),
|
||||
'style' => self::DATADIRECTORY . $this->getUrl(0) . '/theme.css'
|
||||
'showUniqueGallery' => $this->getinput('galleryThemeShowUniqueGallery', helper::FILTER_BOOLEAN),
|
||||
'style' => self::DATADIRECTORY . $this->getUrl(0) . '/theme.css',
|
||||
]]);
|
||||
// Création des fichiers CSS
|
||||
$content = file_get_contents('module/gallery/ressource/vartheme.css');
|
||||
@ -818,6 +873,41 @@ class gallery extends common {
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Option de configuration de la galerie
|
||||
*/
|
||||
public function option() {
|
||||
// Jeton incorrect
|
||||
if ($this->getUrl(2) !== $_SESSION['csrf']) {
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . $this->getUrl(0) . '/config',
|
||||
'notification' => 'Action non autorisée'
|
||||
]);
|
||||
}
|
||||
// Soumission du formulaire
|
||||
if($this->isPost()) {
|
||||
// Dossier de l'instance
|
||||
if (!is_dir(self::DATADIRECTORY . $this->getUrl(0) )) {
|
||||
mkdir (self::DATADIRECTORY . $this->getUrl(0), 0755, true);
|
||||
}
|
||||
$this->setData(['module', $this->getUrl(0), 'config', [
|
||||
'showUniqueGallery' => $this->getinput('galleryOptionShowUniqueGallery', helper::FILTER_BOOLEAN)
|
||||
]]);
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'redirect' => helper::baseUrl() . $this->getUrl() . '/option',
|
||||
'notification' => 'Modifications enregistrées',
|
||||
'state' => true
|
||||
]);
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => "Options",
|
||||
'view' => 'option'
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class galleriesHelper extends helper {
|
||||
|
19
module/gallery/view/add/add.css
Normal file
19
module/gallery/view/add/add.css
Normal file
@ -0,0 +1,19 @@
|
||||
/**
|
||||
* 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-2022, Frédéric Tempez
|
||||
* @license GNU General Public License, version 3
|
||||
* @link http://zwiicms.fr/
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
87
module/gallery/view/add/add.js.php
Normal file
87
module/gallery/view/add/add.js.php
Normal file
@ -0,0 +1,87 @@
|
||||
/**
|
||||
* 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-2022, Frédéric Tempez
|
||||
* @license GNU General Public License, version 3
|
||||
* @link http://zwiicms.fr/
|
||||
*/
|
||||
|
||||
$( document ).ready(function() {
|
||||
|
||||
|
||||
/**
|
||||
* Tri de la galerie avec drag and drop
|
||||
*/
|
||||
$("#galleryTable").tableDnD({
|
||||
onDrop: function(table, row) {
|
||||
$("#galleryAddFilterResponse").val($.tableDnD.serialize());
|
||||
},
|
||||
onDragStop : function(table, row) {
|
||||
// Affiche le bouton de tri après un déplacement
|
||||
//$(":input[type='submit']").prop('disabled', false);
|
||||
// Sauvegarde le tri
|
||||
sortGalleries();
|
||||
},
|
||||
// Supprime le tiret des séparateurs
|
||||
serializeRegexp: ""
|
||||
});
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Confirmation de suppression
|
||||
*/
|
||||
$(".galleryAddDelete").on("click", function() {
|
||||
var _this = $(this);
|
||||
return core.confirm("Êtes-vous sûr de vouloir supprimer cette galerie ?", function() {
|
||||
$(location).attr("href", _this.attr("href"));
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* Liste des dossiers
|
||||
*/
|
||||
var oldResult = [];
|
||||
var directoryDOM = $("#galleryAddDirectory");
|
||||
var directoryOldDOM = $("#galleryAddDirectoryOld");
|
||||
function dirs() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<?php echo helper::baseUrl() . $this->getUrl(0); ?>/dirs",
|
||||
success: function(result) {
|
||||
if($(result).not(oldResult).length !== 0 || $(oldResult).not(result).length !== 0) {
|
||||
directoryDOM.empty();
|
||||
for(var i = 0; i < result.length; i++) {
|
||||
directoryDOM.append(function(i) {
|
||||
var option = $("<option>").val(result[i]).text(result[i]);
|
||||
if(directoryOldDOM.val() === result[i]) {
|
||||
option.prop("selected", true);
|
||||
}
|
||||
return option;
|
||||
}(i))
|
||||
}
|
||||
oldResult = result;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
dirs();
|
||||
// Actualise la liste des dossiers toutes les trois secondes
|
||||
setInterval(function() {
|
||||
dirs();
|
||||
}, 3000);
|
||||
|
||||
/**
|
||||
* Stock le dossier choisi pour le re-sélectionner en cas d'actualisation ajax de la liste des dossiers
|
||||
*/
|
||||
directoryDOM.on("change", function() {
|
||||
directoryOldDOM.val($(this).val());
|
||||
});
|
68
module/gallery/view/add/add.php
Normal file
68
module/gallery/view/add/add.php
Normal file
@ -0,0 +1,68 @@
|
||||
<?php echo template::formOpen('galleryAddForm'); ?>
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::button('galleryAddBack', [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/config' ,
|
||||
'ico' => 'left',
|
||||
'value' => 'Retour'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2 offset8">
|
||||
<?php echo template::submit('galleryAddSubmit', [
|
||||
'ico' => 'plus',
|
||||
'value' => ' Ajouter',
|
||||
'class' => 'gallerySubmit'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Ajouter une galerie</h4>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::text('galleryAddName', [
|
||||
'label' => 'Nom'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col5">
|
||||
<?php echo template::hidden('galleryAddDirectoryOld', [
|
||||
'noDirty' => true // Désactivé à cause des modifications en ajax
|
||||
]); ?>
|
||||
<?php echo template::select('galleryAddDirectory', [], [
|
||||
'label' => 'Dossier cible',
|
||||
'noDirty' => true // Désactivé à cause des modifications en ajax
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col3">
|
||||
<?php echo template::select('galleryAddSort', $module::$sort, [
|
||||
'selected' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'sort']),
|
||||
'label' => 'Tri des images',
|
||||
'help' => 'Tri manuel : déplacez le images dans le tableau ci-dessous. L\'ordre est sauvegardé automatiquement.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col7 verticalAlignBottom">
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo template::checkbox('galleryAddFullscreen', true, 'Mode plein écran automatique' , [
|
||||
'checked' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'fullScreen']),
|
||||
'help' => 'A l\'ouverture de la galerie, la première image est affichée en plein écran.'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo template::checkbox('galleryAddShowPageContent', true, 'Afficher le contenu de la page dans les galeries' , [
|
||||
'checked' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'showPageContent']),
|
||||
'help' => 'Le contenu de la page est toujours affiché dans la liste des galeries. Quand une seule galerie est disponible, il est possible de l\'afficher directement, cette option est utile dans ce cas précis.'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo template::formClose(); ?>
|
@ -31,59 +31,6 @@ $( document ).ready(function() {
|
||||
// Supprime le tiret des séparateurs
|
||||
serializeRegexp: ""
|
||||
});
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Confirmation de suppression
|
||||
*/
|
||||
$(".galleryConfigDelete").on("click", function() {
|
||||
var _this = $(this);
|
||||
return core.confirm("Êtes-vous sûr de vouloir supprimer cette galerie ?", function() {
|
||||
$(location).attr("href", _this.attr("href"));
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* Liste des dossiers
|
||||
*/
|
||||
var oldResult = [];
|
||||
var directoryDOM = $("#galleryConfigDirectory");
|
||||
var directoryOldDOM = $("#galleryConfigDirectoryOld");
|
||||
function dirs() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<?php echo helper::baseUrl() . $this->getUrl(0); ?>/dirs",
|
||||
success: function(result) {
|
||||
if($(result).not(oldResult).length !== 0 || $(oldResult).not(result).length !== 0) {
|
||||
directoryDOM.empty();
|
||||
for(var i = 0; i < result.length; i++) {
|
||||
directoryDOM.append(function(i) {
|
||||
var option = $("<option>").val(result[i]).text(result[i]);
|
||||
if(directoryOldDOM.val() === result[i]) {
|
||||
option.prop("selected", true);
|
||||
}
|
||||
return option;
|
||||
}(i))
|
||||
}
|
||||
oldResult = result;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
dirs();
|
||||
// Actualise la liste des dossiers toutes les trois secondes
|
||||
setInterval(function() {
|
||||
dirs();
|
||||
}, 3000);
|
||||
|
||||
/**
|
||||
* Stock le dossier choisi pour le re-sélectionner en cas d'actualisation ajax de la liste des dossiers
|
||||
*/
|
||||
directoryDOM.on("change", function() {
|
||||
directoryOldDOM.val($(this).val());
|
||||
});
|
||||
|
||||
|
||||
|
@ -1,71 +1,34 @@
|
||||
<?php echo template::formOpen('galleryConfigForm'); ?>
|
||||
<div class="row">
|
||||
<div class="col1">
|
||||
<div class="col2">
|
||||
<?php echo template::button('galleryConfigBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . 'page/edit/' . $this->getUrl(0),
|
||||
'value' => template::ico('left')
|
||||
'ico' => 'left',
|
||||
'value' => 'Retour'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col1 offset10">
|
||||
<?php echo template::button('galleryConfigBack', [
|
||||
<div class="col1 offset7">
|
||||
<?php echo template::button('galleryConfigOption', [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/option/' . $_SESSION['csrf'],
|
||||
'value' => '',
|
||||
'ico' => 'sliders',
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col1">
|
||||
<?php echo template::button('galleryConfigTheme', [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/theme/' . $_SESSION['csrf'],
|
||||
'value' => template::ico('sliders'),
|
||||
'help' => 'Options de configuration'
|
||||
'value' => '',
|
||||
'ico' => 'brush',
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Ajouter une galerie</h4>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::text('galleryConfigName', [
|
||||
'label' => 'Nom'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col5">
|
||||
<?php echo template::hidden('galleryConfigDirectoryOld', [
|
||||
'noDirty' => true // Désactivé à cause des modifications en ajax
|
||||
]); ?>
|
||||
<?php echo template::select('galleryConfigDirectory', [], [
|
||||
'label' => 'Dossier cible',
|
||||
'noDirty' => true // Désactivé à cause des modifications en ajax
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col1 verticalAlignBottom">
|
||||
<?php echo template::submit('galleryConfigSubmit', [
|
||||
<div class="col1">
|
||||
<?php echo template::button('galleryAdd', [
|
||||
'ico' => '',
|
||||
'value' => template::ico('plus'),
|
||||
'class' => 'gallerySubmit'
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/add/',
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col3">
|
||||
<?php echo template::select('galleryConfigSort', $module::$sort, [
|
||||
'selected' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'sort']),
|
||||
'label' => 'Tri des images',
|
||||
'help' => 'Tri manuel : déplacez le images dans le tableau ci-dessous. L\'ordre est sauvegardé automatiquement.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4 verticalAlignBottom">
|
||||
<?php echo template::checkbox('galleryConfigFullscreen', true, 'Mode plein écran automatique' , [
|
||||
'checked' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'fullScreen']),
|
||||
'help' => 'A l\'ouverture de la galerie, la première image est affichée en plein écran.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4 verticalAlignBottom">
|
||||
<?php echo template::checkbox('galleryConfigShowPageContent', true, 'Contenu de la page dans la galerie' , [
|
||||
'checked' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'showPageContent']),
|
||||
'help' => 'Le contenu de la page est toujours affiché dans la liste des galeries. Quand une seule galerie est disponible, il est possible de l\'afficher directement, cette option est utile dans ce cas précis.'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo template::formClose(); ?>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
|
@ -2,7 +2,6 @@
|
||||
<div class="row">
|
||||
<div class="col1">
|
||||
<?php echo template::button('galleryEditBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/config',
|
||||
'value' => template::ico('left')
|
||||
]); ?>
|
||||
@ -41,19 +40,26 @@
|
||||
'help' => 'Tri manuel : déplacez le images dans le tableau ci-dessous. L\'ordre est sauvegardé automatiquement.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4 verticalAlignBottom">
|
||||
<div class="col7 verticalAlignBottom">
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo template::checkbox('galleryEditFullscreen', true, 'Mode plein écran automatique' , [
|
||||
'checked' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'fullScreen']),
|
||||
'help' => 'A l\'ouverture de la galerie, la première image est affichée en plein écran.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4 verticalAlignBottom">
|
||||
<?php echo template::checkbox('galleryEditShowPageContent', true, 'Contenu de la page dans la galerie' , [
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo template::checkbox('galleryEditShowPageContent', true, 'Afficher le contenu de la page dans les galeries' , [
|
||||
'checked' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'showPageContent']),
|
||||
'help' => 'Le contenu de la page est toujours affiché dans la liste des galeries. Quand une seule galerie est disponible, il est possible de l\'afficher directement, cette option est utile dans ce cas précis.'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php if($module::$pictures): ?>
|
||||
|
@ -19,10 +19,9 @@
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::button('galleryGalleryBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . $this->getUrl(0),
|
||||
'ico' => 'left',
|
||||
'value' => 'Retour'
|
||||
'value' => ''
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
39
module/gallery/view/option/option.php
Normal file
39
module/gallery/view/option/option.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php echo template::formOpen('galleryOptionForm'); ?>
|
||||
<div class="row">
|
||||
<div class="col2">
|
||||
<?php echo template::button('galleryOptionBack', [
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/config',
|
||||
'ico' => 'left',
|
||||
'value' => 'Retour'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2 offset8">
|
||||
<?php echo template::submit('galleryOptionSubmit'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Galerie unique</h4>
|
||||
<div class="row">
|
||||
<div class="col12 verticalAlignBottom">
|
||||
<?php echo template::checkbox('galleryOptionShowUniqueGallery', true, 'Masquer l\'index des galeries lorsque le module ne contient qu\'une galerie' , [
|
||||
'checked' => count($this->getData(['module', $this->getUrl(0), 'content'])) === 1
|
||||
? $this->getData(['module', $this->getUrl(0), 'theme', 'showUniqueGallery'])
|
||||
: false,
|
||||
'disabled' => count($this->getData(['module', $this->getUrl(0), 'content'])) > 1,
|
||||
'help' => 'Cette option est active lorsque le module ne contient qu\'une seule galerie, elle permet d\'éviter la page listant toutes les galeries et affiche directement la galerie'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo template::formClose(); ?>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="moduleVersion">Version n°
|
||||
<?php echo $module::VERSION; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
18
module/gallery/view/option/options.css
Normal file
18
module/gallery/view/option/options.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-2022, Frédéric Tempez
|
||||
* @license GNU General Public License, version 3
|
||||
* @link http://zwiicms.fr/
|
||||
*/
|
||||
|
||||
|
||||
/** NE PAS EFFACER
|
||||
* admin.css
|
||||
*/
|
@ -1,17 +1,33 @@
|
||||
<?php echo template::formOpen('galleryThemeForm'); ?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col1">
|
||||
<div class="col2">
|
||||
<?php echo template::button('galleryThemeBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . $this->getUrl(0) . '/config',
|
||||
'value' => template::ico('left')
|
||||
'ico' => 'left',
|
||||
'value' => 'Retour'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2 offset9">
|
||||
<div class="col2 offset8">
|
||||
<?php echo template::submit('galleryThemeBack'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Galerie unique</h4>
|
||||
<div class="row">
|
||||
<div class="col12 verticalAlignBottom">
|
||||
<?php echo template::checkbox('galleryThemeShowUniqueGallery', true, 'Masquer l\'index des galeries lorsque le module ne contient qu\'une galerie' , [
|
||||
'checked' => count($this->getData(['module', $this->getUrl(0), 'content'])) === 1
|
||||
? $this->getData(['module', $this->getUrl(0), 'theme', 'showUniqueGallery'])
|
||||
: false,
|
||||
'disabled' => count($this->getData(['module', $this->getUrl(0), 'content'])) > 1
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
@ -133,7 +149,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php echo template::formClose(); ?>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
|
Loading…
Reference in New Issue
Block a user