forked from ZwiiCMS-Team/ZwiiCMS
[9.1.08] validation html
This commit is contained in:
parent
640dafd9da
commit
1b3f54e49b
@ -2030,13 +2030,13 @@ class layout extends common {
|
|||||||
$active = ($childKey === $currentPageId) ? ' class="active"' : '';
|
$active = ($childKey === $currentPageId) ? ' class="active"' : '';
|
||||||
$targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : '';
|
$targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : '';
|
||||||
// Mise en page du sous-item
|
// Mise en page du sous-item
|
||||||
|
$items .= '<li>';
|
||||||
if ( $this->getData(['page',$childKey,'disable']) === true
|
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') ) {
|
||||||
|
$items .= '<a href="'.$this->getUrl(1).'">';
|
||||||
{$items .= '<li><a href="'.$this->getUrl(1).'">';}
|
} else {
|
||||||
else {
|
$items .= '<a href="' . helper::baseUrl() . $childKey . '"' . $active . $targetBlank . '>';
|
||||||
$items .= '<li><a href="' . helper::baseUrl() . $childKey . '"' . $active . $targetBlank . '>'; }
|
}
|
||||||
|
|
||||||
switch ($this->getData(['page', $childKey, 'typeMenu'])) {
|
switch ($this->getData(['page', $childKey, 'typeMenu'])) {
|
||||||
case '' :
|
case '' :
|
||||||
@ -2072,8 +2072,6 @@ class layout extends common {
|
|||||||
$items .= '</a></li>';
|
$items .= '</a></li>';
|
||||||
}
|
}
|
||||||
$items .= '</ul>';
|
$items .= '</ul>';
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
// Lien de connexion
|
// Lien de connexion
|
||||||
if(
|
if(
|
||||||
@ -2114,16 +2112,13 @@ class layout extends common {
|
|||||||
} else {
|
} else {
|
||||||
$filterCurrentPageId = $currentParentPageId;
|
$filterCurrentPageId = $currentParentPageId;
|
||||||
}
|
}
|
||||||
//if ($this->getData(['page',$filterCurrentPageId,'hideTitle']) == false) {
|
} else {
|
||||||
// echo '<h3 id="menuSideTitle"><a href="' . helper::baseUrl() . $currentPageId . '">' . $this->getData(['page',$filterCurrentPageId,'title']) . '</a></h3>';
|
$items .= '<ul class="menuSide">';
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
foreach($this->getHierarchy() as $parentPageId => $childrenPageIds) {
|
foreach($this->getHierarchy() as $parentPageId => $childrenPageIds) {
|
||||||
// Ne pas afficher les entrées masquées
|
// Ne pas afficher les entrées masquées
|
||||||
if ($this->getData(['page',$parentPageId,'hideMenuSide']) === true ||
|
if ($this->getData(['page',$parentPageId,'hideMenuSide']) === true ) {
|
||||||
empty($childrenPageIds) ) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// Filtre actif et nom de la page parente courante différente, on sort de la boucle
|
// 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;
|
// Mise en page de l'item;
|
||||||
// Ne pas afficher le parent d'une sous-page quand l'option est sélectionnée.
|
// Ne pas afficher le parent d'une sous-page quand l'option est sélectionnée.
|
||||||
if ($onlyChildren === false) {
|
if ($onlyChildren === false) {
|
||||||
$items .= '<li>';
|
$items .= '<li class="menuSideChild">';
|
||||||
if ( $this->getData(['page',$parentPageId,'disable']) === true
|
if ( $this->getData(['page',$parentPageId,'disable']) === true
|
||||||
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ) {
|
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ) {
|
||||||
$items .= '<a href="'.$this->getUrl(1).'">';
|
$items .= '<a href="'.$this->getUrl(1).'">';
|
||||||
} else {
|
} else {
|
||||||
$items .= '<a href="' . helper::baseUrl() . $parentPageId . '"' . $active . $targetBlank . '>';
|
$items .= '<a href="' . helper::baseUrl() . $parentPageId . '"' . $active . $targetBlank . '>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$items .= $this->getData(['page', $parentPageId, 'title']);
|
$items .= $this->getData(['page', $parentPageId, 'title']);
|
||||||
// Cas où les pages enfants enfant sont toutes masquées dans le menu
|
$items .= '</a></li>';
|
||||||
// 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">';
|
|
||||||
}
|
}
|
||||||
|
$itemsChildren = '';
|
||||||
foreach($childrenPageIds as $childKey) {
|
foreach($childrenPageIds as $childKey) {
|
||||||
// Passer les entrées masquées
|
// Passer les entrées masquées
|
||||||
if ($this->getData(['page',$childKey,'hideMenuSide']) === true ) {
|
if ($this->getData(['page',$childKey,'hideMenuSide']) === true ) {
|
||||||
@ -2175,24 +2152,30 @@ class layout extends common {
|
|||||||
$active = ($childKey === $currentPageId) ? ' class="active"' : '';
|
$active = ($childKey === $currentPageId) ? ' class="active"' : '';
|
||||||
$targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : '';
|
$targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : '';
|
||||||
// Mise en page du sous-item
|
// Mise en page du sous-item
|
||||||
$items .= '<li>';
|
$itemsChildren .= '<li class="menuSideChild">';
|
||||||
|
|
||||||
if ( $this->getData(['page',$childKey,'disable']) === true
|
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).'">';}
|
$itemsChildren .= $this->getData(['page', $childKey, 'title']);
|
||||||
else {
|
$itemsChildren .= '</a></li>';
|
||||||
$items .= '<a href="' . helper::baseUrl() . $childKey . '"' . $active . $targetBlank . '>'; }
|
}
|
||||||
|
// Concaténe les items enfants
|
||||||
$items .= $this->getData(['page', $childKey, 'title']);
|
if (!empty($itemsChildren)) {
|
||||||
$items .= '</a></li>';
|
$items .= '<ul class="menuSideChild">';
|
||||||
|
$items .= $itemsChildren;
|
||||||
|
$items .= '</ul>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($onlyChildren === false) {
|
if ($onlyChildren === false) {
|
||||||
$items .= '</ul>';
|
$items .= '</ul>';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// Retourne les items du menu
|
// 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
|
// Afficher les barres
|
||||||
$leftItems .= '<optgroup label="Barres latérales">';
|
$leftItems .= '<optgroup label="Barres latérales">';
|
||||||
foreach($this->getHierarchy(null, false,true) as $parentPageId => $childrenPageIds) {
|
foreach($this->getHierarchy(null, false,true) as $parentPageId => $childrenPageIds) {
|
||||||
@ -2307,6 +2291,7 @@ class layout extends common {
|
|||||||
$leftItems .= '<option value="' . helper::baseUrl() . $childKey . '"' . ($childKey === $currentPageId ? ' selected' : false) . '> ' . $this->getData(['page', $childKey, 'title']) . '</option>';
|
$leftItems .= '<option value="' . helper::baseUrl() . $childKey . '"' . ($childKey === $currentPageId ? ' selected' : false) . '> ' . $this->getData(['page', $childKey, 'title']) . '</option>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$leftItems .= '</optgroup>';
|
||||||
$leftItems .= '</select></li>';
|
$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>';
|
$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(
|
if(
|
||||||
@ -2324,7 +2309,6 @@ class layout extends common {
|
|||||||
// Items de droite
|
// Items de droite
|
||||||
$rightItems = '';
|
$rightItems = '';
|
||||||
if($this->getUser('group') >= self::GROUP_MODERATOR) {
|
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>';
|
$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) {
|
if($this->getUser('group') >= self::GROUP_ADMIN) {
|
||||||
@ -2359,7 +2343,7 @@ class layout extends common {
|
|||||||
*/
|
*/
|
||||||
public function showStyle() {
|
public function showStyle() {
|
||||||
if($this->core->output['style']) {
|
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',
|
'ico' => 'check',
|
||||||
'id' => $nameId,
|
'id' => $nameId,
|
||||||
'name' => $nameId,
|
'name' => $nameId,
|
||||||
'uniqueSubmission' => true,
|
'uniqueSubmission' => false, //true avant 9.1.08
|
||||||
'value' => 'Enregistrer'
|
'value' => 'Enregistrer'
|
||||||
], $attributes);
|
], $attributes);
|
||||||
// Retourne le html
|
// Retourne le html
|
||||||
return sprintf(
|
return sprintf(
|
||||||
'<button type="submit" class="%s %s" %s>%s</button>',
|
'<button type="submit" class="%s%s" %s>%s</button>',
|
||||||
$attributes['class'],
|
$attributes['class'],
|
||||||
$attributes['uniqueSubmission'] ? 'uniqueSubmission' : '',
|
$attributes['uniqueSubmission'] ? 'uniqueSubmission' : '',
|
||||||
helper::sprintAttributes($attributes, ['class', 'ico', 'value']),
|
helper::sprintAttributes($attributes, ['class', 'ico', 'value']),
|
||||||
|
@ -520,13 +520,13 @@ nav a:hover {
|
|||||||
|
|
||||||
/* Menu vertical */
|
/* Menu vertical */
|
||||||
|
|
||||||
#menuSide, #menuSideChild {
|
.menuSide, .menuSideChild {
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul #menuSideChild, li #menuSideChild {
|
ul .menuSideChild, li .menuSideChild {
|
||||||
padding-left:10px;
|
padding-left:10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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); ?>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/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'); ?>">
|
<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>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<?php $layout->showStyle(); ?>
|
|
||||||
<?php $layout->showBar(); ?>
|
<?php $layout->showBar(); ?>
|
||||||
<?php $layout->showNotification(); ?>
|
<?php $layout->showNotification(); ?>
|
||||||
<?php if($this->getData(['theme', 'menu', 'position']) === 'body-first' || $this->getData(['theme', 'menu', 'position']) === 'top' ): ?>
|
<?php if($this->getData(['theme', 'menu', 'position']) === 'body-first' || $this->getData(['theme', 'menu', 'position']) === 'top' ): ?>
|
||||||
|
@ -264,7 +264,7 @@ class install extends common {
|
|||||||
'typeMenu' => 'text',
|
'typeMenu' => 'text',
|
||||||
'iconUrl' => '',
|
'iconUrl' => '',
|
||||||
'disable' => false,
|
'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,
|
'hideTitle' => false,
|
||||||
'breadCrumb' => false,
|
'breadCrumb' => false,
|
||||||
'metaDescription' => '',
|
'metaDescription' => '',
|
||||||
@ -288,7 +288,7 @@ class install extends common {
|
|||||||
'typeMenu' => 'text',
|
'typeMenu' => 'text',
|
||||||
'iconUrl' => '',
|
'iconUrl' => '',
|
||||||
'disable' => false,
|
'disable' => false,
|
||||||
'content' => '<p></p>',
|
'content' => '<p> </p>',
|
||||||
'hideTitle' => false,
|
'hideTitle' => false,
|
||||||
'breadCrumb' => false,
|
'breadCrumb' => false,
|
||||||
'metaDescription' => '',
|
'metaDescription' => '',
|
||||||
|
@ -245,7 +245,7 @@ class page extends common {
|
|||||||
'typeMenu' => $this->getinput('pageTypeMenu'),
|
'typeMenu' => $this->getinput('pageTypeMenu'),
|
||||||
'iconUrl' => $this->getinput('pageIconUrl'),
|
'iconUrl' => $this->getinput('pageIconUrl'),
|
||||||
'disable'=> $this->getinput('pageEditDisable', helper::FILTER_BOOLEAN),
|
'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> </p>' : $this->getInput('pageEditContent', null)) ,
|
||||||
'hideTitle' => $hideTitle,
|
'hideTitle' => $hideTitle,
|
||||||
'breadCrumb' => $this->getInput('pageEditbreadCrumb', helper::FILTER_BOOLEAN),
|
'breadCrumb' => $this->getInput('pageEditbreadCrumb', helper::FILTER_BOOLEAN),
|
||||||
'metaDescription' => $this->getInput('pageEditMetaDescription', helper::FILTER_STRING_LONG),
|
'metaDescription' => $this->getInput('pageEditMetaDescription', helper::FILTER_STRING_LONG),
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#blogArticlePicture {
|
.blogArticlePicture {
|
||||||
height: auto;
|
height: auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
@ -19,7 +19,7 @@
|
|||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
@media (max-width: 767px) {
|
@media (max-width: 767px) {
|
||||||
#blogArticlePicture {
|
.blogArticlePicture {
|
||||||
height:auto;
|
height:auto;
|
||||||
max-width: 100%;}
|
max-width: 100%;}
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if ($this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'hidePicture']) == false) {
|
<?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 class="blogArticlePicture"><img class="blogArticlePicture" src="' . 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>';
|
|
||||||
} ?>
|
} ?>
|
||||||
|
|
||||||
<?php echo $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'content']); ?>
|
<?php echo $this->getData(['module', $this->getUrl(0), $this->getUrl(1), 'content']); ?>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
.blogPicture {
|
.blogPicture {
|
||||||
float: center;
|
float: none;
|
||||||
}
|
}
|
||||||
.blogPicture img {
|
.blogPicture img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col3">
|
<div class="col3">
|
||||||
<a href="<?php echo helper::baseUrl() . $this->getUrl(0) . '/' . $articleId; ?>" class="blogPicture">
|
<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>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col9">
|
<div class="col9">
|
||||||
|
Loading…
Reference in New Issue
Block a user