Page EDIT WIP
This commit is contained in:
parent
565788f81a
commit
9bcfca906b
@ -20,7 +20,9 @@ class page extends common {
|
||||
'add' => self::GROUP_MODERATOR,
|
||||
'delete' => self::GROUP_MODERATOR,
|
||||
'edit' => self::GROUP_MODERATOR,
|
||||
'duplicate' => self::GROUP_MODERATOR
|
||||
'duplicate' => self::GROUP_MODERATOR,
|
||||
'jsEditor' => self::GROUP_MODERATOR,
|
||||
'cssEditor' => self::GROUP_MODERATOR
|
||||
];
|
||||
public static $pagesNoParentId = [
|
||||
'' => 'Aucune'
|
||||
@ -535,4 +537,55 @@ class page extends common {
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Editeur de feuille de style
|
||||
*/
|
||||
public function cssEditor() {
|
||||
// Soumission du formulaire
|
||||
if($this->isPost()) {
|
||||
// Enregistre le CSS
|
||||
$this->setData(['page', $this->getUrl(2), 'css', $this->getInput('pageCssEditorContent') ]);
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'notification' => 'Modifications enregistrées',
|
||||
'redirect' => helper::baseUrl() . 'page/edit/' . $this->getUrl(2),
|
||||
'state' => true
|
||||
]);
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => 'Éditeur CSS',
|
||||
'vendor' => [
|
||||
'codemirror'
|
||||
],
|
||||
'view' => 'cssEditor'
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Editeur de feuille de style
|
||||
*/
|
||||
public function jsEditor() {
|
||||
// Soumission du formulaire
|
||||
if($this->isPost()) {
|
||||
// Enregistre le JS
|
||||
$this->setData(['page', $this->getUrl(2), 'js', $this->getInput('pageJsEditorContent') ]);
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'notification' => 'Modifications enregistrées',
|
||||
'redirect' => helper::baseUrl() . 'page/edit/' . $this->getUrl(2),
|
||||
'state' => true
|
||||
]);
|
||||
}
|
||||
// Valeurs en sortie
|
||||
$this->addOutput([
|
||||
'title' => 'Éditeur Js',
|
||||
'vendor' => [
|
||||
'codemirror'
|
||||
],
|
||||
'view' => 'jsEditor'
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
18
core/module/page/view/cssEditor/cssEditor.css
Normal file
18
core/module/page/view/cssEditor/cssEditor.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
|
||||
*/
|
22
core/module/page/view/cssEditor/cssEditor.php
Normal file
22
core/module/page/view/cssEditor/cssEditor.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php echo template::formOpen('pageCssEditorForm'); ?>
|
||||
<div class="row">
|
||||
<div class="col1">
|
||||
<?php echo template::button('pageCssEditorBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . 'page/edit/' . $this->getUrl(2),
|
||||
'value' => template::ico('left')
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2 offset9">
|
||||
<?php echo template::submit('pageCssEditorSubmit'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo template::textarea('pageCssEditorContent', [
|
||||
'value' => $this->getData(['page', $this->getUrl(2), 'css' ]),
|
||||
'class' => 'editor'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo template::formClose(); ?>
|
@ -16,3 +16,31 @@
|
||||
* admin.css
|
||||
*/
|
||||
|
||||
|
||||
/* Style the tab */
|
||||
.tab {
|
||||
margin-top: 1.8em;
|
||||
overflow: hidden;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.tab ~ .tabContent {
|
||||
margin-top: -10px;
|
||||
}
|
||||
|
||||
.buttonTab {
|
||||
display: inline-block;
|
||||
transition: 0.3s;
|
||||
border-radius: 10px 10px 0px 0px;
|
||||
width: 160px;
|
||||
margin: 0 1px;
|
||||
}
|
||||
|
||||
.buttonTab:hover {
|
||||
filter : brightness(140%);
|
||||
}
|
||||
|
||||
.activeButton {
|
||||
|
||||
filter : brightness(70%);
|
||||
}
|
||||
|
@ -53,6 +53,13 @@ function protectModule() {
|
||||
$( document ).ready(function() {
|
||||
|
||||
|
||||
/**
|
||||
* Position initiales des blocs
|
||||
*/
|
||||
$("#pageEditSetupContainer").hide();
|
||||
$("#pageEditPositionContainer").hide();
|
||||
$("#pageEditLayoutContainer").hide();
|
||||
|
||||
/*
|
||||
* Enleve le menu fixe en édition de page
|
||||
*/
|
||||
@ -64,11 +71,12 @@ $( document ).ready(function() {
|
||||
*/
|
||||
if($("#pageEditModuleId").val() === "") {
|
||||
$("#pageEditModuleConfig").addClass("disabled");
|
||||
$("#pageEditContentContainer").hide();
|
||||
/*$("#pageEditContentContainer").hide();*/
|
||||
|
||||
}
|
||||
else {
|
||||
$("#pageEditModuleConfig").removeClass("disabled");
|
||||
$("#pageEditContentContainer").hide();
|
||||
/*$("#pageEditContentContainer").hide();*/
|
||||
$("#pageEditBlock option[value='bar']").remove();
|
||||
}
|
||||
|
||||
@ -237,16 +245,65 @@ $( document ).ready(function() {
|
||||
/**
|
||||
* Liste des pages pour le menu accessoire
|
||||
*/
|
||||
if ($("#pageEditExtraPosition").val() == 1 ) {
|
||||
var positionDOM = $("#pageEditPosition");
|
||||
var positionInitial = <?php echo $this->getData(['page',$this->getUrl(2),"position"]); ?>;
|
||||
buildPagesList(true);
|
||||
$("#pageEditPosition").val(positionInitial);
|
||||
}
|
||||
if ($("#pageEditExtraPosition").val() == 1 ) {
|
||||
var positionDOM = $("#pageEditPosition");
|
||||
var positionInitial = <?php echo $this->getData(['page',$this->getUrl(2),"position"]); ?>;
|
||||
buildPagesList(true);
|
||||
$("#pageEditPosition").val(positionInitial);
|
||||
}
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
// Gestion des événements
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Sélection de la page de configuration à afficher
|
||||
*/
|
||||
$("#pageEditContentButton").on("click", function () {
|
||||
$("#pageEditContentContainer").show();
|
||||
$("#pageEditSetupContainer").hide();
|
||||
$("#pageEditPositionContainer").hide();
|
||||
$("#pageEditLayoutContainer").hide();
|
||||
$("#pageEditContentButton").addClass("activeButton");
|
||||
$("#pageEditSetupButton").removeClass("activeButton");
|
||||
$("#PageEditPositionButton").removeClass("activeButton");
|
||||
$("#pageEditLayoutButton").removeClass("activeButton");
|
||||
|
||||
});
|
||||
$("#pageEditSetupButton").on("click", function () {
|
||||
$("#pageEditContentContainer").hide();
|
||||
$("#pageEditSetupContainer").show();
|
||||
$("#pageEditPositionContainer").hide();
|
||||
$("#pageEditLayoutContainer").hide();
|
||||
$("#pageEditContentButton").removeClass("activeButton");
|
||||
$("#pageEditSetupButton").addClass("activeButton");
|
||||
$("#PageEditPositionButton").removeClass("activeButton");
|
||||
$("#pageEditLayoutButton").removeClass("activeButton");
|
||||
});
|
||||
$("#PageEditPositionButton").on("click", function () {
|
||||
$("#pageEditContentContainer").hide();
|
||||
$("#pageEditSetupContainer").hide();
|
||||
$("#pageEditPositionContainer").show();
|
||||
$("#pageEditLayoutContainer").hide();
|
||||
$("#pageEditContentButton").removeClass("activeButton");
|
||||
$("#pageEditSetupButton").removeClass("activeButton");
|
||||
$("#PageEditPositionButton").addClass("activeButton");
|
||||
$("#pageEditLayoutButton").removeClass("activeButton");
|
||||
});
|
||||
$("#pageEditLayoutButton").on("click", function () {
|
||||
$("#pageEditContentContainer").hide();
|
||||
$("#pageEditSetupContainer").hide();
|
||||
$("#pageEditPositionContainer").hide();
|
||||
$("#pageEditLayoutContainer").show();
|
||||
$("#pageEditContentButton").removeClass("activeButton");
|
||||
$("#pageEditSetupButton").removeClass("activeButton");
|
||||
$("#PageEditPositionButton").removeClass("activeButton");
|
||||
$("#pageEditLayoutButton").addClass("activeButton");
|
||||
});
|
||||
|
||||
/**
|
||||
* Cache le l'option "ne pas afficher les pages enfants dans le menu horizontal" lorsque la page est désactivée
|
||||
@ -286,12 +343,10 @@ var pageEditModuleIdDOM = $("#pageEditModuleId");
|
||||
pageEditModuleIdDOM.on("change", function() {
|
||||
if($(this).val() === "") {
|
||||
$("#pageEditModuleConfig").addClass("disabled");
|
||||
$("#pageEditContentContainer").slideDown();
|
||||
$("#pageEditBlock").append('<option value="bar">Barre latérale</option>');
|
||||
}
|
||||
else {
|
||||
$("#pageEditModuleConfig").removeClass("disabled");
|
||||
$("#pageEditContentContainer").slideUp();
|
||||
$("#pageEditBlock option[value='bar']").remove();
|
||||
}
|
||||
});
|
||||
|
@ -39,272 +39,332 @@
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block" id="info">
|
||||
<h4>Informations générales
|
||||
<span id="infoHelpButton" class="helpDisplayButton">
|
||||
<a href="https://doc.zwiicms.fr/informations-generales" target="_blank" title="Cliquer pour consulter l'aide en ligne">
|
||||
|
||||
<div class="tab">
|
||||
<?php echo template::button('pageEditContentButton', [
|
||||
'value' => 'Contenu',
|
||||
'class' => 'buttonTab'
|
||||
]); ?>
|
||||
<?php echo template::button('pageEditSetupButton', [
|
||||
'value' => 'Configuration',
|
||||
'class' => 'buttonTab'
|
||||
]); ?>
|
||||
|
||||
<?php echo template::button('PageEditPositionButton', [
|
||||
'value' => 'Emplacement',
|
||||
'class' => 'buttonTab'
|
||||
]); ?>
|
||||
<?php echo template::button('pageEditLayoutButton', [
|
||||
'value' => 'Mise en page',
|
||||
'class' => 'buttonTab'
|
||||
]); ?>
|
||||
</div>
|
||||
|
||||
<div id="pageEditContentContainer" class="tabContent">
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo template::textarea('pageEditContent', [
|
||||
'class' => 'editorWysiwyg',
|
||||
'value' => $this->getPage($this->getUrl(2), self::$i18n)
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Extensions</h4>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::hidden('pageEditModuleRedirect'); ?>
|
||||
<?php echo template::select('pageEditModuleId', $module::$moduleIds, [
|
||||
'help' => 'En cas de changement de module, les données du module précédent seront supprimées.',
|
||||
'label' => 'Module',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'moduleId'])
|
||||
]); ?>
|
||||
<?php echo template::hidden('pageEditModuleIdOld',['value' => $this->getData(['page', $this->getUrl(2), 'moduleId'])]); ?>
|
||||
<?php echo template::hidden('pageEditModuleIdOldText',[
|
||||
'value' => array_key_exists($this->getData(['page', $this->getUrl(2), 'moduleId']),$module::$moduleIds)? $module::$moduleIds[$this->getData(['page', $this->getUrl(2), 'moduleId'])] : ucfirst($this->getData(['page', $this->getUrl(2), 'moduleId']))
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col5">
|
||||
<?php echo template::select('configModulePosition', $module::$modulePosition,[
|
||||
'help' => 'En position libre ajoutez le module en plaçant [MODULE] à l\'endroit voulu dans votre page.',
|
||||
'label' => 'Position du module',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'modulePosition'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col1 verticalAlignBottom">
|
||||
<?php echo template::button('pageEditModuleConfig', [
|
||||
'disabled' => (bool) $this->getData(['page', $this->getUrl(2), 'moduleId']) === false,
|
||||
'uniqueSubmission' => true,
|
||||
'value' => template::ico('gear')
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Contenu avancé</h4>
|
||||
<div class="row">
|
||||
<div class="col3 offset2">
|
||||
<?php echo template::button('pageEditCssEditor', [
|
||||
'href' => helper::baseUrl() . 'page/cssEditor/' . $this->getUrl(2),
|
||||
'value' => 'Editeur CSS',
|
||||
'help' => 'Feuille de style spécifique à la page.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3 offset2">
|
||||
<?php echo template::button('pageEditJsEditor', [
|
||||
'href' => helper::baseUrl() . 'page/jsEditor/' . $this->getUrl(2),
|
||||
'value' => 'Editeur JS',
|
||||
'help' => 'Instructions JS ou jquery spécifiques à la page.'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="pageEditSetupContainer" class="tabContent">
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Identité
|
||||
<span id="infoHelpButton" class="helpDisplayButton">
|
||||
<a href="https://doc.zwiicms.fr/informations-generales" target="_blank" title="Cliquer pour consulter l'aide en ligne">
|
||||
<?php echo template::ico('help', 'left');?>
|
||||
</a>
|
||||
</span>
|
||||
</h4>
|
||||
<div class="row">
|
||||
<div class="col8">
|
||||
<?php echo template::text('pageEditTitle', [
|
||||
'label' => 'Titre',
|
||||
'value' => $this->getData(['page', $this->getUrl(2), 'title'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::text('pageEditShortTitle', [
|
||||
'label' => 'Titre court',
|
||||
'value' => $this->getData(['page', $this->getUrl(2), 'shortTitle']),
|
||||
'help' => 'Le titre court est affiché dans les menus. Il peut être identique au titre de la page.'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Permission et référencement
|
||||
<span id="seoHelpButton" class="helpDisplayButton">
|
||||
<a href="https://doc.zwiicms.fr/permission-et-referencement" target="_blank" title="Cliquer pour consulter l'aide en ligne">
|
||||
<?php echo template::ico('help', 'left');?>
|
||||
</a>
|
||||
</span>
|
||||
</h4>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::text('pageEditTitle', [
|
||||
'label' => 'Titre',
|
||||
'value' => $this->getData(['page', $this->getUrl(2), 'title'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2">
|
||||
<?php echo template::text('pageEditShortTitle', [
|
||||
'label' => 'Titre court',
|
||||
'value' => $this->getData(['page', $this->getUrl(2), 'shortTitle']),
|
||||
'help' => 'Le titre court est affiché dans les menus. Il peut être identique au titre de la page.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
</h4>
|
||||
<div class="blockContainer">
|
||||
<div class="row">
|
||||
<div class="col9">
|
||||
<?php echo template::hidden('pageEditModuleRedirect'); ?>
|
||||
<?php echo template::select('pageEditModuleId', $module::$moduleIds, [
|
||||
'help' => 'En cas de changement de module, les données du module précédent seront supprimées.',
|
||||
'label' => 'Module',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'moduleId'])
|
||||
]); ?>
|
||||
<?php echo template::hidden('pageEditModuleIdOld',['value' => $this->getData(['page', $this->getUrl(2), 'moduleId'])]); ?>
|
||||
<?php echo template::hidden('pageEditModuleIdOldText',[
|
||||
'value' => array_key_exists($this->getData(['page', $this->getUrl(2), 'moduleId']),$module::$moduleIds)? $module::$moduleIds[$this->getData(['page', $this->getUrl(2), 'moduleId'])] : ucfirst($this->getData(['page', $this->getUrl(2), 'moduleId']))
|
||||
<div class='col6'>
|
||||
<?php echo template::select('pageEditGroup', self::$groupPublics, [
|
||||
'label' => 'Groupe requis pour accéder à la page :',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'group'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col3 verticalAlignBottom">
|
||||
<?php echo template::button('pageEditModuleConfig', [
|
||||
'disabled' => (bool) $this->getData(['page', $this->getUrl(2), 'moduleId']) === false,
|
||||
'uniqueSubmission' => true,
|
||||
'value' => template::ico('gear')
|
||||
<div class='col12'>
|
||||
<?php echo template::text('pageEditMetaTitle', [
|
||||
'label' => 'Méta-titre',
|
||||
'value' => $this->getData(['page', $this->getUrl(2), 'metaTitle'])
|
||||
]); ?>
|
||||
<?php echo template::textarea('pageEditMetaDescription', [
|
||||
'label' => 'Méta-description',
|
||||
//'maxlength' => '500',
|
||||
'value' => $this->getData(['page', $this->getUrl(2), 'metaDescription'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<?php echo template::select('pageTypeMenu', $module::$typeMenu,[
|
||||
'label' => 'Aspect du lien',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'typeMenu'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::file('pageIconUrl', [
|
||||
'help' => 'Sélectionnez une image ou une icône de petite dimension',
|
||||
'label' => 'Icône',
|
||||
'value' => $this->getData(['page', $this->getUrl(2), 'iconUrl'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::select('configModulePosition', $module::$modulePosition,[
|
||||
'help' => 'En position libre ajoutez le module en plaçant [MODULE] à l\'endroit voulu dans votre page.',
|
||||
'label' => 'Position du module',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'modulePosition'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo template::textarea('pageEditContent', [
|
||||
'class' => 'editorWysiwyg',
|
||||
//'value' => file_get_contents(self::DATA_DIR . self::$i18n . '/content/' . $this->getData(['page', $this->getUrl(2), 'content']))
|
||||
'value' => $this->getPage($this->getUrl(2), self::$i18n)
|
||||
]); ?>
|
||||
|
||||
<div id="pageEditPositionContainer" class="tabContent">
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Emplacement dans le menu
|
||||
<span id="positionHelpButton" class="helpDisplayButton">
|
||||
<a href="https://doc.zwiicms.fr/emplacement-dans-le-menu" target="_blank" title="Cliquer pour consulter l'aide en ligne">
|
||||
<?php echo template::ico('help', 'left');?>
|
||||
</a>
|
||||
</span>
|
||||
</h4>
|
||||
<div class="blockContainer">
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<?php echo template::select('pageEditPosition', [], [
|
||||
'label' => 'Position',
|
||||
'help' => '\'Ne pas afficher\' crée une page orpheline non accessible par le biais des menus.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php if($this->getHierarchy($this->getUrl(2), false)): ?>
|
||||
<?php echo template::hidden('pageEditParentPageId', [
|
||||
'value' => $this->getData(['page', $this->getUrl(2), 'parentPageId'])
|
||||
]); ?>
|
||||
<?php else: ?>
|
||||
<?php echo template::select('pageEditParentPageId', $module::$pagesNoParentId, [
|
||||
'label' => 'Page parent',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'parentPageId'])
|
||||
]); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::select('pageEditExtraPosition', $module::$extraPosition, [
|
||||
'label' => 'Emplacement :',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'extraPosition']),
|
||||
'help' => 'Le petit accessoire est aligné à droite de la barre de menu, c\'est un emplacement réservé aux drapeaux et au bouton de connexion.'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('pageEditDisable', true, 'Désactivée', [
|
||||
'checked' => $this->getData(['page', $this->getUrl(2), 'disable']),
|
||||
'help' => 'Une page désactivée n\'est pas cliquable en mode déconnecté, les pages enfants sont visibles et accessibles. La page d\'accueil n\'est pas désactivable.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('pageEditTargetBlank', true, 'Nouvel onglet', [
|
||||
'checked' => $this->getData(['page', $this->getUrl(2), 'targetBlank'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('pageEditHideTitle', true, 'Titre masqué', [
|
||||
'checked' => $this->getData(['page', $this->getUrl(2), 'hideTitle'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('pageEditbreadCrumb', true, 'Fil d\'Ariane', [
|
||||
'checked' => $this->getData(['page', $this->getUrl(2), 'breadCrumb']),
|
||||
'help' => 'Affiche le nom de la page parente suivi du nom de la page, le titre ne doit pas être masqué.'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Options avancées
|
||||
<span id="advancedHelpButton" class="helpDisplayButton">
|
||||
<a href="https://doc.zwiicms.fr/options-d-emplacement-avancee" target="_blank" title="Cliquer pour consulter l'aide en ligne">
|
||||
<?php echo template::ico('help', 'left');?>
|
||||
</a>
|
||||
</span>
|
||||
</h4>
|
||||
<div class="blockContainer">
|
||||
<div class="row">
|
||||
<div class="col3">
|
||||
<?php echo template::select('pageTypeMenu', $module::$typeMenu,[
|
||||
'label' => 'Aspect du lien',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'typeMenu'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col9">
|
||||
<?php echo template::file('pageIconUrl', [
|
||||
'help' => 'Sélectionnez une image ou une icône de petite dimension',
|
||||
'label' => 'Icône',
|
||||
'value' => $this->getData(['page', $this->getUrl(2), 'iconUrl'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('pageEditHideMenuChildren', true, 'Masquer les pages enfants dans le menu horizontal', [
|
||||
'checked' => $this->getData(['page', $this->getUrl(2), 'hideMenuChildren'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('pageEditHideMenuSide', true, 'Masquer la page et les pages enfants dans le menu d\'une barre latérale' , [
|
||||
'checked' => $this->getData(['page', $this->getUrl(2), 'hideMenuSide']),
|
||||
'help' => 'La page est affichée dans un menu horizontal mais pas dans le menu vertical d\'une barre latérale.'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12" id="pageEditBlockLayout">
|
||||
<div class="block">
|
||||
<h4>Mise en page
|
||||
<span id="layoutHelpButton" class="helpDisplayButton">
|
||||
<a href="https://doc.zwiicms.fr/mise-en-page-2" target="_blank" title="Cliquer pour consulter l'aide en ligne">
|
||||
<?php echo template::ico('help', 'left');?>
|
||||
</a>
|
||||
</span>
|
||||
</h4>
|
||||
<div class="blockContainer">
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo template::select('pageEditBlock', $module::$pageBlocks, [
|
||||
'label' => 'Gabarits de page / Barre latérale',
|
||||
'help' => 'Pour définir la page comme barre latérale, choisissez l\'option dans la liste.',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2) , 'block'])
|
||||
]); ?>
|
||||
|
||||
<div id="pageEditLayoutContainer" class="tabContent">
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Mise en page
|
||||
<span id="layoutHelpButton" class="helpDisplayButton">
|
||||
<a href="https://doc.zwiicms.fr/mise-en-page-2" target="_blank" title="Cliquer pour consulter l'aide en ligne">
|
||||
<?php echo template::ico('help', 'left');?>
|
||||
</a>
|
||||
</span>
|
||||
</h4>
|
||||
<div class="blockContainer">
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo template::select('pageEditBlock', $module::$pageBlocks, [
|
||||
'label' => 'Gabarits de page / Barre latérale',
|
||||
'help' => 'Pour définir la page comme barre latérale, choisissez l\'option dans la liste.',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2) , 'block'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<!-- Sélection des barres latérales -->
|
||||
<?php if($this->getHierarchy($this->getUrl(2),false,true)): ?>
|
||||
<?php echo template::hidden('pageEditBarLeft', [
|
||||
'value' => $this->getData(['page', $this->getUrl(2), 'barLeft'])
|
||||
<div class="col6">
|
||||
<!-- Sélection des barres latérales -->
|
||||
<?php if($this->getHierarchy($this->getUrl(2),false,true)): ?>
|
||||
<?php echo template::hidden('pageEditBarLeft', [
|
||||
'value' => $this->getData(['page', $this->getUrl(2), 'barLeft'])
|
||||
]); ?>
|
||||
<?php else: ?>
|
||||
<?php echo template::select('pageEditBarLeft', $module::$pagesBarId, [
|
||||
'label' => 'Barre latérale gauche :',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'barLeft'])
|
||||
]); ?>
|
||||
<?php endif; ?>
|
||||
<?php if($this->getHierarchy($this->getUrl(2),false,true)): ?>
|
||||
<?php echo template::hidden('pageEditBarRight', [
|
||||
'value' => $this->getData(['page', $this->getUrl(2), 'barRight'])
|
||||
]); ?>
|
||||
<?php else: ?>
|
||||
<?php echo template::select('pageEditBarRight', $module::$pagesBarId, [
|
||||
'label' => 'Barre latérale droite :',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'barRight'])
|
||||
]); ?>
|
||||
<?php endif; ?>
|
||||
<?php echo template::select('pageEditDisplayMenu', $module::$displayMenu, [
|
||||
'label' => 'Contenu du menu vertical',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'displayMenu']),
|
||||
'help' => 'Par défaut le menu est affiché APRES le contenu de la page. Pour le positionner à un emplacement précis, insérez [MENU] dans le contenu de la page.'
|
||||
]); ?>
|
||||
<?php else: ?>
|
||||
<?php echo template::select('pageEditBarLeft', $module::$pagesBarId, [
|
||||
'label' => 'Barre latérale gauche :',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'barLeft'])
|
||||
]); ?>
|
||||
<?php endif; ?>
|
||||
<?php if($this->getHierarchy($this->getUrl(2),false,true)): ?>
|
||||
<?php echo template::hidden('pageEditBarRight', [
|
||||
'value' => $this->getData(['page', $this->getUrl(2), 'barRight'])
|
||||
]); ?>
|
||||
<?php else: ?>
|
||||
<?php echo template::select('pageEditBarRight', $module::$pagesBarId, [
|
||||
'label' => 'Barre latérale droite :',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'barRight'])
|
||||
]); ?>
|
||||
<?php endif; ?>
|
||||
<?php echo template::select('pageEditDisplayMenu', $module::$displayMenu, [
|
||||
'label' => 'Contenu du menu vertical',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'displayMenu']),
|
||||
'help' => 'Par défaut le menu est affiché APRES le contenu de la page. Pour le positionner à un emplacement précis, insérez [MENU] dans le contenu de la page.'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12" id="pageEditMenu">
|
||||
<div class="block">
|
||||
<h4>Emplacement dans le menu
|
||||
<span id="positionHelpButton" class="helpDisplayButton">
|
||||
<a href="https://doc.zwiicms.fr/emplacement-dans-le-menu" target="_blank" title="Cliquer pour consulter l'aide en ligne">
|
||||
<?php echo template::ico('help', 'left');?>
|
||||
</a>
|
||||
</span>
|
||||
</h4>
|
||||
<div class="blockContainer">
|
||||
<div class="row">
|
||||
<div class="col4">
|
||||
<?php echo template::select('pageEditPosition', [], [
|
||||
'label' => 'Position',
|
||||
'help' => '\'Ne pas afficher\' crée une page orpheline non accessible par le biais des menus.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php if($this->getHierarchy($this->getUrl(2), false)): ?>
|
||||
<?php echo template::hidden('pageEditParentPageId', [
|
||||
'value' => $this->getData(['page', $this->getUrl(2), 'parentPageId'])
|
||||
]); ?>
|
||||
<?php else: ?>
|
||||
<?php echo template::select('pageEditParentPageId', $module::$pagesNoParentId, [
|
||||
'label' => 'Page parent',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'parentPageId'])
|
||||
]); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="col4">
|
||||
<?php echo template::select('pageEditExtraPosition', $module::$extraPosition, [
|
||||
'label' => 'Emplacement :',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'extraPosition']),
|
||||
'help' => 'Le petit accessoire est aligné à droite de la barre de menu, c\'est un emplacement réservé aux drapeaux et au bouton de connexion.'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('pageEditDisable', true, 'Désactivée', [
|
||||
'checked' => $this->getData(['page', $this->getUrl(2), 'disable']),
|
||||
'help' => 'Une page désactivée n\'est pas cliquable en mode déconnecté, les pages enfants sont visibles et accessibles. La page d\'accueil n\'est pas désactivable.'
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('pageEditTargetBlank', true, 'Nouvel onglet', [
|
||||
'checked' => $this->getData(['page', $this->getUrl(2), 'targetBlank'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('pageEditHideTitle', true, 'Titre masqué', [
|
||||
'checked' => $this->getData(['page', $this->getUrl(2), 'hideTitle'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('pageEditbreadCrumb', true, 'Fil d\'Ariane', [
|
||||
'checked' => $this->getData(['page', $this->getUrl(2), 'breadCrumb']),
|
||||
'help' => 'Affiche le nom de la page parente suivi du nom de la page, le titre ne doit pas être masqué.'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row' id="pageEditAdvancedWrapper">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Options d'emplacement avancées
|
||||
<span id="advancedHelpButton" class="helpDisplayButton">
|
||||
<a href="https://doc.zwiicms.fr/options-d-emplacement-avancee" target="_blank" title="Cliquer pour consulter l'aide en ligne">
|
||||
<?php echo template::ico('help', 'left');?>
|
||||
</a>
|
||||
</span>
|
||||
</h4>
|
||||
<div class="blockContainer">
|
||||
<div class="row">
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('pageEditHideMenuChildren', true, 'Masquer les pages enfants dans le menu horizontal', [
|
||||
'checked' => $this->getData(['page', $this->getUrl(2), 'hideMenuChildren'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col6">
|
||||
<?php echo template::checkbox('pageEditHideMenuSide', true, 'Masquer la page et les pages enfants dans le menu d\'une barre latérale' , [
|
||||
'checked' => $this->getData(['page', $this->getUrl(2), 'hideMenuSide']),
|
||||
'help' => 'La page est affichée dans un menu horizontal mais pas dans le menu vertical d\'une barre latérale.'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row' id="pageEditSeoWrapper">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Permission et référencement
|
||||
<span id="seoHelpButton" class="helpDisplayButton">
|
||||
<a href="https://doc.zwiicms.fr/permission-et-referencement" target="_blank" title="Cliquer pour consulter l'aide en ligne">
|
||||
<?php echo template::ico('help', 'left');?>
|
||||
</a>
|
||||
</span>
|
||||
</h4>
|
||||
<div class="blockContainer">
|
||||
<div class="row">
|
||||
<div class='col6'>
|
||||
<?php echo template::select('pageEditGroup', self::$groupPublics, [
|
||||
'label' => 'Groupe requis pour accéder à la page :',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'group'])
|
||||
]); ?>
|
||||
</div>
|
||||
<div class='col12'>
|
||||
<?php echo template::text('pageEditMetaTitle', [
|
||||
'label' => 'Méta-titre',
|
||||
'value' => $this->getData(['page', $this->getUrl(2), 'metaTitle'])
|
||||
]); ?>
|
||||
<?php echo template::textarea('pageEditMetaDescription', [
|
||||
'label' => 'Méta-description',
|
||||
//'maxlength' => '500',
|
||||
'value' => $this->getData(['page', $this->getUrl(2), 'metaDescription'])
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php echo template::formClose(); ?>
|
||||
|
18
core/module/page/view/jsEditor/jsEditor.css
Normal file
18
core/module/page/view/jsEditor/jsEditor.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
|
||||
*/
|
22
core/module/page/view/jsEditor/jsEditor.php
Normal file
22
core/module/page/view/jsEditor/jsEditor.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php echo template::formOpen('pageJsEditorForm'); ?>
|
||||
<div class="row">
|
||||
<div class="col1">
|
||||
<?php echo template::button('pageJsEditorBack', [
|
||||
'class' => 'buttonGrey',
|
||||
'href' => helper::baseUrl() . 'page/edit/' . $this->getUrl(2),
|
||||
'value' => template::ico('left')
|
||||
]); ?>
|
||||
</div>
|
||||
<div class="col2 offset9">
|
||||
<?php echo template::submit('pageJsEditorSubmit'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<?php echo template::textarea('pageJsEditorContent', [
|
||||
'value' => empty($this->getData(['page', $this->getUrl(2), 'js' ])) ? '<script></script>': $this->getData(['page', $this->getUrl(2), 'js' ]),
|
||||
'class' => 'editor'
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo template::formClose(); ?>
|
Loading…
Reference in New Issue
Block a user