13.4.00 sélecteur de fichier amélioré

This commit is contained in:
Fred Tempez 2024-09-05 11:02:01 +02:00
parent 62437c8fac
commit 7f6d010b9c
14 changed files with 217 additions and 280 deletions

View File

@ -1,5 +1,9 @@
# Notes de mises à jour # Notes de mises à jour
## Versions 13.4.00
** Amélioration **
- Le sélecteur de fichier affiche le chemin d'accès du fichier présent dans le champ dans le gestionnaire de fichier.
## Versions 13.3.06 ## Versions 13.3.06
** Corrections : ** ** Corrections : **
- Répare le bouton d'effacement en mode édition d'une page. - Répare le bouton d'effacement en mode édition d'une page.

View File

@ -325,6 +325,7 @@ class template
'name' => $nameId, 'name' => $nameId,
'type' => 2, 'type' => 2,
'value' => '', 'value' => '',
'folder' => '',
'language' => 'fr_FR' 'language' => 'fr_FR'
], $attributes); ], $attributes);
// Traduction de l'aide et de l'étiquette // Traduction de l'aide et de l'étiquette
@ -367,6 +368,8 @@ class template
'&field_id=' . $attributes['id'] . '&field_id=' . $attributes['id'] .
'&type=' . $attributes['type'] . '&type=' . $attributes['type'] .
'&akey=' . md5_file(core::DATA_DIR . 'core.json') . '&akey=' . md5_file(core::DATA_DIR . 'core.json') .
// Ajoute le nom du dossier si la variable est passée
(!empty($attributes['folder']) ? '&fldr=' . $attributes['folder'] : '') .
($attributes['extensions'] ? '&extensions=' . $attributes['extensions'] : '') ($attributes['extensions'] ? '&extensions=' . $attributes['extensions'] : '')
. '" . '"
class="inputFile %s %s" class="inputFile %s %s"

View File

@ -3,12 +3,6 @@
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo helper::translate('Paramètres'); ?> <h4><?php echo helper::translate('Paramètres'); ?>
<!--<span id="setupHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/parametres" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php //echo template::ico('help', ['margin' => 'left']);
?>
</a>-->
</span>
</h4> </h4>
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
@ -17,7 +11,8 @@
'language' => $this->getData(['user', $this->getUser('id'), 'language']), 'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'help' => 'Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.', 'help' => 'Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.',
'label' => 'Favicon', 'label' => 'Favicon',
'value' => $this->getData(['config', 'favicon']) 'value' => $this->getData(['config', 'favicon']),
'folder' => $this->getData(['config', 'favicon']) ? dirname($this->getData(['config', 'favicon'])) : ''
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
@ -26,7 +21,8 @@
'language' => $this->getData(['user', $this->getUser('id'), 'language']), 'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'help' => 'Sélectionnez une icône adaptée à un thème sombre.<br>Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.', 'help' => 'Sélectionnez une icône adaptée à un thème sombre.<br>Pensez à supprimer le cache de votre navigateur si la favicon ne change pas.',
'label' => 'Favicon thème sombre', 'label' => 'Favicon thème sombre',
'value' => $this->getData(['config', 'faviconDark']) 'value' => $this->getData(['config', 'faviconDark']),
'folder' => $this->getData(['config', 'faviconDark']) ? dirname($this->getData(['config', 'faviconDark'])) : ''
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
@ -47,8 +43,8 @@
<div class="col6"> <div class="col6">
<?php echo template::checkbox('configRewrite', true, 'Apache URL intelligentes', [ <?php echo template::checkbox('configRewrite', true, 'Apache URL intelligentes', [
'checked' => helper::checkRewrite(), 'checked' => helper::checkRewrite(),
'help' => 'Supprime le point d\'interrogation dans les URL, l\'option est indisponible avec les autres serveurs Web', 'help' => 'Supprime le point d\'interrogation dans les URL, l\'option est indisponible avec les autres serveurs Web',
'disabled' => stripos($_SERVER["SERVER_SOFTWARE"], 'Apache') === false and $module->isModRewriteEnabled() 'disabled' => stripos($_SERVER["SERVER_SOFTWARE"], 'Apache') === false and $module->isModRewriteEnabled()
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -59,12 +55,6 @@
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo helper::translate('Mise à jour automatisée'); ?> <h4><?php echo helper::translate('Mise à jour automatisée'); ?>
<!--<span id="updateHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/mise-a-jour" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php //echo template::ico('help', ['margin' => 'left']);
?>
</a>
</span>-->
</h4> </h4>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
@ -90,8 +80,8 @@
]); ?> ]); ?>
</div> </div>
<div class="col3 offset1 verticalAlignBottom"> <div class="col3 offset1 verticalAlignBottom">
<pre>Version installée : <strong><?php echo common::ZWII_VERSION ; ?></strong></pre> <pre>Version installée : <strong><?php echo common::ZWII_VERSION; ?></strong></pre>
<pre>Version en ligne : <strong><?php echo helper::getOnlineVersion(common::ZWII_UPDATE_CHANNEL) ; ?></strong></pre> <pre>Version en ligne : <strong><?php echo helper::getOnlineVersion(common::ZWII_UPDATE_CHANNEL); ?></strong></pre>
</div> </div>
<div class="col3 offset2 verticalAlignBottom"> <div class="col3 offset2 verticalAlignBottom">
<?php echo template::button('configUpdateForced', [ <?php echo template::button('configUpdateForced', [
@ -109,12 +99,6 @@
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo helper::translate('Maintenance'); ?> <h4><?php echo helper::translate('Maintenance'); ?>
<!--<span id="maintenanceHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/mode-maintenance" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php //echo template::ico('help', ['margin' => 'left']);
?>
</a>
</span>-->
</h4> </h4>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
@ -169,12 +153,6 @@
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo helper::translate('Scripts externes'); ?> <h4><?php echo helper::translate('Scripts externes'); ?>
<!--<span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/scripts-externes" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php //echo template::ico('help', ['margin' => 'left']);
?>
</a>
</span>-->
</h4> </h4>
<div class="row"> <div class="row">
<div class="col4 offset1 verticalAlignBottom"> <div class="col4 offset1 verticalAlignBottom">
@ -198,13 +176,21 @@
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4>ZwiiCMS <a href="https://zwiicms.fr" target="_blank">Site Web</a> - <a href="https://forum.zwiicms.fr" target="_blank">Forum</a> <h4>ZwiiCMS <a href="https://zwiicms.fr" target="_blank">Site Web</a> - <a
href="https://forum.zwiicms.fr" target="_blank">Forum</a>
</h4> </h4>
<div class="row textAlignCenter"> <div class="row textAlignCenter">
<div class="col12"> <div class="col12">
<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/"><img alt="Licence Creative Commons" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png" /></a> <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/"><img
<p>Cette œuvre est mise à disposition selon les termes de la <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/4.0/">Licence Creative Commons Attribution - Pas d&#39;Utilisation Commerciale - Pas de Modification 4.0 International.</a></p> alt="Licence Creative Commons" style="border-width:0"
<p>Pour voir une copie de cette licence, visitez http://creativecommons.org/licenses/by-nc-nd/4.0/ ou écrivez à Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.</p> src="https://i.creativecommons.org/l/by-nc-nd/4.0/88x31.png" /></a>
<p>Cette œuvre est mise à disposition selon les termes de la <a rel="license"
href="http://creativecommons.org/licenses/by-nc-nd/4.0/">Licence Creative Commons
Attribution - Pas d&#39;Utilisation Commerciale - Pas de Modification 4.0
International.</a></p>
<p>Pour voir une copie de cette licence, visitez
http://creativecommons.org/licenses/by-nc-nd/4.0/ ou écrivez à Creative Commons, PO Box
1866, Mountain View, CA 94042, USA.</p>
</div> </div>
</div> </div>
</div> </div>

View File

@ -4,11 +4,6 @@
<div class="block"> <div class="block">
<h4> <h4>
<?php echo helper::translate('Capture d\'écran Open Graph'); ?> <?php echo helper::translate('Capture d\'écran Open Graph'); ?>
<!--<span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/referencement" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php //echo template::ico('help', ['margin' => 'left']); ?>
</a>
</span>-->
</h4> </h4>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
@ -18,29 +13,30 @@
'language' => $this->getData(['user', $this->getUser('id'), 'language']), 'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'label' => 'Image Open Graph', 'label' => 'Image Open Graph',
'value' => $this->getData(['config', 'seo', 'openGraphImage']), 'value' => $this->getData(['config', 'seo', 'openGraphImage']),
'folder' => $this->getData(['config', 'seo', 'openGraphImage']) ? dirname($this->getData(['config', 'seo', 'openGraphImage'])) : '',
'type' => 1, 'type' => 1,
'help' => sprintf('%s : JPG - PNG<br />', helper::translate('Format')) . 'help' => sprintf('%s : JPG - PNG<br />', helper::translate('Format')) .
sprintf('%s : 1200 x 630 pixels<br />', helper::translate('Dimensions minimales')) . sprintf('%s : 1200 x 630 pixels<br />', helper::translate('Dimensions minimales')) .
sprintf('%s : 1.91:1<br />', helper::translate('Ratio')) . sprintf('%s : 1.91:1<br />', helper::translate('Ratio')) .
sprintf('%s : %s, %s<br />', helper::translate('Taille maximale du fichier'), helper::translate('5 Mo pour les images JPEG'), helper::translate('1 Mo pour les images PNG')) sprintf('%s : %s, %s<br />', helper::translate('Taille maximale du fichier'), helper::translate('5 Mo pour les images JPEG'), helper::translate('1 Mo pour les images PNG'))
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col10 textAlignCenter"> <div class="col10 textAlignCenter">
<?php if( !empty($module::$imageOpenGraph['type']) ): ?> <?php if( !empty($module::$imageOpenGraph['type']) ): ?>
<p> <p>
<?php echo sprintf('%s : <span id="screenType">%s</span>', helper::translate('Format'), $module::$imageOpenGraph['type']); ?> <?php echo sprintf('%s : <span id="screenType">%s</span>', helper::translate('Format'), $module::$imageOpenGraph['type']); ?>
</p> </p>
<p> <p>
<?php echo sprintf('%s : <span id="screenWide">%s</span> x <span id="screenHeight">%s</span> pixels', helper::translate('Dimensions minimales'), $module::$imageOpenGraph['wide'], $module::$imageOpenGraph['height'] ); ?> <?php echo sprintf('%s : <span id="screenWide">%s</span> x <span id="screenHeight">%s</span> pixels', helper::translate('Dimensions minimales'), $module::$imageOpenGraph['wide'], $module::$imageOpenGraph['height'] ); ?>
</p> </p>
<p> <p>
<?php echo sprintf('%s : <span id="screenRatio">%s</span><span id="screenFract">:1</span>' , helper::translate('Ratio'), round($module::$imageOpenGraph['ratio'], 2)); ?> <?php echo sprintf('%s : <span id="screenRatio">%s</span><span id="screenFract">:1</span>' , helper::translate('Ratio'), round($module::$imageOpenGraph['ratio'], 2)); ?>
</p> </p>
<p> <p>
<?php echo sprintf('%s : <span id="screenWeight">%s</span>', helper::translate('Poids'), $module::$imageOpenGraph['size']); ?> <?php echo sprintf('%s : <span id="screenWeight">%s</span>', helper::translate('Poids'), $module::$imageOpenGraph['size']); ?>
</p> </p>
<?php endif; ?> <?php endif; ?>
</div> </div>
</div> </div>
@ -84,12 +80,6 @@
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4> <h4>
<?php echo helper::translate('Réseaux sociaux'); ?>
<!--<span id="specialeHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/reseaux-sociaux" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php //echo template::ico('help', ['margin' => 'left']); ?>
</a>
</span>-->
</h4> </h4>
<div class="row"> <div class="row">
<div class="col3"> <div class="col3">

View File

@ -7,16 +7,7 @@
'value' => template::ico('left') 'value' => template::ico('left')
]); ?> ]); ?>
</div> </div>
<div class="col1"> <div class="col1 offset7">
<?php /**echo template::button('pageEditHelp', [
'href' => 'https://doc.zwiicms.fr/edition-des-pages',
'target' => '_blank',
'value' => template::ico('help'),
'class' => 'buttonHelp',
'help' => 'Consulter l\'aide en ligne'
]); */?>
</div>
<div class="col1 offset6">
<?php echo template::button('pageEditDelete', [ <?php echo template::button('pageEditDelete', [
'class' => 'buttonRed', 'class' => 'buttonRed',
'href' => helper::baseUrl() . 'page/delete/' . $this->getUrl(2) . '/' . self::$siteContent, 'href' => helper::baseUrl() . 'page/delete/' . $this->getUrl(2) . '/' . self::$siteContent,
@ -26,7 +17,7 @@
</div> </div>
<div class="col1"> <div class="col1">
<?php echo template::button('pageEditDuplicate', [ <?php echo template::button('pageEditDuplicate', [
'href' => helper::baseUrl() . 'page/edit/' . $this->getUrl(2) . '/' . self::$siteContent, 'href' => helper::baseUrl() . 'page/duplicate/' . $this->getUrl(2) . '/' . self::$siteContent,
'value' => template::ico('clone'), 'value' => template::ico('clone'),
'help' => 'Dupliquer la page' 'help' => 'Dupliquer la page'
]); ?> ]); ?>
@ -37,7 +28,6 @@
]); ?> ]); ?>
</div> </div>
</div> </div>
<div class="tab"> <div class="tab">
<?php echo template::button('pageEditContentButton', [ <?php echo template::button('pageEditContentButton', [
'value' => 'Contenu', 'value' => 'Contenu',
@ -67,11 +57,6 @@
<div class="block"> <div class="block">
<h4> <h4>
<?php echo helper::translate('Titres'); ?> <?php echo helper::translate('Titres'); ?>
<!--<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', ['margin' => 'left']); ?>
</a>
</span>-->
</h4> </h4>
<div class="row"> <div class="row">
<div class="col8"> <div class="col8">
@ -120,11 +105,6 @@
<div class="block"> <div class="block">
<h4> <h4>
<?php echo helper::translate('Emplacement dans le menu'); ?> <?php echo helper::translate('Emplacement dans le menu'); ?>
<!--<span id="positionHelpButton" class="helpDisplayButton">
<a href="https://doc.zwiicms.fr/emplacement-dans-le-menu" target="_blank" title="Cliquer pour consulter l'aide en ligne">
<?php //echo template::ico('help', ['margin' => 'left']); ?>
</a>
</span>-->
</h4> </h4>
<div class="blockContainer"> <div class="blockContainer">
<div class="row"> <div class="row">
@ -176,11 +156,6 @@
<div class="block"> <div class="block">
<h4> <h4>
<?php echo helper::translate('Options avancées'); ?> <?php echo helper::translate('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', ['margin' => 'left']); ?>
</a>
</span>-->
</h4> </h4>
<div class="blockContainer"> <div class="blockContainer">
<div class="row"> <div class="row">
@ -195,7 +170,8 @@
'help' => 'Sélectionnez une image ou une icône de petite dimension', 'help' => 'Sélectionnez une image ou une icône de petite dimension',
'language' => $this->getData(['user', $this->getUser('id'), 'language']), 'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'label' => 'Icône', 'label' => 'Icône',
'value' => $this->getData(['page', $this->getUrl(2), 'iconUrl']) 'value' => $this->getData(['page', $this->getUrl(2), 'iconUrl']),
'folder' => $this->getData(['page', $this->getUrl(2), 'iconUrl']) ? dirname($this->getData(['page', $this->getUrl(2), 'iconUrl'])) : '',
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -292,11 +268,6 @@
<div class="block"> <div class="block">
<h4> <h4>
<?php echo helper::translate('Mise en page'); ?> <?php echo helper::translate('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', ['margin' => 'left']); ?>
</a>
</span>-->
</h4> </h4>
<div class="blockContainer"> <div class="blockContainer">
<div class="row"> <div class="row">
@ -372,11 +343,6 @@
<div class="block"> <div class="block">
<h4> <h4>
<?php echo helper::translate('Permission et référencement'); ?> <?php echo helper::translate('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', ['margin' => 'left']); ?>
</a>
</span>-->
</h4> </h4>
<div class="blockContainer"> <div class="blockContainer">
<div class="row"> <div class="row">
@ -424,5 +390,4 @@
</div> </div>
</div> </div>
</div> </div>
<?php echo template::formClose(); ?> <?php echo template::formClose(); ?>

View File

@ -7,15 +7,7 @@
'value' => template::ico('left') 'value' => template::ico('left')
]); ?> ]); ?>
</div> </div>
<div class="col1"> <div class="col2 offset9">
<?php /* echo template::button('themeBodyHelp', [
'href' => 'https://doc.zwiicms.fr/arriere-plan',
'target' => '_blank',
'value' => template::ico('help'),
'class' => 'buttonHelp'
]); */ ?>
</div>
<div class="col2 offset8">
<?php echo template::submit('themeBodySubmit'); ?> <?php echo template::submit('themeBodySubmit'); ?>
</div> </div>
</div> </div>
@ -35,7 +27,7 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::text('themeBodyToTopColor', [ <?php echo template::text('themeBodyToTopColor', [
'class' => 'colorPicker', 'class' => 'colorPicker',
'help' => 'Le curseur horizontal règle le niveau de transparence.', 'help' => 'Le curseur horizontal règle le niveau de transparence.',
'label' => 'Couleur icône haut de page', 'label' => 'Couleur icône haut de page',
@ -68,7 +60,8 @@
'language' => $this->getData(['user', $this->getUser('id'), 'language']), 'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'label' => 'Arrière plan', 'label' => 'Arrière plan',
'type' => 1, 'type' => 1,
'value' => $imageFile 'value' => $imageFile,
'folder' => $imageFile ? dirname($imageFile) : ''
]); ?> ]); ?>
</div> </div>
</div> </div>

