1.4.09 Ajoute sélecteur d'espace dans la barre de membre

This commit is contained in:
Fred Tempez 2024-01-18 15:19:14 +01:00
parent 4387dcda7a
commit 3c6d1480ad
3 changed files with 22 additions and 2 deletions

View File

@ -509,6 +509,14 @@ class layout extends common
$this->getUser('group') === self::GROUP_MEMBER
&& $this->getData(['theme', 'menu', 'memberBar']) === true
) {
if ($this->getCoursesByUser($this->getUser('id'), $this->getUser('group'))) {
$itemsRight .= '<li><select id="barSelectCourse" >';
$itemsRight .= '<option name="' . helper::translate('Accueil') . '" value="' . helper::baseUrl(true) . 'course/swap/home" ' . ('home' === self::$siteContent ? 'selected' : '') . '>' . helper::translate('Accueil') . '</option>';
foreach ($this->getCoursesByUser($this->getUser('id'), $this->getUser('group')) as $courseId => $value) {
$itemsRight .= '<option name="' . $this->getData(['course', $courseId, 'title']) . '" value="' . helper::baseUrl(true) . 'course/swap/' . $courseId . '" ' . ($courseId === self::$siteContent ? 'selected' : '') . '>' . $this->getData(['course', $courseId, 'title']) . '</option>';
}
$itemsRight .= '</select></li>';
}
if (
($this->getUser('group') >= self::GROUP_MEMBER &&
$this->getUser('permission', 'filemanager') === true)

View File

@ -50,7 +50,7 @@ class common
const ACCESS_TIMER = 1800;
// Numéro de version
const ZWII_VERSION = '1.4.08';
const ZWII_VERSION = '1.4.09';
// URL autoupdate
const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/campus-update/raw/branch/master/';
@ -1439,7 +1439,7 @@ class common
case self::GROUP_VISITOR:
foreach ($c as $courseId => $value) {
$students = $this->getData(['enrolment', $courseId]);
if (is_array($students[$userId]) === false) {
if (isset($students[$userId]) === false) {
unset($c[$courseId]);
}
}

View File

@ -604,6 +604,18 @@ nav li ul li {
text-align: left;
}
nav li ul #barSelectCourse {
text-align: left;
}
nav #barSelectCourse {
width: 150px;
border: 0;
color: #111112;
font-size: 1em;
background-color: rgba(255, 255, 255, 1);
padding: 8px;
margin-top: 5px;
}
/*
nav .navSub a{