[9.1.08] validation html

This commit is contained in:
fredtempez 2019-05-31 23:25:31 +02:00
parent 640dafd9da
commit 1b3f54e49b
9 changed files with 48 additions and 65 deletions

View File

@ -2030,13 +2030,13 @@ class layout extends common {
$active = ($childKey === $currentPageId) ? ' class="active"' : '';
$targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : '';
// Mise en page du sous-item
$items .= '<li>';
if ( $this->getData(['page',$childKey,'disable']) === true
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') )
{$items .= '<li><a href="'.$this->getUrl(1).'">';}
else {
$items .= '<li><a href="' . helper::baseUrl() . $childKey . '"' . $active . $targetBlank . '>'; }
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ) {
$items .= '<a href="'.$this->getUrl(1).'">';
} else {
$items .= '<a href="' . helper::baseUrl() . $childKey . '"' . $active . $targetBlank . '>';
}
switch ($this->getData(['page', $childKey, 'typeMenu'])) {
case '' :
@ -2069,11 +2069,9 @@ class layout extends common {
}
break;
}
$items .= '</a></li>';
}
$items .= '</a></li>';
}
$items .= '</ul>';
}
// Lien de connexion
if(
@ -2114,16 +2112,13 @@ class layout extends common {
} else {
$filterCurrentPageId = $currentParentPageId;
}
//if ($this->getData(['page',$filterCurrentPageId,'hideTitle']) == false) {
// echo '<h3 id="menuSideTitle"><a href="' . helper::baseUrl() . $currentPageId . '">' . $this->getData(['page',$filterCurrentPageId,'title']) . '</a></h3>';
//}
}
} else {
$items .= '<ul class="menuSide">';
}
foreach($this->getHierarchy() as $parentPageId => $childrenPageIds) {
// Ne pas afficher les entrées masquées
if ($this->getData(['page',$parentPageId,'hideMenuSide']) === true ||
empty($childrenPageIds) ) {
if ($this->getData(['page',$parentPageId,'hideMenuSide']) === true ) {
continue;
}
// Filtre actif et nom de la page parente courante différente, on sort de la boucle
@ -2136,35 +2131,17 @@ class layout extends common {
// Mise en page de l'item;
// Ne pas afficher le parent d'une sous-page quand l'option est sélectionnée.
if ($onlyChildren === false) {
$items .= '<li>';
$items .= '<li class="menuSideChild">';
if ( $this->getData(['page',$parentPageId,'disable']) === true
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ) {
$items .= '<a href="'.$this->getUrl(1).'">';
} else {
$items .= '<a href="' . helper::baseUrl() . $parentPageId . '"' . $active . $targetBlank . '>';
}
$items .= $this->getData(['page', $parentPageId, 'title']);
// Cas où les pages enfants enfant sont toutes masquées dans le menu
// ne pas afficher de symbole lorsqu'il n'y a rien à afficher
//$totalChild = 0;
//$disableChild = 0;
//foreach($childrenPageIds as $childKey) {
// $totalChild += 1;
// if ($this->getData(['page',$childKey,'hideMenuSide']) === true ) {
// $disableChild += 1;
// }
//}
//if($childrenPageIds && $disableChild !== $totalChild ) {
// $items .= template::ico('down', 'left');
//}
// ------------------------------------------------
// A garder mais désactivé avec la suppresion du thème
$items .= '</a></il>';
}
if ($onlyChildren === false) {
$items .= '<ul id="menuSideChild">';
$items .= '</a></li>';
}
$itemsChildren = '';
foreach($childrenPageIds as $childKey) {
// Passer les entrées masquées
if ($this->getData(['page',$childKey,'hideMenuSide']) === true ) {
@ -2175,24 +2152,30 @@ class layout extends common {
$active = ($childKey === $currentPageId) ? ' class="active"' : '';
$targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : '';
// Mise en page du sous-item
$items .= '<li>';
$itemsChildren .= '<li class="menuSideChild">';
if ( $this->getData(['page',$childKey,'disable']) === true
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') )
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ) {
$itemsChildren .= '<a href="'.$this->getUrl(1).'">';
} else {
$itemsChildren .= '<a href="' . helper::baseUrl() . $childKey . '"' . $active . $targetBlank . '>';
}
{$items .= '<a href="'.$this->getUrl(1).'">';}
else {
$items .= '<a href="' . helper::baseUrl() . $childKey . '"' . $active . $targetBlank . '>'; }
$items .= $this->getData(['page', $childKey, 'title']);
$items .= '</a></li>';
$itemsChildren .= $this->getData(['page', $childKey, 'title']);
$itemsChildren .= '</a></li>';
}
if ($onlyChildren === false) {
// Concaténe les items enfants
if (!empty($itemsChildren)) {
$items .= '<ul class="menuSideChild">';
$items .= $itemsChildren;
$items .= '</ul>';
}
}
if ($onlyChildren === false) {
$items .= '</ul>';
}
// Retourne les items du menu
echo '<ul id="menuSide">' . $items . '</ul>';
echo $items;
}
@ -2299,6 +2282,7 @@ class layout extends common {
}
}
}
$leftItems .= '</optgroup'>
// Afficher les barres
$leftItems .= '<optgroup label="Barres latérales">';
foreach($this->getHierarchy(null, false,true) as $parentPageId => $childrenPageIds) {
@ -2306,7 +2290,8 @@ class layout extends common {
foreach($childrenPageIds as $childKey) {
$leftItems .= '<option value="' . helper::baseUrl() . $childKey . '"' . ($childKey === $currentPageId ? ' selected' : false) . '>&nbsp;&nbsp;&nbsp;&nbsp;' . $this->getData(['page', $childKey, 'title']) . '</option>';
}
}
}
$leftItems .= '</optgroup>';
$leftItems .= '</select></li>';
$leftItems .= '<li><a href="' . helper::baseUrl() . 'page/add" data-tippy-content="Créer une page ou<br>une barre latérale">' . template::ico('plus') . '</a></li>';
if(
@ -2324,7 +2309,6 @@ class layout extends common {
// Items de droite
$rightItems = '';
if($this->getUser('group') >= self::GROUP_MODERATOR) {
$rightItems .= '<li><a href="' . helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR.'core.json') .'" data-tippy-content="Gérer les fichiers" data-lity>' . template::ico('folder') . '</a></li>';
}
if($this->getUser('group') >= self::GROUP_ADMIN) {
@ -2359,7 +2343,7 @@ class layout extends common {
*/
public function showStyle() {
if($this->core->output['style']) {
echo '<style>' . helper::minifyCss($this->core->output['style']) . '</style>';
echo '<style >' . helper::minifyCss($this->core->output['style']) . '</style>';
}
}
@ -3027,12 +3011,12 @@ class template {
'ico' => 'check',
'id' => $nameId,
'name' => $nameId,
'uniqueSubmission' => true,
'uniqueSubmission' => false, //true avant 9.1.08
'value' => 'Enregistrer'
], $attributes);
// Retourne le html
return sprintf(
'<button type="submit" class="%s %s" %s>%s</button>',
'<button type="submit" class="%s%s" %s>%s</button>',
$attributes['class'],
$attributes['uniqueSubmission'] ? 'uniqueSubmission' : '',
helper::sprintAttributes($attributes, ['class', 'ico', 'value']),

View File

@ -520,13 +520,13 @@ nav a:hover {
/* Menu vertical */
#menuSide, #menuSideChild {
.menuSide, .menuSideChild {
padding-left: 10px;
margin: 0px;
list-style: none;
}
ul #menuSideChild, li #menuSideChild {
ul .menuSideChild, li .menuSideChild {
padding-left:10px;
}

View File

@ -14,9 +14,9 @@
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>core/layout/common.css">
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>site/data/theme.css?<?php echo md5_file(self::DATA_DIR.'theme.css'); ?>">
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>site/data/custom.css?<?php echo md5_file(self::DATA_DIR.'custom.css'); ?>">
<?php $layout->showStyle(); ?>
</head>
<body>
<?php $layout->showStyle(); ?>
<?php $layout->showBar(); ?>
<?php $layout->showNotification(); ?>
<?php if($this->getData(['theme', 'menu', 'position']) === 'body-first' || $this->getData(['theme', 'menu', 'position']) === 'top' ): ?>

View File

@ -264,7 +264,7 @@ class install extends common {
'typeMenu' => 'text',
'iconUrl' => '',
'disable' => false,
'content' => '<div class="block"><h4>ZwiiCMS</h4><h3>Le CMS sans base de données à l\'installation simple et rapide</p></h3></div>',
'content' => '<div class="block"><h4>ZwiiCMS</h4><h3>Le CMS sans base de données à l\'installation simple et rapide</h3></div>',
'hideTitle' => false,
'breadCrumb' => false,
'metaDescription' => '',
@ -288,7 +288,7 @@ class install extends common {
'typeMenu' => 'text',
'iconUrl' => '',
'disable' => false,
'content' => '<p></p>',
'content' => '<p>&nbsp;</p>',
'hideTitle' => false,
'breadCrumb' => false,
'metaDescription' => '',

View File

@ -245,7 +245,7 @@ class page extends common {
'typeMenu' => $this->getinput('pageTypeMenu'),
'iconUrl' => $this->getinput('pageIconUrl'),
'disable'=> $this->getinput('pageEditDisable', helper::FILTER_BOOLEAN),
'content' => (empty($this->getInput('pageEditContent', null)) ? "<p></p>" : $this->getInput('pageEditContent', null)) ,
'content' => (empty($this->getInput('pageEditContent', null)) ? '<p>&nbsp;</p>' : $this->getInput('pageEditContent', null)) ,
'hideTitle' => $hideTitle,
'breadCrumb' => $this->getInput('pageEditbreadCrumb', helper::FILTER_BOOLEAN),
'metaDescription' => $this->getInput('pageEditMetaDescription', helper::FILTER_STRING_LONG),

View File

@ -1,4 +1,4 @@
#blogArticlePicture {
.blogArticlePicture {
height: auto;
width: 100%;
background-size: cover;
@ -19,7 +19,7 @@
margin-left: 10px;
}
@media (max-width: 767px) {
#blogArticlePicture {
.blogArticlePicture {
height:auto;
max-width: 100%;}
}

View File

@ -5,8 +5,7 @@
</div>
<?php if ($this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'hidePicture']) == false) {
// echo '<div id="blogArticlePicture" style="background-image:url(' . helper::baseUrl(false) . self::FILE_DIR.'source/' . $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'picture']) . ');"></div>';
echo '<div id="blogArticlePicture"><img id="blogArticlePicture" src="' . helper::baseUrl(false) . self::FILE_DIR.'source/' . $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'picture']) . '"></div>';
echo '<div class="blogArticlePicture"><img class="blogArticlePicture" src="' . helper::baseUrl(false) . self::FILE_DIR.'source/' . $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'picture']) . '"></div>';
} ?>
<?php echo $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'content']); ?>

View File

@ -1,5 +1,5 @@
.blogPicture {
float: center;
float: none;
}
.blogPicture img {
width: 100%;

View File

@ -5,7 +5,7 @@
<div class="row">
<div class="col3">
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>" class="blogPicture">
<img src="<?php echo helper::baseUrl(false) . self::FILE_DIR.'thumb/' . $article['picture']; ?>">
<img src="<?php echo helper::baseUrl(false) . self::FILE_DIR.'thumb/' . $article['picture']; ?>" alt="<?php echo $article['picture']; ?>">
</a>
</div>
<div class="col9">