diff --git a/module/folder/folder.php b/module/folder/folder.php index 92642dde..467cce62 100644 --- a/module/folder/folder.php +++ b/module/folder/folder.php @@ -17,7 +17,7 @@ class folder extends common { - const VERSION = '0.1'; + const VERSION = '1.0'; const REALNAME = 'Partage de dossier'; const DATADIRECTORY = ''; // Contenu localisé inclus par défaut (page.json et module.json) @@ -34,11 +34,17 @@ class folder extends common ]; public static $iconPack = [ - 'classic' => 'Classique', - 'high-contrast' => 'Contraste élevé', - 'square' => 'Carré', - 'vivid' => 'Vivid' + 'cla' => 'Classique', + 'hct' => 'Contraste élevé', + 'sqo' => 'Carré', + 'viv' => 'Vivid' ]; + public static $iconSize = [ + 'md' => 'Standard', + 'lg' => 'Moyenne', + 'xl' => 'Grande' + ]; + public function index() { @@ -48,6 +54,8 @@ class folder extends common $config['sort'] = $this->getData(['module', $this->getUrl(0), 'sort']); $config['showdetails'] = $this->getData(['module', $this->getUrl(0), 'details']); $config['initialfolderstate'] = $this->getData(['module', $this->getUrl(0), 'folderstate']); + $config['iconpack'] = $this->getData(['module', $this->getUrl(0), 'iconpack']); + $config['iconsize'] = $this->getData(['module', $this->getUrl(0), 'iconsize']); // Générer l'affichage self::$folders = $this->getFolderContent($this->getData(['module', $this->getUrl(0), 'path']), $config); @@ -79,6 +87,8 @@ class folder extends common 'folder' => $this->getInput('folderConfigFolder', helper::FILTER_BOOLEAN), 'details' => $this->getInput('folderConfigDetails', helper::FILTER_BOOLEAN), 'folderstate' => $this->getInput('folderConfigFolderState', helper::FILTER_BOOLEAN), + 'iconpack' => $this->getInput('folderConfigiconPack'), + 'iconsize' => $this->getInput('folderConfigIconSize'), ] ]); @@ -106,6 +116,8 @@ class folder extends common $sort = isset ($config['sort']) ? $config['sort'] : true; $showDetails = isset ($config['showdetails']) ? $config['showdetails'] : false; $initialFolderState = isset ($config['initialfolderstate']) ? $config['initialfolderstate'] : 'collapsed'; + $iconPack = isset ($config['iconpack']) || !empty($config['iconpack']) ? $config['iconpack'] : 'classic'; + $iconSize = isset ($config['iconsize']) || !empty($config['iconsize']) ? $config['iconsize'] : 'md'; // Vérifier si le chemin existe et est un dossier if (is_dir($chemin)) { @@ -152,7 +164,7 @@ class folder extends common if ($initialFolderState == 'collapsed') { $folderClass = 'collapsible'; } - $items .= '
  • ' . $subDirectory . '