View File

@ -7,15 +7,7 @@
'value' => template::ico('left') 'value' => template::ico('left')
]); ?> ]); ?>
</div> </div>
<div class="col1"> <div class="col2 offset9">
<?php /* echo template::button('themeHeaderHelp', [
'href' => 'https://doc.zwiicms.fr/banniere',
'target' => '_blank',
'value' => template::ico('help'),
'class' => 'buttonHelp'
]); */?>
</div>
<div class="col2 offset8">
<?php echo template::submit('themeHeaderSubmit'); ?> <?php echo template::submit('themeHeaderSubmit'); ?>
</div> </div>
</div> </div>
@ -158,13 +150,17 @@
'label' => 'Image', 'label' => 'Image',
'language' => $this->getData(['user', $this->getUser('id'), 'language']), 'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'type' => 1, 'type' => 1,
'value' => $imageFile 'value' => $imageFile,
'folder' => $imageFile ? dirname($imageFile) : ''
]); ]);
?> ?>
<span class="themeHeaderImageOptions displayNone" id="themeHeaderImageInfo"> <span class="themeHeaderImageOptions displayNone" id="themeHeaderImageInfo">
<?php echo helper::translate('Largeur de l\'image'); ?> <span id="themeHeaderImageWidth"></span> ; <?php echo helper::translate('Largeur du site :'); ?> <?php echo $this->getData(['theme', 'site', 'width']); ?> <?php echo helper::translate('Largeur de l\'image'); ?> <span id="themeHeaderImageWidth"></span>
; <?php echo helper::translate('Largeur du site :'); ?>
<?php echo $this->getData(['theme', 'site', 'width']); ?>
| |
<?php echo helper::translate('Hauteur de l\'image'); ?> <span id="themeHeaderImageHeight"></span> <?php echo helper::translate('Hauteur de l\'image'); ?> <span
id="themeHeaderImageHeight"></span>
| |
<?php echo helper::translate('Ratio'); ?> <span id="themeHeaderImageRatio"></span> <?php echo helper::translate('Ratio'); ?> <span id="themeHeaderImageRatio"></span>
</span> </span>

