Edition des images d'une galerie, aperçu

This commit is contained in:
Fred Tempez 2020-04-05 19:00:02 +02:00
parent 4111ae6270
commit f1e5ae5367
8 changed files with 7 additions and 4 deletions

View File

@ -275,7 +275,9 @@ class gallery extends common {
]),
template::text('legend[' . $fileInfos->getFilename() . ']', [
'value' => $this->getData(['module', $this->getUrl(0), $this->getUrl(2), 'legend', str_replace('.','',$fileInfos->getFilename())])
])
]),
'<img src="'. str_replace('source','thumb',$directory) . '/' . $fileInfos->getFilename() . '">'
];
}
}
@ -366,14 +368,15 @@ class gallery extends common {
}
// Liste des galeries
else {
// Tri des galeries
// Tri des galeries suivant l'ordre défini
$g = $this->getData(['module', $this->getUrl(0)]);
$p = helper::arrayCollumn(helper::arrayCollumn($g,'config'),'position');
asort($p,SORT_NUMERIC);
$galleries = [];
foreach ($p as $positionId => $item) {
$galleries [$positionId] = $g[$positionId];
}
}
// Construire le tableau
foreach((array) $galleries as $galleryId => $gallery) {
if(is_dir($gallery['config']['directory'])) {
$iterator = new DirectoryIterator($gallery['config']['directory']);

View File

@ -45,6 +45,6 @@
</div>
</div>
<?php if($module::$pictures): ?>
<?php echo template::table([4, 1, 7], $module::$pictures, ['Image', 'Couverture','Légende']); ?>
<?php echo template::table([4, 1, 6, 1], $module::$pictures, ['Image', 'Couverture','Légende','Aperçu']); ?>
<?php endif; ?>
<?php echo template::formClose(); ?>

0
site/file/source/galerie/landscape/desert.jpg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 128 KiB

After

Width:  |  Height:  |  Size: 128 KiB

0
site/file/source/galerie/landscape/iceberg.jpg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 199 KiB

After

Width:  |  Height:  |  Size: 199 KiB

0
site/file/source/galerie/landscape/meadow.jpg Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 160 KiB

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB