Merge branch '10303' into 10400 barre de membre

This commit is contained in:
Fred Tempez 2020-10-14 09:50:50 +02:00
commit 1749b1265f
15 changed files with 88 additions and 55 deletions

View File

@ -16,6 +16,9 @@
## version 10.3.03
- Correction :
- Doublons de lignes.
- Modifications :
- Configuration des captcha. Addition simple chiffres de 0 à 9.
- Une icône remplace le terme Connexion dans le menu et dans le pied de page.
## version 10.3.02
- Corrections :

View File

@ -2284,9 +2284,9 @@ class layout extends common {
) {
$items .= '<span id="footerLoginLink" ' .
($this->getUrl(0) === 'theme' ? 'class="displayNone"' : '') .
'><wbr>&nbsp;|&nbsp;<a href="' . helper::baseUrl() . 'user/login/' .
'><wbr>&nbsp;<a href="' . helper::baseUrl() . 'user/login/' .
strip_tags(str_replace('/', '_', $this->getUrl())) .
'" data-tippy-content="Connexion à l\'administration" rel="nofollow">Connexion</a></span>';
'" data-tippy-content="Connexion à l\'administration" rel="nofollow">' . template::ico('login') .'</a></span>';
}
// Affichage de la barre de membre simple
if ( $this->getUser('group') === self::GROUP_MEMBER
@ -2387,7 +2387,7 @@ class layout extends common {
*/
public function showMenu() {
// Met en forme les items du menu
$items = '';
$itemsLeft = '';
$currentPageId = $this->getData(['page', $this->getUrl(0)]) ? $this->getUrl(0) : $this->getUrl(2);
foreach($this->getHierarchy() as $parentPageId => $childrenPageIds) {
// Passer les entrées masquées
@ -2395,36 +2395,36 @@ class layout extends common {
$active = ($parentPageId === $currentPageId OR in_array($currentPageId, $childrenPageIds)) ? 'active ' : '';
$targetBlank = $this->getData(['page', $parentPageId, 'targetBlank']) ? ' target="_blank"' : '';
// Mise en page de l'item
$items .= '<li>';
$itemsLeft .= '<li>';
if ( $this->getData(['page',$parentPageId,'disable']) === true
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') )
{$items .= '<a class="' . $parentPageId . '" href="'.$this->getUrl(1).'">';
{$itemsLeft .= '<a class="' . $parentPageId . '" href="'.$this->getUrl(1).'">';
} else {
$items .= '<a class="' . $active . $parentPageId . '" href="' . helper::baseUrl() . $parentPageId . '"' . $targetBlank . '>';
$itemsLeft .= '<a class="' . $active . $parentPageId . '" href="' . helper::baseUrl() . $parentPageId . '"' . $targetBlank . '>';
}
switch ($this->getData(['page', $parentPageId, 'typeMenu'])) {
case '' :
$items .= $this->getData(['page', $parentPageId, 'title']);
$itemsLeft .= $this->getData(['page', $parentPageId, 'title']);
break;
case 'text' :
$items .= $this->getData(['page', $parentPageId, 'title']);
$itemsLeft .= $this->getData(['page', $parentPageId, 'title']);
break;
case 'icon' :
if ($this->getData(['page', $parentPageId, 'iconUrl']) != "") {
$items .= '<img alt="'.$this->getData(['page', $parentPageId, 'title']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $parentPageId, 'iconUrl']).'" />';
$itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'title']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $parentPageId, 'iconUrl']).'" />';
} else {
$items .= $this->getData(['page', $parentPageId, 'title']);
$itemsLeft .= $this->getData(['page', $parentPageId, 'title']);
}
break;
case 'icontitle' :
if ($this->getData(['page', $parentPageId, 'iconUrl']) != "") {
$items .= '<img alt="'.$this->getData(['page', $parentPageId, 'title']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $parentPageId, 'iconUrl']).'" data-tippy-content="';
$items .= $this->getData(['page', $parentPageId, 'title']).'"/>';
$itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'title']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $parentPageId, 'iconUrl']).'" data-tippy-content="';
$itemsLeft .= $this->getData(['page', $parentPageId, 'title']).'"/>';
} else {
$items .= $this->getData(['page', $parentPageId, 'title']);
$itemsLeft .= $this->getData(['page', $parentPageId, 'title']);
}
break;
}
@ -2437,64 +2437,65 @@ class layout extends common {
}
if($childrenPageIds && $disableChild !== $totalChild &&
$this->getdata(['page',$parentPageId,'hideMenuChildren']) === false) {
$items .= template::ico('down', 'left');
$itemsLeft .= template::ico('down', 'left');
}
// ------------------------------------------------
$items .= '</a>';
$itemsLeft .= '</a>';
if ($this->getdata(['page',$parentPageId,'hideMenuChildren']) === true ||
empty($childrenPageIds)) {
continue;
}
$items .= '<ul class="navLevel2">';
$itemsLeft .= '<ul class="navLevel2">';
foreach($childrenPageIds as $childKey) {
// Propriétés de l'item
$active = ($childKey === $currentPageId) ? 'active ' : '';
$targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : '';
// Mise en page du sous-item
$items .= '<li>';
$itemsLeft .= '<li>';
if ( $this->getData(['page',$childKey,'disable']) === true
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ) {
$items .= '<a class="' . $parentPageId . '" href="'.$this->getUrl(1).'">';
$itemsLeft .= '<a class="' . $parentPageId . '" href="'.$this->getUrl(1).'">';
} else {
$items .= '<a class="' . $active . $parentPageId . '" href="' . helper::baseUrl() . $childKey . '"' . $targetBlank . '>';
$itemsLeft .= '<a class="' . $active . $parentPageId . '" href="' . helper::baseUrl() . $childKey . '"' . $targetBlank . '>';
}
switch ($this->getData(['page', $childKey, 'typeMenu'])) {
case '' :
$items .= $this->getData(['page', $childKey, 'title']);
$itemsLeft .= $this->getData(['page', $childKey, 'title']);
break;
case 'text' :
$items .= $this->getData(['page', $childKey, 'title']);
$itemsLeft .= $this->getData(['page', $childKey, 'title']);
break;
case 'icon' :
if ($this->getData(['page', $childKey, 'iconUrl']) != "") {
$items .= '<img alt="'.$this->getData(['page', $parentPageId, 'title']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $childKey, 'iconUrl']).'" />';
$itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'title']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $childKey, 'iconUrl']).'" />';
} else {
$items .= $this->getData(['page', $parentPageId, 'title']);
$itemsLeft .= $this->getData(['page', $parentPageId, 'title']);
}
break;
case 'icontitle' :
if ($this->getData(['page', $childKey, 'iconUrl']) != "") {
$items .= '<img alt="'.$this->getData(['page', $parentPageId, 'title']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $childKey, 'iconUrl']).'" data-tippy-content="';
$items .= $this->getData(['page', $childKey, 'title']).'"/>';
$itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'title']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $childKey, 'iconUrl']).'" data-tippy-content="';
$itemsLeft .= $this->getData(['page', $childKey, 'title']).'"/>';
} else {
$items .= $this->getData(['page', $childKey, 'title']);
$itemsLeft .= $this->getData(['page', $childKey, 'title']);
}
break;
case 'icontext' :
if ($this->getData(['page', $childKey, 'iconUrl']) != "") {
$items .= '<img alt="'.$this->getData(['page', $parentPageId, 'title']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $childKey, 'iconUrl']).'" />';
$items .= $this->getData(['page', $childKey, 'title']);
$itemsLeft .= '<img alt="'.$this->getData(['page', $parentPageId, 'title']).'" src="'. helper::baseUrl(false) .self::FILE_DIR.'source/'.$this->getData(['page', $childKey, 'iconUrl']).'" />';
$itemsLeft .= $this->getData(['page', $childKey, 'title']);
} else {
$items .= $this->getData(['page', $childKey, 'title']);
$itemsLeft .= $this->getData(['page', $childKey, 'title']);
}
break;
}
$items .= '</a></li>';
$itemsLeft .= '</a></li>';
}
$items .= '</ul>';
$itemsLeft .= '</ul>';
}
// Lien de connexion
$itemsRight = '';
if(
(
$this->getData(['theme', 'menu', 'loginLink'])
@ -2502,11 +2503,11 @@ class layout extends common {
)
OR $this->getUrl(0) === 'theme'
) {
$items .= '<li id="menuLoginLink" ' .
$itemsRight .= '<li id="menuLoginLink" ' .
($this->getUrl(0) === 'theme' ? 'class="displayNone"' : '') .
'><a href="' . helper::baseUrl() . 'user/login/' .
strip_tags(str_replace('/', '_', $this->getUrl())) .
'">Connexion</a></li>';
'">' . template::ico('login') .'</a></li>';
}
// Commandes pour les membres simples
if($this->getUser('group') == self::GROUP_MEMBER
@ -2514,11 +2515,11 @@ class layout extends common {
|| $this->getData(['theme','footer','displayMemberBar']) === false
)
) {
$items .= '<li><a href="' . helper::baseUrl() . 'user/edit/' . $this->getUser('id'). '/' . $_SESSION['csrf'] . '" data-tippy-content="Gérer mon compte">' . template::ico('user', 'right') . '</a></li>';
$items .= '<li><a id="barLogout" href="' . helper::baseUrl() . 'user/logout" data-tippy-content="Me déconnecter">' . template::ico('logout') . '</a></li>';
$itemsRight .= '<li><a href="' . helper::baseUrl() . 'user/edit/' . $this->getUser('id'). '/' . $_SESSION['csrf'] . '" data-tippy-content="Gérer mon compte">' . template::ico('user', 'right') . '</a></li>';
$itemsRight .= '<li><a id="barLogout" href="' . helper::baseUrl() . 'user/logout" data-tippy-content="Me déconnecter">' . template::ico('logout') . '</a></li>';
}
// Retourne les items du menu
echo '<ul class="navLevel1">' . $items . '</ul>';
echo '<ul class="navLevel1" id="menuLeft">' . $itemsLeft . '</ul><ul class="navLevel1" id="menuRight">' . $itemsRight . '</ul>';
}
/**

View File

@ -521,6 +521,27 @@ nav a {
nav a:hover {
text-decoration: none;
}
nav #menuLeft {
display: flex;
float: left;
}
nav #menuRight {
display: flex;
float: right;
}
/* fin barre de menu */
nav::after {
content: " ";
clear: both;
display: flex;
}
nav::before {
content: " ";
clear: left;
display: flex;
}
@media (min-width: 768px) {
nav #menu {
display: block;

View File

@ -99,6 +99,12 @@
'checked' => $this->getData(['config', 'cookieConsent'])
]); ?>
</div>
<div class="col4 verticalAlignBottom">
<?php echo template::checkbox('configConnectCaptcha10', true, 'Captcha simple', [
'checked' => $this->getData(['config', 'connect','captcha10']),
'help' => 'Addition limitée aux chiffres de 0 à 9. S\'applique à tous les captchas du site.'
]); ?>
</div>
</div>
<div class="row">
<div class="col4">
@ -396,11 +402,6 @@
'checked' => $this->getData(['config', 'connect','captcha'])
]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('configConnectCaptcha10', true, 'Limité à 10 chiffres', [
'checked' => $this->getData(['config', 'connect','captcha10'])
]); ?>
</div>
</div>
</div>
</div>

View File

@ -30,6 +30,7 @@
.zwiico-trash:before { content: '\e81c'; } /* '' */
.zwiico-plus-circled:before { content: '\e81d'; } /* '' */
.zwiico-minus-circled:before { content: '\e81e'; } /* '' */
.zwiico-login:before { content: '\e81f'; } /* '' */
.zwiico-down-big:before { content: '\e820'; } /* '' */
.zwiico-up-big:before { content: '\e821'; } /* '' */
.zwiico-spin:before { content: '\e831'; } /* '' */

File diff suppressed because one or more lines are too long

View File

@ -30,6 +30,7 @@
.zwiico-trash { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81c;&nbsp;'); }
.zwiico-plus-circled { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81d;&nbsp;'); }
.zwiico-minus-circled { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81e;&nbsp;'); }
.zwiico-login { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81f;&nbsp;'); }
.zwiico-down-big { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe820;&nbsp;'); }
.zwiico-up-big { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe821;&nbsp;'); }
.zwiico-spin { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe831;&nbsp;'); }

View File

@ -41,6 +41,7 @@
.zwiico-trash { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81c;&nbsp;'); }
.zwiico-plus-circled { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81d;&nbsp;'); }
.zwiico-minus-circled { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81e;&nbsp;'); }
.zwiico-login { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe81f;&nbsp;'); }
.zwiico-down-big { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe820;&nbsp;'); }
.zwiico-up-big { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe821;&nbsp;'); }
.zwiico-spin { *zoom: expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '&#xe831;&nbsp;'); }

View File

@ -1,11 +1,11 @@
@font-face {
font-family: 'zwiico';
src: url('../font/zwiico.eot?40040077');
src: url('../font/zwiico.eot?40040077#iefix') format('embedded-opentype'),
url('../font/zwiico.woff2?40040077') format('woff2'),
url('../font/zwiico.woff?40040077') format('woff'),
url('../font/zwiico.ttf?40040077') format('truetype'),
url('../font/zwiico.svg?40040077#zwiico') format('svg');
src: url('../font/zwiico.eot?21777250');
src: url('../font/zwiico.eot?21777250#iefix') format('embedded-opentype'),
url('../font/zwiico.woff2?21777250') format('woff2'),
url('../font/zwiico.woff?21777250') format('woff'),
url('../font/zwiico.ttf?21777250') format('truetype'),
url('../font/zwiico.svg?21777250#zwiico') format('svg');
font-weight: normal;
font-style: normal;
}
@ -15,7 +15,7 @@
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: 'zwiico';
src: url('../font/zwiico.svg?40040077#zwiico') format('svg');
src: url('../font/zwiico.svg?21777250#zwiico') format('svg');
}
}
*/
@ -86,6 +86,7 @@
.zwiico-trash:before { content: '\e81c'; } /* '' */
.zwiico-plus-circled:before { content: '\e81d'; } /* '' */
.zwiico-minus-circled:before { content: '\e81e'; } /* '' */
.zwiico-login:before { content: '\e81f'; } /* '' */
.zwiico-down-big:before { content: '\e820'; } /* '' */
.zwiico-up-big:before { content: '\e821'; } /* '' */
.zwiico-spin:before { content: '\e831'; } /* '' */

Binary file not shown.

View File

@ -68,6 +68,8 @@
<glyph glyph-name="minus-circled" unicode="&#xe81e;" d="M420 770q174 0 297-123t123-297-123-297-297-123-297 123-123 297 123 297 297 123z m252-368l-504 0 0-102 504 0 0 102z" horiz-adv-x="840" />
<glyph glyph-name="login" unicode="&#xe81f;" d="M661 350q0-14-11-25l-303-304q-11-10-26-10t-25 10-10 25v161h-250q-15 0-25 11t-11 25v214q0 15 11 25t25 11h250v161q0 14 10 25t25 10 26-10l303-304q11-10 11-25z m196 196v-392q0-67-47-114t-114-47h-178q-7 0-13 5t-5 13q0 2-1 11t0 15 2 13 5 11 12 3h178q37 0 64 27t26 63v392q0 37-26 64t-64 26h-174t-6 0-6 2-5 3-4 5-1 8q0 2-1 11t0 15 2 13 5 11 12 3h178q67 0 114-47t47-114z" horiz-adv-x="857.1" />
<glyph glyph-name="down-big" unicode="&#xe820;" d="M899 386q0-30-21-50l-363-364q-22-21-51-21-29 0-50 21l-363 364q-21 20-21 50 0 29 21 51l41 41q22 21 51 21 29 0 50-21l164-164v393q0 29 21 50t51 22h71q29 0 50-22t21-50v-393l165 164q20 21 50 21 29 0 51-21l41-41q21-22 21-51z" horiz-adv-x="928.6" />
<glyph glyph-name="up-big" unicode="&#xe821;" d="M899 308q0-28-21-50l-41-42q-22-21-51-21-30 0-50 21l-165 164v-393q0-29-20-47t-51-19h-71q-30 0-51 19t-21 47v393l-164-164q-20-21-50-21t-50 21l-42 42q-21 21-21 50 0 30 21 51l363 363q20 21 50 21 30 0 51-21l363-363q21-22 21-51z" horiz-adv-x="928.6" />

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -23,7 +23,7 @@ if(version_compare(PHP_VERSION, '5.6.0', '<')) {
/* Set locale to French */
date_default_timezone_set('Europe/Paris');
setlocale (LC_TIME, 'fr_FR.utf8','fra');
setlocale (LC_ALL, 'fr_FR.utf8','fra');
/**
* Initialisation de Zwii