ZwiiCMS/core/module/page/view/edit/edit.php

223 lines
8.4 KiB
PHP
Raw Normal View History

2019-05-02 13:21:48 +02:00
<?php
// Mise à jour de la liste des pages pour TinyMCE
$this->pages2Json();
2019-05-28 09:12:34 +02:00
echo template::formOpen('pageEditForm'); ?>
2018-04-02 08:29:19 +02:00
<div class="row">
2018-11-13 18:33:22 +01:00
<div class="col2">
<?php $href = helper::baseUrl() . $this->getUrl(2); ?>
2019-01-26 19:41:46 +01:00
<?php if ($this->getData(['page', $this->getUrl(2), 'moduleId']) === 'redirection' || 'code')$href = helper::baseUrl(); ?>
2018-04-02 08:29:19 +02:00
<?php echo template::button('pageEditBack', [
'class' => 'buttonGrey',
2018-11-13 18:33:22 +01:00
'href' => $href,
2018-04-02 08:29:19 +02:00
'ico' => 'left',
'value' => 'Retour'
]); ?>
</div>
<div class="col2 offset6">
<?php echo template::button('pageEditDelete', [
'class' => 'buttonRed',
2019-01-04 23:27:35 +01:00
'href' => helper::baseUrl() . 'page/delete/' . $this->getUrl(2) . '&csrf=' . $_SESSION['csrf'],
2018-04-02 08:29:19 +02:00
'value' => 'Supprimer',
'ico' => 'cancel'
]); ?>
</div>
<div class="col2">
<?php echo template::submit('pageEditSubmit'); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Informations générales</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="col6">
<div class="row">
<div class="col10">
<?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'])
]); ?>
</div>
<div class="col2 verticalAlignBottom">
<?php echo template::button('pageEditModuleConfig', [
'disabled' => (bool) $this->getData(['page', $this->getUrl(2), 'moduleId']) === false,
2019-04-13 22:25:10 +02:00
'uniqueSubmission' => true,
2018-04-02 08:29:19 +02:00
'value' => template::ico('gear')
]); ?>
</div>
</div>
</div>
</div>
<div class="row">
2019-04-13 22:25:10 +02:00
<div class="col6">
<?php echo template::select('pageTypeMenu', $module::$typeMenu,[
2019-05-02 13:21:48 +02:00
'help' => 'Choisissez une icône ou une image de petite taille.',
'label' => 'Aspect du menu',
2019-04-13 22:25:10 +02:00
'selected' => $this->getData(['page', $this->getUrl(2), 'typeMenu'])
]); ?>
</div>
<div class="col6">
<?php echo template::select('configModulePosition', $module::$modulePosition,[
2019-05-02 13:21:48 +02:00
'help' => 'En position libre ajoutez le module en plaçant deux crochets [] à l\'endroit voulu dans votre page.',
'label' => 'Position du module dans la page',
'selected' => $this->getData(['page', $this->getUrl(2), 'modulePosition'])
]); ?>
</div>
</div>
2018-04-02 08:29:19 +02:00
<div class="row">
2019-05-02 13:21:48 +02:00
> <div class="col6">
2018-04-02 08:29:19 +02:00
<?php echo template::file('pageIconUrl', [
2019-02-19 23:52:09 +01:00
'label' => 'Icône du menu',
2018-04-02 08:29:19 +02:00
'value' => $this->getData(['page', $this->getUrl(2), 'iconUrl'])
]); ?>
2019-04-13 22:25:10 +02:00
</div>
</div>
2018-04-02 08:29:19 +02:00
</div>
</div>
</div>
<?php echo template::textarea('pageEditContent', [
'class' => 'editorWysiwyg',
'value' => $this->getData(['page', $this->getUrl(2), 'content'])
]); ?>
<div class="row">
<div class="col6" id="pageEditMenu">
2019-01-21 14:09:35 +01:00
<div class="block">
2019-05-15 22:50:18 +02:00
<h4>Emplacement</h4>
<?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; ?>
<?php echo template::select('pageEditPosition', [], [
'label' => 'Position',
'help' => '\'Ne pas afficher\' crée une page orpheline non accessible par le biais des menus.'
]); ?>
<div class="row">
<div class="col6">
<?php echo template::checkbox('pageEditTargetBlank', true, 'Nouvel onglet', [
'checked' => $this->getData(['page', $this->getUrl(2), 'targetBlank'])
]); ?>
</div>
<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 figure dans le menu sans être cliquable, ex : une page parente sans contenu.'
]); ?>
</div>
</div>
</div>
</div>
<div class="col6" id="pageEditBlockLayout">
<div class="block" >
2019-01-21 14:09:35 +01:00
<h4>Mise en page</h4>
<?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'])
2019-01-14 20:54:55 +01:00
]); ?>
<!-- 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; ?>
2019-05-02 13:21:48 +02:00
<div class="row">
<div class="col12">
<?php echo template::select('pageEditDisplayMenu', $module::$displayMenu, [
'label' => 'Configuration du menu vertical',
2019-05-03 22:07:01 +02:00
'selected' => $this->getData(['page', $this->getUrl(2), 'displayMenu']),
2019-05-08 20:03:14 +02:00
'help' => 'Par défaut le menu est affiché APRES le contenu de la page. Pour le positionner à un emplacement précis, insérez deux crochets [] dans le contenu de la page.'
2019-05-02 13:21:48 +02:00
]); ?>
</div>
</div>
<div class="row">
<div class="col6">
2019-06-01 13:07:38 +02:00
<?php echo template::checkbox('pageEditHideTitle', true, 'Titre masqué', [
'checked' => $this->getData(['page', $this->getUrl(2), 'hideTitle'])
]); ?>
</div>
2019-05-02 13:21:48 +02:00
<div class="col6">
<?php echo template::checkbox('pageEditbreadCrumb', true, 'Fil d\'Ariane', [
'checked' => $this->getData(['page', $this->getUrl(2), 'breadCrumb'])
]); ?>
</div>
2019-05-02 13:21:48 +02:00
</div>
</div>
2018-04-02 08:29:19 +02:00
</div>
2019-05-02 13:21:48 +02:00
</div>
<div class="row">
<div class="col12" id="pageEditMenuSpecial">
<div class="block">
2019-05-27 19:45:00 +02:00
<h4>Options d'emplacement avancées</h4>
2019-05-02 13:21:48 +02:00
<div class="row">
<div class="col12">
<?php echo template::checkbox('pageEditHideMenuChildren', true, 'Ne pas afficher les sous-pages dans le menu horizontal', [
2019-05-02 13:21:48 +02:00
'checked' => $this->getData(['page', $this->getUrl(2), 'hideMenuChildren']),
2019-05-15 22:50:18 +02:00
'help' => 'Afficher uniquement les pages enfants dans le \'sous-menu de page parente\' d\'une barre latérale.'
2019-05-02 13:21:48 +02:00
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<?php echo template::checkbox('pageEditHideMenuSide', true, 'Ne pas afficher dans les menus verticaux', [
'checked' => $this->getData(['page', $this->getUrl(2), 'hideMenuSide'])
2019-05-02 13:21:48 +02:00
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class='row'>
2019-05-09 21:23:31 +02:00
<div class="col12">
<div class="block">
<h4>Autres options</h4>
<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',
2019-05-31 12:41:28 +02:00
//'maxlength' => '500',
2019-05-09 21:23:31 +02:00
'value' => $this->getData(['page', $this->getUrl(2), 'metaDescription'])
]); ?>
</div>
</div>
2018-04-02 08:29:19 +02:00
</div>
</div>
2019-05-02 13:21:48 +02:00
<?php echo template::formClose(); ?>