View File

@ -7,22 +7,15 @@
'value' => template::ico('left') 'value' => template::ico('left')
]); ?> ]); ?>
</div> </div>
<div class="col1"> <div class="col2 offset9">
<?php /* echo template::button('themeMenuHelp', [
'href' => 'https://doc.zwiicms.fr/menu',
'target' => '_blank',
'value' => template::ico('help'),
'class' => 'buttonHelp'
]); */?>
</div>
<div class="col2 offset8">
<?php echo template::submit('themeMenuSubmit'); ?> <?php echo template::submit('themeMenuSubmit'); ?>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo helper::translate('Paramètres'); ?> <h4>
<?php echo helper::translate('Paramètres'); ?>
</h4> </h4>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
@ -84,7 +77,8 @@
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo helper::translate('Contenu'); ?> <h4>
<?php echo helper::translate('Contenu'); ?>
</h4> </h4>
<div class="row"> <div class="row">
<div class="col3"> <div class="col3">
@ -112,7 +106,8 @@
'language' => $this->getData(['user', $this->getUser('id'), 'language']), 'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'label' => 'Logo du menu burger', 'label' => 'Logo du menu burger',
'type' => 1, 'type' => 1,
'value' => $imageFile 'value' => $imageFile,
'folder' => $imageFile ? dirname($imageFile) : ''
]); ]);
?> ?>
</div> </div>
@ -123,7 +118,8 @@
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo helper::translate('Couleurs'); ?> <h4>
<?php echo helper::translate('Couleurs'); ?>
</h4> </h4>
<div class="row"> <div class="row">
<div class="col4"> <div class="col4">
@ -164,7 +160,7 @@
<?php <?php
echo template::checkbox('themeMenuActiveColorAuto', true, 'Couleur de fond automatique', [ echo template::checkbox('themeMenuActiveColorAuto', true, 'Couleur de fond automatique', [
'checked' => $this->getData(['theme', 'menu', 'activeColorAuto']), 'checked' => $this->getData(['theme', 'menu', 'activeColorAuto']),
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::text('themeMenuActiveColor', [ <?php echo template::text('themeMenuActiveColor', [
@ -181,7 +177,8 @@
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo helper::translate('Mise en forme du texte'); ?> <h4>
<?php echo helper::translate('Mise en forme du texte'); ?>
</h4> </h4>
<div class="row"> <div class="row">
<div class="col3"> <div class="col3">

View File

@ -16,7 +16,7 @@
class blog extends common class blog extends common
{ {
const VERSION = '7.10'; const VERSION = '7.11';
const REALNAME = 'Blog'; const REALNAME = 'Blog';
const DELETE = true; const DELETE = true;
const UPDATE = '0.0'; const UPDATE = '0.0';

View File

@ -1,4 +1,5 @@
# Versions 7.11
- Le sélecteur de fichier affiche par défaut le chemin vers le fichier présent dans le champ.
# Versions 7.10 # Versions 7.10
- Empêche la validation d'un commentaire lorsque le contenu est vide. - Empêche la validation d'un commentaire lorsque le contenu est vide.
# Versions 7.8 - 7.9 # Versions 7.8 - 7.9

View File

@ -1,153 +1,154 @@
<?php echo template::formOpen('blogEditForm'); ?> <?php echo template::formOpen('blogEditForm'); ?>
<div class="row"> <div class="row">
<div class="col1"> <div class="col1">
<?php echo template::button('blogEditBack', [ <?php echo template::button('blogEditBack', [
'class' => 'buttonGrey', 'class' => 'buttonGrey',
'href' => helper::baseUrl() . $this->getUrl(0) . '/config', 'href' => helper::baseUrl() . $this->getUrl(0) . '/config',
'value' => template::ico('left') 'value' => template::ico('left')
]); ?> ]); ?>
</div>
<div class="col3 offset6">
<?php echo template::button('blogEditDraft', [
'uniqueSubmission' => true,
'value' => 'Brouillon'
]); ?>
<?php echo template::hidden('blogEditState', [
'value' => true
]); ?>
</div>
<div class="col2">
<?php echo template::submit('blogEditSubmit', [
'value' => 'Publier',
'uniqueSubmission' => true
]); ?>
</div>
</div> </div>
<div class="row"> <div class="col3 offset6">
<div class="col12"> <?php echo template::button('blogEditDraft', [
<div class="block"> 'uniqueSubmission' => true,
<h4><?php echo helper::translate('Paramètres');?></h4> 'value' => 'Brouillon'
<div class="row"> ]); ?>
<div class="col6"> <?php echo template::hidden('blogEditState', [
<?php echo template::text('blogEditTitle', [ 'value' => true
'label' => 'Titre', ]); ?>
'value' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'title']) </div>
]); ?> <div class="col2">
</div> <?php echo template::submit('blogEditSubmit', [
<div class="col6"> 'value' => 'Publier',
<?php echo template::text('blogEditPermalink', [ 'uniqueSubmission' => true
'label' => 'Permalink', ]); ?>
'value' => $this->getUrl(2) </div>
]); ?> </div>
</div> <div class="row">
<div class="col12">
<div class="block">
<h4><?php echo helper::translate('Paramètres'); ?></h4>
<div class="row">
<div class="col6">
<?php echo template::text('blogEditTitle', [
'label' => 'Titre',
'value' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'title'])
]); ?>
</div> </div>
<div class="row"> <div class="col6">
<div class="col6"> <?php echo template::text('blogEditPermalink', [
<?php echo template::file('blogEditPicture', [ 'label' => 'Permalink',
'language' => $this->getData(['user', $this->getUser('id'), 'language']), 'value' => $this->getUrl(2)
'help' => $this->getData(['theme', 'site', 'width']) !== '100%' ? 'Taille optimale de l\'image de couverture : ' . ((int) substr($this->getData(['theme', 'site', 'width']), 0, -2) - (20 * 2)) . ' x 350 pixels.' : '', ]); ?>
'label' => 'Image de couverture',
'type' => 1,
'value' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'picture'])
]); ?>
</div>
<div class="col3">
<?php echo template::select('blogEditPictureSize', $module::$pictureSizes, [
'label' => 'Largeur de l\'image',
'selected' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'pictureSize'])
]); ?>
</div>
<div class="col3">
<?php echo template::select('blogEditPicturePosition', $module::$picturePositions, [
'label' => 'Position',
'selected' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'picturePosition']),
'help' => 'Le texte de l\'article est adapté autour de l\'image'
]); ?>
</div>
</div> </div>
<div class="row"> </div>
<div class="col6"> <div class="row">
<?php echo template::checkbox('blogEditHidePicture', true, 'Masquer l\'image de couverture dans l\'article', [ <div class="col6">
'checked' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'hidePicture']) <?php echo template::file('blogEditPicture', [
]); ?> 'language' => $this->getData(['user', $this->getUser('id'), 'language']),
</div> 'help' => $this->getData(['theme', 'site', 'width']) !== '100%' ? 'Taille optimale de l\'image de couverture : ' . ((int) substr($this->getData(['theme', 'site', 'width']), 0, -2) - (20 * 2)) . ' x 350 pixels.' : '',
'label' => 'Image de couverture',
'type' => 1,
'value' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'picture']),
'folder' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'picture']) ? dirname($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'picture'])) : ''
]); ?>
</div>
<div class="col3">
<?php echo template::select('blogEditPictureSize', $module::$pictureSizes, [
'label' => 'Largeur de l\'image',
'selected' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'pictureSize'])
]); ?>
</div>
<div class="col3">
<?php echo template::select('blogEditPicturePosition', $module::$picturePositions, [
'label' => 'Position',
'selected' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'picturePosition']),
'help' => 'Le texte de l\'article est adapté autour de l\'image'
]); ?>
</div>
</div>
<div class="row">
<div class="col6">
<?php echo template::checkbox('blogEditHidePicture', true, 'Masquer l\'image de couverture dans l\'article', [
'checked' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'hidePicture'])
]); ?>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<?php echo template::textarea('blogEditContent', [ </div>
'class' => 'editorWysiwyg', <?php echo template::textarea('blogEditContent', [
'value' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'content']) 'class' => 'editorWysiwyg',
]); ?> 'value' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'content'])
<div class="row"> ]); ?>
<div class="col12"> <div class="row">
<div class="block"> <div class="col12">
<h4><?php echo helper::translate('Options de publication');?></h4> <div class="block">
<div class="row"> <h4><?php echo helper::translate('Options de publication'); ?></h4>
<div class="col4"> <div class="row">
<?php echo template::select('blogEditUserId', $module::$users, [ <div class="col4">
'label' => 'Auteur', <?php echo template::select('blogEditUserId', $module::$users, [
'selected' => $this->getUser('id'), 'label' => 'Auteur',
'disabled' => $this->getUser('group') !== self::GROUP_ADMIN ? true : false 'selected' => $this->getUser('id'),
]); ?> 'disabled' => $this->getUser('group') !== self::GROUP_ADMIN ? true : false
</div> ]); ?>
<div class="col4"> </div>
<?php echo template::date('blogEditPublishedOn', [ <div class="col4">
'help' => 'L\'article n\'est visible qu\'après la date de publication prévue.', <?php echo template::date('blogEditPublishedOn', [
'type' => 'datetime-local', 'help' => 'L\'article n\'est visible qu\'après la date de publication prévue.',
'label' => 'Publication', 'type' => 'datetime-local',
'value' => floor($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'publishedOn']) / 60) * 60 'label' => 'Publication',
]); ?> 'value' => floor($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'publishedOn']) / 60) * 60
</div> ]); ?>
<div class="col4"> </div>
<?php echo template::select('blogEditConsent', $module::$articleConsent , [ <div class="col4">
'label' => 'Édition - Suppression', <?php echo template::select('blogEditConsent', $module::$articleConsent, [
'selected' => is_numeric($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'editConsent'])) ? $module::EDIT_GROUP : $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'editConsent']), 'label' => 'Édition - Suppression',
'help' => 'Les utilisateurs des groupes supérieurs accèdent à l\'article sans restriction' 'selected' => is_numeric($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'editConsent'])) ? $module::EDIT_GROUP : $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'editConsent']),
]); ?> 'help' => 'Les utilisateurs des groupes supérieurs accèdent à l\'article sans restriction'
</div> ]); ?>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="row"> </div>
<div class="col12"> <div class="row">
<div class="block"> <div class="col12">
<h4><?php echo helper::translate('Commentaires');?></h4> <div class="block">
<div class="row"> <h4><?php echo helper::translate('Commentaires'); ?></h4>
<div class="col4 "> <div class="row">
<?php echo template::checkbox('blogEditCommentClose', true, 'Fermer les commentaires', [ <div class="col4 ">
'checked' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'commentClose']) <?php echo template::checkbox('blogEditCommentClose', true, 'Fermer les commentaires', [
]); ?> 'checked' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'commentClose'])
</div> ]); ?>
<div class="col4 commentOptionsWrapper "> </div>
<?php echo template::checkbox('blogEditCommentApproved', true, 'Approbation par un modérateur', [ <div class="col4 commentOptionsWrapper ">
'checked' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'commentApproved']), <?php echo template::checkbox('blogEditCommentApproved', true, 'Approbation par un modérateur', [
'' 'checked' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'commentApproved']),
]); ?> ''
</div> ]); ?>
<div class="col4 commentOptionsWrapper"> </div>
<?php echo template::select('blogEditCommentMaxlength', $module::$commentsLength,[ <div class="col4 commentOptionsWrapper">
'help' => 'Choix du nombre maximum de caractères pour chaque commentaire de l\'article, mise en forme html comprise.', <?php echo template::select('blogEditCommentMaxlength', $module::$commentsLength, [
'label' => 'Caractères par commentaire', 'help' => 'Choix du nombre maximum de caractères pour chaque commentaire de l\'article, mise en forme html comprise.',
'selected' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'commentMaxlength']) 'label' => 'Caractères par commentaire',
]); ?> 'selected' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'commentMaxlength'])
</div> ]); ?>
</div>
</div>
<div class="row">
<div class="col3 commentOptionsWrapper offset2">
<?php echo template::checkbox('blogEditCommentNotification', true, 'Notification par email', [
'checked' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'commentNotification']),
]); ?>
</div> </div>
<div class="row"> <div class="col4 commentOptionsWrapper">
<div class="col3 commentOptionsWrapper offset2"> <?php echo template::select('blogEditCommentGroupNotification', $module::$groupNews, [
<?php echo template::checkbox('blogEditCommentNotification', true, 'Notification par email', [ 'selected' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'commentGroupNotification']),
'checked' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'commentNotification']), ]); ?>
]); ?>
</div>
<div class="col4 commentOptionsWrapper">
<?php echo template::select('blogEditCommentGroupNotification', $module::$groupNews, [
'selected' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'commentGroupNotification']),
]); ?>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div>
<?php echo template::formClose(); ?> <?php echo template::formClose(); ?>

