Option d'affichage du sélecteur d'espaces

This commit is contained in:
Fred Tempez 2024-01-19 14:37:03 +01:00
parent 3e8da80e92
commit 489f3b0da6
4 changed files with 138 additions and 111 deletions

View File

@ -504,10 +504,14 @@ class layout extends common
]) .
'</li>';
}
// Commandes pour les membres simples
/**
* Commandes pour les membres simples
* Affichage du sélecteur d'espaces
*/
if (
$this->getUser('group') === self::GROUP_MEMBER
&& $this->getData(['theme', 'menu', 'memberBar']) === true
&& $this->getData(['theme', 'menu', 'selectSpace']) === true
) {
if ($this->getCoursesByUser($this->getUser('id'), $this->getUser('group'))) {
$itemsRight .= '<li><select id="barSelectCourse" >';
@ -517,6 +521,16 @@ class layout extends common
}
$itemsRight .= '</select></li>';
}
}
/**
* Commandes pour les membres simples
* Affichage des boutons gestionnaire de fichiers et mon compte
*/
if (
$this->getUser('group') === self::GROUP_MEMBER
&& $this->getData(['theme', 'menu', 'memberBar']) === true
) {
if (
($this->getUser('group') >= self::GROUP_MEMBER &&
$this->getUser('permission', 'filemanager') === true)

View File

@ -835,7 +835,8 @@ class init extends common
'activeColor' => 'rgba(255, 255, 255, 1)',
'activeTextColor' => 'rgba(255, 255, 255, 1)',
'radius' => '0px',
'memberBar' => false,
'memberBar' => true,
'selectSpace' => true,
'burgerLogo' => '',
'burgerContent' => 'title',
'width' => 'container'

View File

@ -594,6 +594,7 @@ class theme extends common
'radius' => $this->getInput('themeMenuRadius'),
'burgerTitle' => $this->getInput('themeMenuBurgerTitle', helper::FILTER_BOOLEAN),
'memberBar' => $this->getInput('themeMenuMemberBar', helper::FILTER_BOOLEAN),
'selectSpace' => $this->getInput('themeMenuSelectSpace', helper::FILTER_BOOLEAN),
'burgerLogo' => $this->getInput('themeMenuBurgerLogo'),
'burgerContent' => $this->getInput('themeMenuBurgerContent')
]

View File

@ -22,7 +22,8 @@
<div class="row">
<div class="col12">
<div class="block">
<h4><?php echo helper::translate('Paramètres'); ?>
<h4>
<?php echo helper::translate('Paramètres'); ?>
</h4>
<div class="row">
<div class="col6">
@ -84,7 +85,8 @@
<div class="row">
<div class="col12">
<div class="block">
<h4><?php echo helper::translate('Contenu'); ?>
<h4>
<?php echo helper::translate('Contenu'); ?>
</h4>
<div class="row">
<div class="col3">
@ -92,20 +94,27 @@
'checked' => $this->getData(['theme', 'menu', 'loginLink'])
]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('themeMenuSelectSpace', true, 'Sélecteur d\'espaces', [
'checked' => $this->getData(['theme', 'menu', 'selectSpace']),
]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('themeMenuMemberBar', true, 'Barre de membre', [
'checked' => $this->getData(['theme', 'menu', 'memberBar']),
]); ?>
</div>
</div>
<div class="row">
<div class="col6">
<?php echo template::select('themeMenuBurgerContent', $module::$burgerContent, [
'label' => 'Menu burger dans écran réduit',
'selected' => $this->getData(['theme', 'menu', 'burgerContent']),
]); ?>
</div>
</div>
<div class="row">
<div id="themeMenuBurgerLogoId" class="col6 offset6 <?php if ($this->getData(['theme', 'menu', 'burgerContent']) !== 'logo') echo 'displayNone'; ?>">
<div class="col6" id="themeMenuBurgerLogoId"
class="<?php if ($this->getData(['theme', 'menu', 'burgerContent']) !== 'logo')
echo 'displayNone'; ?>">
<?php $imageFile = file_exists(self::FILE_DIR . 'source/' . $this->getData(['theme', 'menu', 'burgerLogo'])) ? $this->getData(['theme', 'menu', 'burgerLogo']) : ""; ?>
<?php echo template::file('themeMenuBurgerLogo', [
'help' => 'Sélectionner une image de dimensions adaptées',
@ -119,11 +128,12 @@
</div>
</div>
</div>
</div>
<div class="row">
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4><?php echo helper::translate('Couleurs'); ?>
<h4>
<?php echo helper::translate('Couleurs'); ?>
</h4>
<div class="row">
<div class="col4">
@ -177,11 +187,12 @@
</div>
</div>
</div>
</div>
<div class="row">
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4><?php echo helper::translate('Mise en forme du texte'); ?>
<h4>
<?php echo helper::translate('Mise en forme du texte'); ?>
</h4>
<div class="row">
<div class="col3">
@ -213,5 +224,5 @@
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>
</div>
<?php echo template::formClose(); ?>