forked from ZwiiCMS-Team/ZwiiCMS
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();
|
||||
}
|
||||
|
||||
@ -244,9 +252,58 @@ $( document ).ready(function() {
|
||||
$("#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,33 +39,42 @@
|
||||
]); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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">
|
||||
<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">
|
||||
<?php echo template::ico('help', 'left');?>
|
||||
</a>
|
||||
</span>
|
||||
</h4>
|
||||
<?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::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">
|
||||
<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.',
|
||||
@ -77,7 +86,14 @@
|
||||
'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="col3 verticalAlignBottom">
|
||||
<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,
|
||||
@ -87,25 +103,55 @@
|
||||
</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 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::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'])
|
||||
<?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>
|
||||
@ -114,71 +160,43 @@
|
||||
</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>
|
||||
</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">
|
||||
<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">
|
||||
<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>
|
||||
|
||||
<div id="pageEditPositionContainer" class="tabContent">
|
||||
<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 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.'
|
||||
]); ?>
|
||||
</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">
|
||||
@ -245,10 +263,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row' id="pageEditAdvancedWrapper">
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
<div class="block">
|
||||
<h4>Options d'emplacement avancées
|
||||
<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');?>
|
||||
@ -256,6 +274,21 @@
|
||||
</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', [
|
||||
@ -273,33 +306,58 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row' id="pageEditSeoWrapper">
|
||||
</div>
|
||||
|
||||
<div id="pageEditLayoutContainer" class="tabContent">
|
||||
<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">
|
||||
<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'>
|
||||
<?php echo template::select('pageEditGroup', self::$groupPublics, [
|
||||
'label' => 'Groupe requis pour accéder à la page :',
|
||||
'selected' => $this->getData(['page', $this->getUrl(2), 'group'])
|
||||
<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 class='col12'>
|
||||
<?php echo template::text('pageEditMetaTitle', [
|
||||
'label' => 'Méta-titre',
|
||||
'value' => $this->getData(['page', $this->getUrl(2), 'metaTitle'])
|
||||
</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'])
|
||||
]); ?>
|
||||
<?php echo template::textarea('pageEditMetaDescription', [
|
||||
'label' => 'Méta-description',
|
||||
//'maxlength' => '500',
|
||||
'value' => $this->getData(['page', $this->getUrl(2), 'metaDescription'])
|
||||
<?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>
|
||||
@ -307,4 +365,6 @@
|
||||
</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