[9.2.00.dev] beautify and correct code

This commit is contained in:
fredtempez 2019-06-27 21:10:50 +02:00
parent c9461c6857
commit 72c65e8cf2
3 changed files with 282 additions and 281 deletions

View File

@ -1,202 +1,201 @@
<?php echo template::formOpen('themeFooterForm'); ?>
<div class="row">
<div class="col2">
<?php echo template::button('themeFooterBack', [
<div class="row">
<div class="col2">
<?php echo template::button('themeFooterBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'theme',
'ico' => 'left',
'value' => 'Retour'
]); ?>
</div>
<div class="col2 offset8">
<?php echo template::submit('themeFooterSubmit'); ?>
</div>
</div>
<div class="row">
<div class="col6">
<div class="block">
<h4>Couleurs</h4>
<div class="row">
<div class="col6">
<?php echo template::text('themeFooterBackgroundColor', [
</div>
<div class="col2 offset8">
<?php echo template::submit('themeFooterSubmit'); ?>
</div>
</div>
<div class="row">
<div class="col6">
<div class="block">
<h4>Couleurs</h4>
<div class="row">
<div class="col6">
<?php echo template::text('themeFooterBackgroundColor', [
'class' => 'colorPicker',
'label' => 'Fond',
'value' => $this->getData(['theme', 'footer', 'backgroundColor'])
]); ?>
</div>
<div class="col6">
<?php echo template::text('themeFooterTextColor', [
</div>
<div class="col6">
<?php echo template::text('themeFooterTextColor', [
'class' => 'colorPicker',
'label' => 'Texte',
'value' => $this->getData(['theme', 'footer', 'textColor'])
]); ?>
</div>
</div>
</div>
</div>
<div class="col6">
<div class="block">
<h4>Contenu Copyright</h4>
<div class="row">
<div class="col6">
<div class="row">
<?php echo template::checkbox('themefooterDisplayCopyright', true, 'Mention "Motorisé par"', [
</div>
</div>
</div>
</div>
<div class="col6">
<div class="block">
<h4>Contenu Copyright</h4>
<div class="row">
<div class="col6">
<div class="row">
<?php echo template::checkbox('themefooterDisplayCopyright', true, 'Mention "Motorisé par"', [
'checked' => $this->getData(['theme', 'footer','displayCopyright'])
]); ?>
</div>
<div class="row">
<?php echo template::checkbox('themefooterDisplayVersion', true, 'Numéro de version', [
</div>
<div class="row">
<?php echo template::checkbox('themefooterDisplayVersion', true, 'Numéro de version', [
'checked' => $this->getData(['theme', 'footer','displayVersion'])
]); ?>
</div>
</div>
<div class="col6">
<div class="row">
<?php echo template::checkbox('themefooterDisplaySiteMap', true, 'Plan du site', [
</div>
<div class="col6">
<div class="row">
<?php echo template::checkbox('themefooterDisplaySiteMap', true, 'Plan du site', [
'checked' => $this->getData(['theme', 'footer', 'displaySiteMap']),
'help' => 'Un plan du site permet un meilleur référencement.'
]); ?>
</div>
<div class="row">
<?php echo template::checkbox('themeFooterLoginLink', true, 'Lien de connexion', [
</div>
<div class="row">
<?php echo template::checkbox('themeFooterLoginLink', true, 'Lien de connexion', [
'checked' => $this->getData(['theme', 'footer', 'loginLink'])
]); ?>
</div>
</div>
<div class="col12">
<div class="row">
<?php
</div>
<div class="col12">
<div class="row">
<?php
echo template::checkbox('themeFooterDisplayLegal', true, 'Mentions légales', [
'checked' => $this->getData(['config', 'legalPageId']) === '' ? false : $this->getData(['theme', 'footer', 'displayLegal']),
]); ?>
</div>
<div class="col12">
<em>Le paramétrage des mentions légales s'effectue dans la configuration du site.</em>
</div>
</div>
<div class="col12">
<em>Le paramétrage des mentions légales s'effectue dans la configuration du site.</em>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Contenu personnalisé</h4>
<?php echo template::textarea('themeFooterText', [
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Contenu personnalisé</h4>
<?php echo template::textarea('themeFooterText', [
'label' => '<strong>Texte ou HTML personnalisé :</strong>',
'value' => $this->getData(['theme', 'footer', 'text']),
'class' => 'editorWysiwyg'
]); ?>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Mise en forme du texte</h4>
<div class="row">
<div class="col3">
<?php echo template::select('themeFooterFont', $module::$fonts, [
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Mise en forme du texte</h4>
<div class="row">
<div class="col3">
<?php echo template::select('themeFooterFont', $module::$fonts, [
'label' => 'Police',
'selected' => $this->getData(['theme', 'footer', 'font'])
]); ?>
</div>
<div class="col3">
<?php echo template::select('themeFooterFontSize', $module::$footerFontSizes, [
</div>
<div class="col3">
<?php echo template::select('themeFooterFontSize', $module::$footerFontSizes, [
'label' => 'Taille',
'help' => 'Proportionnelle à celle définie dans le site.',
'selected' => $this->getData(['theme', 'footer', 'fontSize'])
]); ?>
</div>
<div class="col3">
<?php echo template::select('themeFooterFontWeight', $module::$fontWeights, [
</div>
<div class="col3">
<?php echo template::select('themeFooterFontWeight', $module::$fontWeights, [
'label' => 'Style',
'selected' => $this->getData(['theme', 'footer', 'fontWeight'])
]); ?>
</div>
<div class="col3">
<?php echo template::select('themeFooterTextTransform', $module::$textTransforms, [
</div>
<div class="col3">
<?php echo template::select('themeFooterTextTransform', $module::$textTransforms, [
'label' => 'Casse',
'selected' => $this->getData(['theme', 'footer', 'textTransform'])
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Configuration</h4>
<div class="row">
<div class="col4">
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Configuration</h4>
<div class="row">
<div class="col4">
<?php $footerBlockPosition = $module::$footerblocks [$this->getData(['theme', 'footer', 'template'])]; ?>
<?php echo template::select('themeFooterTemplate', $module::$footerTemplate, [
'label' => 'Gabarits de mise en page',
'selected' => $this->getData(['theme', 'footer', 'template'])
]); ?>
</div>
<div class="col4">
<?php echo template::select('themeFooterPosition', $module::$footerPositions, [
</div>
<div class="col4">
<?php echo template::select('themeFooterPosition', $module::$footerPositions, [
'label' => 'Position',
'selected' => $this->getData(['theme', 'footer', 'position'])
]); ?>
</div>
<div class="col4">
<?php echo template::select('themeFooterHeight', $module::$footerHeights, [
</div>
<div class="col4">
<?php echo template::select('themeFooterHeight', $module::$footerHeights, [
'label' => 'Marges verticales',
'selected' => $this->getData(['theme', 'footer', 'height']),
'help' => 'La hauteur du pied de page est dynmamique selon le contenu.Ces marges sont ajoutées au-dessus et en-dessous.'
]); ?>
</div>
</div>
<div class="row">
<div class="col4">
<p><strong>Contenu personnalisé</strong></p>
<?php echo template::select('themeFooterTextPosition', $footerBlockPosition, [
</div>
<div class="row">
<div class="col4">
<p><strong>Contenu personnalisé</strong></p>
<?php echo template::select('themeFooterTextPosition', $footerBlockPosition, [
'label' => 'Emplacement',
'selected' => $this->getData(['theme', 'footer', 'textPosition']),
'class' => 'themeFooterContent'
]); ?>
<?php echo template::select('themeFooterTextAlign', $module::$aligns, [
<?php echo template::select('themeFooterTextAlign', $module::$aligns, [
'label' => 'Alignement',
'selected' => $this->getData(['theme', 'footer', 'textAlign'])
]); ?>
</div>
<div class="col4">
<p><strong>Réseaux sociaux</strong></p>
<?php echo template::select('themeFooterSocialsPosition', $footerBlockPosition, [
</div>
<div class="col4">
<p><strong>Réseaux sociaux</strong></p>
<?php echo template::select('themeFooterSocialsPosition', $footerBlockPosition, [
'label' => 'Emplacement',
'selected' => $this->getData(['theme', 'footer', 'socialsPosition']),
'class' => 'themeFooterContent'
]); ?>
<?php echo template::select('themeFooterSocialsAlign', $module::$aligns, [
<?php echo template::select('themeFooterSocialsAlign', $module::$aligns, [
'label' => 'Alignement',
'selected' => $this->getData(['theme', 'footer', 'socialsAlign'])
]); ?>
</div>
<div class="col4">
<p><strong>Info et copyright</strong></p>
<?php echo template::select('themeFooterCopyrightPosition', $footerBlockPosition, [
</div>
<div class="col4">
<p><strong>Info et copyright</strong></p>
<?php echo template::select('themeFooterCopyrightPosition', $footerBlockPosition, [
'label' => 'Emplacement',
'selected' => $this->getData(['theme', 'footer', 'copyrightPosition']),
'class' => 'themeFooterContent'
]); ?>
<?php echo template::select('themeFooterCopyrightAlign', $module::$aligns, [
<?php echo template::select('themeFooterCopyrightAlign', $module::$aligns, [
'label' => 'Alignement',
'selected' => $this->getData(['theme', 'footer', 'copyrightAlign'])
]); ?>
</div>
<div class="col6">
<div id="themeFooterPositionOptions" class="displayNone">
<?php echo template::checkbox('themeFooterMargin', true, 'Aligner le bas de page avec le contenu', [
</div>
<div class="col6">
<div id="themeFooterPositionOptions" class="displayNone">
<?php echo template::checkbox('themeFooterMargin', true, 'Aligner le bas de page avec le contenu', [
'checked' => $this->getData(['theme', 'footer', 'margin'])
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>

View File

@ -1,74 +1,74 @@
<?php echo template::formOpen('themeHeaderForm'); ?>
<div class="row">
<div class="col2">
<?php echo template::button('themeHeaderBack', [
<div class="row">
<div class="col2">
<?php echo template::button('themeHeaderBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'theme',
'ico' => 'left',
'value' => 'Retour'
]); ?>
</div>
<div class="col2 offset8">
<?php echo template::submit('themeHeaderSubmit'); ?>
</div>
</div>
<div class="row">
<div class="col6">
<div class="block">
<h4>Couleurs</h4>
<div class="row">
<div class="col6">
<?php echo template::text('themeHeaderBackgroundColor', [
</div>
<div class="col2 offset8">
<?php echo template::submit('themeHeaderSubmit'); ?>
</div>
</div>
<div class="row">
<div class="col6">
<div class="block">
<h4>Couleurs</h4>
<div class="row">
<div class="col6">
<?php echo template::text('themeHeaderBackgroundColor', [
'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence.',
'label' => 'Fond',
'value' => $this->getData(['theme', 'header', 'backgroundColor'])
]); ?>
</div>
<div class="col6">
<?php echo template::text('themeHeaderTextColor', [
</div>
<div class="col6">
<?php echo template::text('themeHeaderTextColor', [
'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence.',
'label' => 'Texte',
'value' => $this->getData(['theme', 'header', 'textColor'])
]); ?>
</div>
</div>
</div>
</div>
<div class="col6">
<div class="block">
<h4>Image</h4>
<?php
</div>
</div>
</div>
</div>
<div class="col6">
<div class="block">
<h4>Image</h4>
<?php
$imageFile = file_exists(self::FILE_DIR.'source/'.$this->getData(['theme', 'header', 'image'])) ? $this->getData(['theme', 'header', 'image']) : "";
echo template::file('themeHeaderImage', [
'label' => 'Fond',
'type' => 1,
'value' => $imageFile
]); ?>
<div id="themeHeaderImageOptions" class="displayNone">
<div class="row">
<div class="col6">
<?php echo template::select('themeHeaderImageRepeat', $module::$repeats, [
<div id="themeHeaderImageOptions" class="displayNone">
<div class="row">
<div class="col6">
<?php echo template::select('themeHeaderImageRepeat', $module::$repeats, [
'label' => 'Répétition',
'selected' => $this->getData(['theme', 'header', 'imageRepeat'])
]); ?>
</div>
<div class="col6">
<?php echo template::select('themeHeaderImagePosition', $module::$imagePositions, [
</div>
<div class="col6">
<?php echo template::select('themeHeaderImagePosition', $module::$imagePositions, [
'label' => 'Position',
'selected' => $this->getData(['theme', 'header', 'imagePosition'])
]); ?>
</div>
</div>
<div class="row">
<div class="col6">
<?php echo template::checkbox('themeHeaderTextHide', true, 'Cacher le titre du site', [
</div>
</div>
<div class="row">
<div class="col6">
<?php echo template::checkbox('themeHeaderTextHide', true, 'Cacher le titre du site', [
'checked' => $this->getData(['theme', 'header', 'textHide'])
]); ?>
</div>
<div class="col6">
<?php echo template::select('themeHeaderImageContainer', $module::$headerWide, [
</div>
<div class="col6">
<?php echo template::select('themeHeaderImageContainer', $module::$headerWide, [
'label' => 'Adaptation',
'selected' => $this->getData(['theme', 'header', 'imageContainer']),
'help' => 'Responsive (cover) : rogne une image trop grande sans la déformer -
@ -76,83 +76,83 @@
<br><br>Pour une bannière full responsive, sélectionnez aussi Hauteur -> Responsive.
<br>Dans ce cas le titre est indisponible.'
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Configuration</h4>
<div class="row">
<div class="col4">
<?php echo template::select('themeHeaderPosition', $module::$headerPositions, [
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Configuration</h4>
<div class="row">
<div class="col4">
<?php echo template::select('themeHeaderPosition', $module::$headerPositions, [
'label' => 'Position',
'selected' => $this->getData(['theme', 'header', 'position'])
]); ?>
</div>
<div class="col4">
<?php echo template::select('themeHeaderHeight', $module::$headerHeights, [
</div>
<div class="col4">
<?php echo template::select('themeHeaderHeight', $module::$headerHeights, [
'label' => 'Hauteur',
'selected' => $this->getData(['theme', 'header', 'height'])
]); ?>
</div>
<div class="col4">
<?php echo template::select('themeHeaderTextAlign', $module::$aligns, [
</div>
<div class="col4">
<?php echo template::select('themeHeaderTextAlign', $module::$aligns, [
'label' => 'Alignement du contenu',
'selected' => $this->getData(['theme', 'header', 'textAlign'])
]); ?>
</div>
</div>
<div id="themeHeaderShow" class="displayNone">
<?php echo template::checkbox('themeHeaderlinkHome', true, 'Bannière cliquable', [
</div>
</div>
<div id="themeHeaderShow" class="displayNone">
<?php echo template::checkbox('themeHeaderlinkHome', true, 'Bannière cliquable', [
'checked' => $this->getData(['theme', 'header', 'linkHome'])
]); ?>
</div>
<div id="themeHeaderPositionOptions" class="displayNone">
<?php echo template::checkbox('themeHeaderMargin', true, 'Aligner la bannière avec le contenu', [
</div>
<div id="themeHeaderPositionOptions" class="displayNone">
<?php echo template::checkbox('themeHeaderMargin', true, 'Aligner la bannière avec le contenu', [
'checked' => $this->getData(['theme', 'header', 'margin'])
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Mise en forme du texte</h4>
<div class="row">
<div class="col3">
<?php echo template::select('themeHeaderFont', $module::$fonts, [
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Mise en forme du texte</h4>
<div class="row">
<div class="col3">
<?php echo template::select('themeHeaderFont', $module::$fonts, [
'label' => 'Police',
'selected' => $this->getData(['theme', 'header', 'font'])
]); ?>
</div>
<div class="col3">
<?php echo template::select('themeHeaderFontSize', $module::$headerFontSizes, [
</div>
<div class="col3">
<?php echo template::select('themeHeaderFontSize', $module::$headerFontSizes, [
'label' => 'Taille',
'help' => 'Proportionnelle à celle définie dans le site.',
'selected' => $this->getData(['theme', 'header', 'fontSize'])
]); ?>
</div>
<div class="col3">
<?php echo template::select('themeHeaderFontWeight', $module::$fontWeights, [
</div>
<div class="col3">
<?php echo template::select('themeHeaderFontWeight', $module::$fontWeights, [
'label' => 'Style',
'selected' => $this->getData(['theme', 'header', 'fontWeight'])
]); ?>
</div>
<div class="col3">
<?php echo template::select('themeHeaderTextTransform', $module::$textTransforms, [
</div>
<div class="col3">
<?php echo template::select('themeHeaderTextTransform', $module::$textTransforms, [
'label' => 'Casse',
'selected' => $this->getData(['theme', 'header', 'textTransform'])
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>

View File

@ -1,91 +1,91 @@
<?php echo template::formOpen('themeMenuForm'); ?>
<div class="row">
<div class="col2">
<?php echo template::button('themeMenuBack', [
<div class="row">
<div class="col2">
<?php echo template::button('themeMenuBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'theme',
'ico' => 'left',
'value' => 'Retour'
]); ?>
</div>
<div class="col2 offset8">
<?php echo template::submit('themeMenuSubmit'); ?>
</div>
</div>
<div class="row">
<div class="col8">
<div class="block">
<h4>Couleur</h4>
<div class="row">
<div class="col6">
<?php echo template::text('themeMenuBackgroundColor', [
</div>
<div class="col2 offset8">
<?php echo template::submit('themeMenuSubmit'); ?>
</div>
</div>
<div class="row">
<div class="col8">
<div class="block">
<h4>Couleur</h4>
<div class="row">
<div class="col6">
<?php echo template::text('themeMenuBackgroundColor', [
'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence.',
'label' => 'Fond',
'value' => $this->getData(['theme', 'menu', 'backgroundColor'])
]); ?>
</div>
<div class="col6">
<?php echo template::text('themeMenuTextColor', [
</div>
<div class="col6">
<?php echo template::text('themeMenuTextColor', [
'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence.',
'label' => 'Texte',
'value' => $this->getData(['theme', 'menu', 'textColor'])
]); ?>
</div>
</div>
</div>
</div>
<div class="col4">
<div class="block">
<h4>Contenu</h4>
<?php echo template::checkbox('themeMenuLoginLink', true, 'Lien de connexion', [
</div>
</div>
</div>
</div>
<div class="col4">
<div class="block">
<h4>Contenu</h4>
<?php echo template::checkbox('themeMenuLoginLink', true, 'Lien de connexion', [
'checked' => $this->getData(['theme', 'menu', 'loginLink'])
]); ?>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Mise en forme du texte</h4>
<div class="row">
<div class="col3">
<?php echo template::select('themeMenuFont', $module::$fonts, [
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Mise en forme du texte</h4>
<div class="row">
<div class="col3">
<?php echo template::select('themeMenuFont', $module::$fonts, [
'label' => 'Police',
'selected' => $this->getData(['theme', 'menu', 'font'])
]); ?>
</div>
<div class="col3">
<?php echo template::select('themeMenuFontSize', $module::$menuFontSizes, [
</div>
<div class="col3">
<?php echo template::select('themeMenuFontSize', $module::$menuFontSizes, [
'label' => 'Taille',
'help' => 'Proportionnelle à celle définie dans le site',
'selected' => $this->getData(['theme', 'menu', 'fontSize'])
]); ?>
</div>
<div class="col3">
<?php echo template::select('themeMenuFontWeight', $module::$fontWeights, [
]); ?>
</div>
<div class="col3">
<?php echo template::select('themeMenuFontWeight', $module::$fontWeights, [
'label' => 'Style',
'selected' => $this->getData(['theme', 'menu', 'fontWeight'])
]); ?>
</div>
<div class="col3">
<?php echo template::select('themeMenuTextTransform', $module::$textTransforms, [
</div>
<div class="col3">
<?php echo template::select('themeMenuTextTransform', $module::$textTransforms, [
'label' => 'Casse',
'selected' => $this->getData(['theme', 'menu', 'textTransform'])
]); ?>
</div>
</div>
<div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Configuration</h4>
<div class="row">
<div class="col4">
<?php
</div>
</div>
<div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>Configuration</h4>
<div class="row">
<div class="col4">
<?php
if ( $this->getData(['theme', 'header', 'position']) == "site")
{ echo template::select('themeMenuPosition', $module::$menuPositionsSite, [
'label' => 'Position',
@ -96,33 +96,35 @@
'label' => 'Position',
'selected' => $this->getData(['theme', 'menu', 'position'])
]); }
?>
</div>
<div class="col4">
<?php echo template::select('themeMenuHeight', $module::$menuHeights, [
?>
</div>
<div class="col4">
<?php echo template::select('themeMenuHeight', $module::$menuHeights, [
'label' => 'Hauteur',
'selected' => $this->getData(['theme', 'menu', 'height'])
]); ?>
</div>
<div class="col4">
<?php echo template::select('themeMenuTextAlign', $module::$aligns, [
</div>
<div class="col4">
<?php echo template::select('themeMenuTextAlign', $module::$aligns, [
'label' => 'Alignement du contenu',
'selected' => $this->getData(['theme', 'menu', 'textAlign'])
]); ?>
</div>
</div>
<div id="themeMenuPositionOptions" class="displayNone">
<?php echo template::checkbox('themeMenuMargin', true, 'Aligner le menu avec le contenu', [
</div>
</div>
<div id="themeMenuPositionOptions" class="displayNone">
<?php echo template::checkbox('themeMenuMargin', true, 'Aligner le menu avec le contenu', [
'checked' => $this->getData(['theme', 'menu', 'margin'])
]); ?>
</div>
<div id="themeMenuPositionFixed" class="displayNone">
<?php echo template::checkbox('themeMenuFixed', true, 'Menu fixe', [
</div>
<div id="themeMenuPositionFixed" class="displayNone">
<?php echo template::checkbox('themeMenuFixed', true, 'Menu fixe', [
'checked' => $this->getData(['theme', 'menu', 'fixed'])
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>