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

View File

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

View File

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