Folder 1.04 option affichage des contrôles

This commit is contained in:
Fred Tempez 2024-03-29 18:37:46 +01:00
parent 4c4d71e211
commit 71bcbbc10f
4 changed files with 40 additions and 20 deletions

View File

@ -1,3 +1,5 @@
1.04
= Option pour masquer ou afficher les boutons de contrôle
1.03
- Boutons pour replier ou déplier les dossiers
1.02

View File

@ -17,7 +17,7 @@
class folder extends common
{
const VERSION = '1.03';
const VERSION = '1.04';
const REALNAME = 'Partage de dossier';
const DATADIRECTORY = ''; // Contenu localisé inclus par défaut (page.json et module.json)
@ -86,6 +86,7 @@ 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),
'expandcontrol' => $this->getInput('folderConfigExpandControl', helper::FILTER_BOOLEAN),
'iconpack' => $this->getInput('folderConfigiconPack'),
'iconsize' => $this->getInput('folderConfigIconSize'),
'target' => $this->getInput('folderConfigTarget'),

View File

@ -34,19 +34,19 @@
</div>
</div>
<div class="row">
<div class="col4">
<div class="col3">
<?php echo template::select('folderConfigiconPack', $module::$iconPack, [
'label' => 'Thème des icônes',
'selected' => $this->getData(['module', $this->getUrl(0), 'iconpack'])
]); ?>
</div>
<div class="col4">
<div class="col3">
<?php echo template::select('folderConfigIconSize', $module::$iconSize, [
'label' => 'Tailledes icones',
'label' => 'Taille des icones',
'selected' => $this->getData(['module', $this->getUrl(0), 'iconsize'])
]); ?>
</div>
<div class="col4">
<div class="col6">
<?php echo template::select('folderConfigTarget', $module::$target, [
'label' => 'Cible des liens',
'selected' => $this->getData(['module', $this->getUrl(0), 'target'])
@ -55,27 +55,32 @@
</div>
<div class="row">
<div class="col6">
<?php echo template::checkbox('folderConfigSort', true, 'Trier les dossiers et les fichiers', [
<?php echo template::checkbox('folderConfigSort', true, 'Trier', [
'checked' => $this->getData(['module', $this->getUrl(0), 'sort'])
]); ?>
</div>
<div class="col6">
<?php echo template::checkbox('folderConfigSubfolder', true, 'Descendre dans l\'arboresence', [
<?php echo template::checkbox('folderConfigSubfolder', true, 'Toute l\'arboresence', [
'checked' => $this->getData(['module', $this->getUrl(0), 'subfolder'])
]); ?>
</div>
</div>
<div class="row">
<div class="col6">
<?php echo template::checkbox('folderConfigDetails', true, 'Date et poids', [
<div class="col4">
<?php echo template::checkbox('folderConfigDetails', true, 'Information des fichiers', [
'checked' => $this->getData(['module', $this->getUrl(0), 'details'])
]); ?>
</div>
<div class="col6">
<?php echo template::checkbox('folderConfigFolderState', true, 'Dossiers pliés', [
<div class="col4">
<?php echo template::checkbox('folderConfigFolderState', true, 'Dossiers repliés', [
'checked' => $this->getData(['module', $this->getUrl(0), 'folderstate'])
]); ?>
</div>
<div class="col4">
<?php echo template::checkbox('folderConfigExpandControl', true, 'Icônes de contrôles ', [
'checked' => $this->getData(['module', $this->getUrl(0), 'expandcontrol'])
]); ?>
</div>
</div>
</div>
</div>

View File

@ -1,14 +1,26 @@
<div id="dirindex">
<article>
<div class="titlecontainer">
<div class="titletag">
<h2><?php echo $this->getData(['module', $this->getUrl(0), 'title']);?></h2>
<?php if ($this->getData(['module', $this->getUrl(0), 'expandcontrol']) === true): ?>
<div class="titlecontainer">
<div class="titletag">
<h2>
<?php echo $this->getData(['module', $this->getUrl(0), 'title']); ?>
</h2>
</div>
<div class="titleicons">
<span id="expand">
<?php echo template::ico('plus', ['margin' => 'all']) ?>
</span>
<span id="collapse">
<?php echo template::ico('minus', ['margin' => 'all']) ?>
</span>
</div>
</div>
<div class="titleicons">
<span id="expand"><?php echo template::ico('plus', ['margin' => 'all'])?></span>
<span id="collapse"><?php echo template::ico('minus', ['margin' => 'all'])?></span>
</div>
</div>
<?php else: ?>
<h2>
<?php echo $this->getData(['module', $this->getUrl(0), 'title']); ?>
</h2>
<?php endif; ?>
<?php echo $module::$folders; ?>
</article>
</div>
</div>