View File

@ -1,3 +1,5 @@
# Versions 4.4
- Le sélecteur de fichier affiche par défaut le chemin vers le fichier présent dans le champ.
# Version 4.3 # Version 4.3
- Contrôle de la variable de session liée au contenu. Evite des erreurs lorsque plusieurs onglets sont ouverts. - Contrôle de la variable de session liée au contenu. Evite des erreurs lorsque plusieurs onglets sont ouverts.
# Version 4.2 # Version 4.2

View File

@ -17,7 +17,7 @@
class form extends common class form extends common
{ {
const VERSION = '4.3'; const VERSION = '4.4';
const REALNAME = 'Formulaire'; const REALNAME = 'Formulaire';
const DATADIRECTORY = ''; // Contenu localisé inclus par défaut (page.json et module.json) const DATADIRECTORY = ''; // Contenu localisé inclus par défaut (page.json et module.json)

View File

@ -14,7 +14,7 @@
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo helper::translate('Validation du formulaire');?></h4> <h4><?php echo helper::translate('Validation du formulaire'); ?></h4>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::checkbox('formOptionCaptcha', true, 'Captcha', [ <?php echo template::checkbox('formOptionCaptcha', true, 'Captcha', [
@ -49,7 +49,7 @@
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo helper::translate('Gabarit');?></h4> <h4><?php echo helper::translate('Gabarit'); ?></h4>
<div class="row"> <div class="row">
<div class="col6"> <div class="col6">
<?php echo template::select('formOptionAlign', $module::$optionAlign, [ <?php echo template::select('formOptionAlign', $module::$optionAlign, [
@ -78,7 +78,7 @@
<div class="row"> <div class="row">
<div class="col12"> <div class="col12">
<div class="block"> <div class="block">
<h4><?php echo helper::translate('Courriel');?></h4> <h4><?php echo helper::translate('Courriel'); ?></h4>
<?php echo template::checkbox('formOptionMailOptionsToggle', true, 'Envoyer par mail les données saisies :', [ <?php echo template::checkbox('formOptionMailOptionsToggle', true, 'Envoyer par mail les données saisies :', [
'checked' => (bool) $this->getData(['module', $this->getUrl(0), 'config', 'group']) || 'checked' => (bool) $this->getData(['module', $this->getUrl(0), 'config', 'group']) ||
!empty($this->getData(['module', $this->getUrl(0), 'config', 'user'])) || !empty($this->getData(['module', $this->getUrl(0), 'config', 'user'])) ||
@ -128,10 +128,10 @@
</div> </div>
<div class="col4"> <div class="col4">
<?php echo template::file('formOptionLogo', [ <?php echo template::file('formOptionLogo', [
'language' => $this->getData(['user', $this->getUser('id'), 'language']), 'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'label' => 'Logo du site', 'label' => 'Logo du site',
'value' => $this->getData(['module', $this->getUrl(0), 'config', 'logoUrl']) 'value' => $this->getData(['module', $this->getUrl(0), 'config', 'logoUrl']),
'folder' => $this->getData(['module', $this->getUrl(0), 'config', 'logoUrl']) ? dirname($this->getData(['module', $this->getUrl(0), 'config', 'logoUrl'])) : ''
]); ?> ]); ?>
</div> </div>
<div class="col4"> <div class="col4">
@ -153,4 +153,3 @@
</div> </div>
</div> </div>
</div> </div>
</div>