download 4.2 le template file affiche le dossier du fichier ou de l'image sélectionnée

This commit is contained in:
Fred Tempez 2024-09-05 10:32:08 +02:00
parent 201a5bba8d
commit 6a46dd3b0d
4 changed files with 303 additions and 297 deletions

View File

@ -1,3 +1,5 @@
# Version 4.2
- Le sélecteur de fichier affiche par défaut le chemin vers le fichier présent dans le champ.
# Version 4.1 # Version 4.1
- Correction fonction signature dans core.php - Correction fonction signature dans core.php
# Version 4.0 # Version 4.0

View File

@ -15,7 +15,7 @@
class download extends common class download extends common
{ {
const VERSION = '4.1'; const VERSION = '4.2';
const REALNAME = 'Téléchargement'; const REALNAME = 'Téléchargement';
const DELETE = true; const DELETE = true;
const UPDATE = '0.0'; const UPDATE = '0.0';

View File

@ -77,7 +77,7 @@
<?php echo template::file('downloadAddThumb', [ <?php echo template::file('downloadAddThumb', [
'label' => 'Capture d\'écran', 'label' => 'Capture d\'écran',
'language' => $this->getData(['user', $this->getUser('id'), 'language']), 'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'type' => 1 'type' => 1,
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -94,7 +94,8 @@
<?php echo template::file('downloadAddFile', [ <?php echo template::file('downloadAddFile', [
'label' => 'Fichier', 'label' => 'Fichier',
'language' => $this->getData(['user', $this->getUser('id'), 'language']), 'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'value' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'file']) 'value' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'file']),
'folder' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'file']) ? dirname($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'file'])) : ''
]); ?> ]); ?>
</div> </div>
<div class="col12"> <div class="col12">
@ -188,4 +189,5 @@
</div> </div>
</div> </div>
</div> </div>
</div>
<?php echo template::formClose(); ?> <?php echo template::formClose(); ?>

View File

@ -92,7 +92,8 @@
'label' => 'Capture d\'écran', 'label' => 'Capture d\'écran',
'language' => $this->getData(['user', $this->getUser('id'), 'language']), 'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'type' => 1, 'type' => 1,
'value' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'thumb']) 'value' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'thumb']),
'folder' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'thumb']) ? dirname($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'thumb'])) : ''
]); ?> ]); ?>
</div> </div>
</div> </div>
@ -109,7 +110,8 @@
<?php echo template::file('downloadEditFile', [ <?php echo template::file('downloadEditFile', [
'label' => 'Fichier', 'label' => 'Fichier',
'language' => $this->getData(['user', $this->getUser('id'), 'language']), 'language' => $this->getData(['user', $this->getUser('id'), 'language']),
'value' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'file']) 'value' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'file']),
'folder' => $this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'file']) ? dirname($this->getData(['module', $this->getUrl(0), 'posts', $this->getUrl(2), 'file'])) : ''
]); ?> ]); ?>
</div> </div>
<div class="col12"> <div class="col12">