Deltacms/module/gallery/view/edit/edit.php

113 lines
3.8 KiB
PHP

<?php
// Lexique
$text = [];
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Retour';
$text[1] = 'Enregistrer';
$text[2] = 'Paramètre des images';
$text[3] = 'Nom';
$text[4] = 'Dossier cible';
$text[5] = 'Tri des images';
$text[6] = 'Tri manuel : déplacez le images dans le tableau ci-dessous. L\'ordre est sauvegardé automatiquement.';
$text[7] = 'Mode plein écran automatique';
$text[8] = 'A l\'ouverture de la galerie, la première image est affichée en plein écran.';
$text[9] = 'Image';
$text[10] = 'Couverture';
$text[11] = 'Légende';
$text[12] = 'Aucune image.';
$text[13] = 'Version n°';
$sort = $module::$sort;
break;
case 'en' :
$text[0] = 'Back';
$text[1] = 'Save';
$text[2] = 'Image setting';
$text[3] = 'Name';
$text[4] = 'Target folder';
$text[5] = 'Sort images';
$text[6] = 'Manual sort: move the images into the table below. The order is saved automatically';
$text[7] = 'Automatic full screen mode';
$text[8] = 'When the gallery is opened, the first image is displayed full screen';
$text[9] = 'Image';
$text[10] = 'Cover';
$text[11] = 'Caption';
$text[12] = 'No image';
$text[13] = 'Version No.';
$sort = $module::$sort_en;
break;
}
?>
<?php echo template::formOpen('galleryEditForm'); ?>
<div class="row">
<div class="col2">
<?php echo template::button('galleryEditBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . $this->getUrl(0) . '/config',
'ico' => 'left',
'value' => $text[0]
]); ?>
</div>
<div class="col2 offset8">
<?php echo template::submit('galleryEditSubmit',[
'value' => $text[1]
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4><?php echo $text[2]; ?></h4>
<div class="row">
<div class="col5">
<?php echo template::text('galleryEditName', [
'label' => $text[3],
'value' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'name'])
]); ?>
</div>
<div class="col4">
<?php echo template::hidden('galleryEditDirectoryOld', [
'value' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'directory']),
'noDirty' => true // Désactivé à cause des modifications en ajax
]); ?>
<?php echo template::select('galleryEditDirectory', [], [
'label' => $text[4],
'noDirty' => true // Désactivé à cause des modifications en ajax
]); ?>
</div>
<div class="col3">
<?php echo template::select('galleryEditSort', $sort, [
'selected' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'sort']),
'label' => $text[5],
'help' => $text[6]
]); ?>
</div>
<div clas="row">
<div class="col12">
<?php echo template::checkbox('galleryEditFullscreen', true, $text[7], [
'checked' => $this->getData(['module', $this->getUrl(0), 'content', $this->getUrl(2), 'config', 'fullScreen']),
'help' => $text[8]
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<?php if($module::$pictures): ?>
<?php echo template::table([1, 4, 1, 5, 1], $module::$pictures, ['',$text[9], $text[10],$text[11],''],['id' => 'galleryTable'], $module::$picturesId ); ?>
<?php echo template::hidden('galleryEditFormResponse'); ?>
<?php echo template::hidden('galleryEditFormGalleryName',['value' => $this->getUrl(2)]); ?>
<?php else: ?>
<?php echo template::speech($text[12]); ?>
<?php endif; ?>
</div>
</div>
</div>
</div>
</div>
<div class="moduleVersion">
<?php echo $text[13]; echo $module::VERSION; ?>
</div>
<?php echo template::formClose(); ?>