layout -> option

This commit is contained in:
fredtempez 2022-01-20 09:53:40 +01:00
parent 7c687e75c2
commit 524ea94bbc
4 changed files with 20 additions and 20 deletions

View File

@ -32,7 +32,7 @@ class blog extends common {
'commentDelete' => self::GROUP_MODERATOR,
'commentDeleteAll' => self::GROUP_MODERATOR,
'config' => self::GROUP_MODERATOR,
'layout' => self::GROUP_MODERATOR,
'option' => self::GROUP_MODERATOR,
'delete' => self::GROUP_MODERATOR,
'edit' => self::GROUP_MODERATOR,
'index' => self::GROUP_VISITOR,
@ -482,20 +482,20 @@ class blog extends common {
]);
}
public function layout() {
public function option() {
// Mise à jour des données de module
$this->update();
// Soumission du formulaire
if($this->isPost()) {
$this->setData(['module', $this->getUrl(0), 'config',[
'feeds' => $this->getInput('blogLayoutShowFeeds',helper::FILTER_BOOLEAN),
'feedsLabel' => $this->getInput('blogLayoutFeedslabel',helper::FILTER_STRING_SHORT),
'itemsperPage' => $this->getInput('blogLayoutItemsperPage', helper::FILTER_INT,true),
'feeds' => $this->getInput('blogOptionShowFeeds',helper::FILTER_BOOLEAN),
'feedsLabel' => $this->getInput('blogOptionFeedslabel',helper::FILTER_STRING_SHORT),
'itemsperPage' => $this->getInput('blogOptionItemsperPage', helper::FILTER_INT,true),
'versionData' => $this->getData(['module', $this->getUrl(0), 'config', 'versionData'])
]]);
// Valeurs en sortie
$this->addOutput([
'redirect' => helper::baseUrl() . $this->getUrl(0) . '/layout',
'redirect' => helper::baseUrl() . $this->getUrl(0) . '/option',
'notification' => 'Modifications enregistrées',
'state' => true
]);
@ -503,7 +503,7 @@ class blog extends common {
// Valeurs en sortie
$this->addOutput([
'title' => 'Mise en page',
'view' => 'layout'
'view' => 'option'
]);
}
}

View File

@ -8,18 +8,18 @@
'value' => 'Retour'
]); ?>
</div>
<div class="col2 offset6">
<div class="col1 offset8">
<?php echo template::button('blogConfigAdd', [
'href' => helper::baseUrl() . $this->getUrl(0) . '/add',
'ico' => 'plus',
'value' => 'Article'
'value' => ''
]); ?>
</div>
<div class="col2">
<?php echo template::button('blogConfigLayout', [
'href' => helper::baseUrl() . $this->getUrl(0) . '/layout',
'ico' => 'brush',
'value' => 'Mise en page'
<div class="col1">
<?php echo template::button('blogConfigOption', [
'href' => helper::baseUrl() . $this->getUrl(0) . '/option',
'ico' => 'cogs',
'value' => ''
]); ?>
</div>
</div>

View File

@ -1,7 +1,7 @@
<?php echo template::formOpen('blogLayout'); ?>
<?php echo template::formOpen('blogOption'); ?>
<div class="row">
<div class="col2">
<?php echo template::button('blogLayoutBack', [
<?php echo template::button('blogOptionBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . $this->getUrl(0) . '/config',
'ico' => 'left',
@ -9,7 +9,7 @@
]); ?>
</div>
<div class="col2 offset8">
<?php echo template::submit('blogLayoutSubmit'); ?>
<?php echo template::submit('blogOptionSubmit'); ?>
</div>
</div>
<div class="row">
@ -18,12 +18,12 @@
<h4>Paramètres du module</h4>
<div class="row">
<div class="col6">
<?php echo template::checkbox('blogLayoutShowFeeds', true, 'Lien du flux RSS', [
<?php echo template::checkbox('blogOptionShowFeeds', true, 'Lien du flux RSS', [
'checked' => $this->getData(['module', $this->getUrl(0), 'config', 'feeds']),
]); ?>
</div>
<div class="col6">
<?php echo template::text('blogLayoutFeedslabel', [
<?php echo template::text('blogOptionFeedslabel', [
'label' => 'Texte de l\'étiquette',
'value' => $this->getData(['module', $this->getUrl(0), 'config', 'feedsLabel'])
]); ?>
@ -31,7 +31,7 @@
</div>
<div class="row">
<div class="col6 offset6">
<?php echo template::select('blogLayoutItemsperPage', $module::$ItemsList, [
<?php echo template::select('blogOptionItemsperPage', $module::$ItemsList, [
'label' => 'Articles par page',
'selected' => $this->getData(['module', $this->getUrl(0),'config', 'itemsperPage'])
]); ?>