Permission : liste de modules non fixes
This commit is contained in:
parent
2e81467326
commit
6ac06f669b
@ -69,6 +69,8 @@ class user extends common
|
||||
self::GROUP_EDITOR => 'Editeur'
|
||||
];
|
||||
|
||||
public static $listModules = [];
|
||||
|
||||
/**
|
||||
* Ajout
|
||||
*/
|
||||
@ -616,11 +618,16 @@ class user extends common
|
||||
]);
|
||||
}
|
||||
|
||||
// Chemin vers les dossiers du gestionnaire de fichier
|
||||
self::$sharePath = $this->getSubdirectories('./site/file/source');
|
||||
self::$sharePath = array_flip(self::$sharePath);
|
||||
self::$sharePath = array_merge(['./site/file/source/' => 'Tous les dossiers'], self::$sharePath);
|
||||
self::$sharePath = array_merge([null => 'Aucun dossier'], self::$sharePath);
|
||||
|
||||
// Liste des modules installés
|
||||
self::$listModules = helper::getModules();
|
||||
self::$listModules = array_keys(self::$listModules);
|
||||
sort(self::$listModules);
|
||||
// Valeurs en sortie;
|
||||
$this->addOutput([
|
||||
'title' => sprintf(helper::translate('Édition du profil %s'), $this->getData(['profil', $this->getUrl(2), $this->getUrl(3), 'name'])),
|
||||
@ -712,11 +719,17 @@ class user extends common
|
||||
]);
|
||||
}
|
||||
|
||||
// Chemin vers les dossiers du gestionnaire de fichier
|
||||
self::$sharePath = $this->getSubdirectories('./site/file/source');
|
||||
self::$sharePath = array_flip(self::$sharePath);
|
||||
self::$sharePath = array_merge(['./site/file/source/' => 'Tous les dossiers'], self::$sharePath);
|
||||
self::$sharePath = array_merge([null => 'Aucun dossier'], self::$sharePath);
|
||||
|
||||
// Liste des modules installés
|
||||
self::$listModules = helper::getModules();
|
||||
self::$listModules = array_keys(self::$listModules);
|
||||
sort(self::$listModules);
|
||||
|
||||
// Valeurs en sortie;
|
||||
$this->addOutput([
|
||||
'title' => "Ajouter un profil",
|
||||
|
@ -79,24 +79,12 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="containerModule">
|
||||
<?php if (file_exists('module/blog/profil/view/add.inc.php')) {
|
||||
include('module/blog/profil/view/add.inc.php');
|
||||
} ?>
|
||||
<?php if (file_exists('module/news/profil/view/add.inc.php')) {
|
||||
include('module/news/profil/view/add.inc.php');
|
||||
} ?>
|
||||
<?php if (file_exists('module/gallery/profil/view/add.inc.php')) {
|
||||
include('module/gallery/profil/view/add.inc.php');
|
||||
} ?>
|
||||
<?php if (file_exists('module/form/profil/view/add.inc.php')) {
|
||||
include('module/form/profil/view/add.inc.php');
|
||||
} ?>
|
||||
<?php if (file_exists('module/redirection/profil/view/add.inc.php')) {
|
||||
include('module/redirection/profil/view/add.inc.php');
|
||||
} ?>
|
||||
<?php if (file_exists('module/search/profil/view/add.inc.php')) {
|
||||
include('module/search/profil/view/add.inc.php');
|
||||
} ?>
|
||||
<?php foreach (user::$listModules as $moduleId): ?>
|
||||
<?php echo $moduleId;
|
||||
if (file_exists('module/' . $moduleId . '/profil/view/add.inc.php')) {
|
||||
include('module/' . $moduleId . '/profil/view/add.inc.php');
|
||||
} ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col12">
|
||||
|
@ -101,24 +101,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="containerModule">
|
||||
<?php if (file_exists('module/blog/profil/view/edit.inc.php')) {
|
||||
include('module/blog/profil/view/edit.inc.php');
|
||||
} ?>
|
||||
<?php if (file_exists('module/news/profil/view/edit.inc.php')) {
|
||||
include('module/news/profil/view/edit.inc.php');
|
||||
} ?>
|
||||
<?php if (file_exists('module/gallery/profil/view/edit.inc.php')) {
|
||||
include('module/gallery/profil/view/edit.inc.php');
|
||||
} ?>
|
||||
<?php if (file_exists('module/form/profil/view/edit.inc.php')) {
|
||||
include('module/form/profil/view/edit.inc.php');
|
||||
} ?>
|
||||
<?php if (file_exists('module/redirection/profil/view/edit.inc.php')) {
|
||||
include('module/redirection/profil/view/edit.inc.php');
|
||||
} ?>
|
||||
<?php if (file_exists('module/search/profil/view/edit.inc.php')) {
|
||||
include('module/search/profil/view/edit.inc.php');
|
||||
} ?>
|
||||
<?php foreach (user::$listModules as $moduleId): ?>
|
||||
<?php if (file_exists('module/' . $moduleId . '/profil/view/edit.inc.php')) {
|
||||
include('module/' . $moduleId . '/profil/view/edit.inc.php');
|
||||
} ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="row">
|
||||
|
Loading…
Reference in New Issue
Block a user