Deltacms/core/module/theme/view/body/body.php

162 lines
4.7 KiB
PHP

<?php
// Lexique
$text = [];
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Retour';
$text[1] = 'Aide';
$text[2] = 'Enregistrer';
$text[3] = 'Couleurs';
$text[4] = 'Couleur visible en l\'absence d\'une image.<br />Le curseur horizontal règle le niveau de transparence.';
$text[5] = 'Arrière-plan';
$text[6] = 'Le curseur horizontal règle le niveau de transparence.';
$text[7] = 'Fond icône haut de page';
$text[8] = 'Icône haut de page';
$text[9] = 'Image';
$text[10] = 'Sélectionner une image';
$text[11] = 'Arrière-plan';
$text[12] = 'Répétition';
$text[13] = 'Position';
$text[14] = 'Défilement';
$text[15] = 'Taille';
$repeats = $module::$repeats;
$imagePositions = $module::$imagePositions;
$attachments = $module::$attachments;
$bodySizes = $module::$bodySizes;
break;
case 'en' :
$text[0] = 'Back';
$text[1] = 'Help';
$text[2] = 'Save';
$text[3] = 'Colors';
$text[4] = 'Color visible in the absence of an image.<br />The horizontal slider adjusts the level of transparency.';
$text[5] = 'Background';
$text[6] = 'The horizontal slider sets the transparency level';
$text[7] = 'Top icon background';
$text[8] = 'Top icon';
$text[9] = 'Image';
$text[10] = 'Select an image';
$text[11] = 'Background';
$text[12] = 'Repeat';
$text[13] = 'Position';
$text[14] = 'Scroll';
$text[15] = 'Size';
$repeats = $module::$repeats_en;
$imagePositions = $module::$imagePositions_en;
$attachments = $module::$attachments_en;
$bodySizes = $module::$bodySizes_en;
break;
}
?>
<?php echo template::formOpen('themeBodyForm'); ?>
<div class="row">
<div class="col2">
<?php echo template::button('themeBodyBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'theme',
'ico' => 'left',
'value' => $text[0]
]); ?>
</div>
<div class="col2">
<?php echo template::button('themeBodyHelp', [
'href' => 'https://doc.deltacms.fr/personnalisation-de-l-arriere-plan',
'target' => '_blank',
'ico' => 'help',
'value' => $text[1],
'class' => 'buttonHelp'
]); ?>
</div>
<div class="col2 offset6">
<?php echo template::submit('themeBodySubmit',[
'value' => $text[2]
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4><?php echo $text[3]; ?></h4>
<div class="row">
<div class="col6">
<?php echo template::text('themeBodyBackgroundColor', [
'class' => 'colorPicker',
'help' => $text[4],
'label' => $text[5],
'value' => $this->getData(['theme', 'body', 'backgroundColor'])
]); ?>
</div>
</div>
<div class="row">
<div class="col6">
<?php echo template::text('themeBodyToTopBackground', [
'class' => 'colorPicker',
'help' => $text[6],
'label' => $text[7],
'value' => $this->getData(['theme', 'body', 'toTopbackgroundColor'])
]); ?>
</div>
<div class="col6">
<?php echo template::text('themeBodyToTopColor', [
'class' => 'colorPicker',
'help' => $text[6],
'label' => $text[8],
'value' => $this->getData(['theme', 'body', 'toTopColor'])
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4><?php echo $text[9]; ?></h4>
<div class="row">
<div class="col12">
<?php
$imageFile = file_exists(self::FILE_DIR.'source/'.$this->getData(['theme', 'body', 'image'])) ? $this->getData(['theme', 'body', 'image']) : "";
echo template::file('themeBodyImage', [
'help' => $text[10],
'label' => $text[11],
'type' => 1,
'value' => $imageFile
]); ?>
</div>
</div>
<div id="themeBodyImageOptions" class="displayNone">
<div class="row">
<div class="col6">
<?php echo template::select('themeBodyImageRepeat', $repeats, [
'label' => $text[12],
'selected' => $this->getData(['theme', 'body', 'imageRepeat'])
]); ?>
</div>
<div class="col6">
<?php echo template::select('themeBodyImagePosition', $imagePositions, [
'label' => $text[13],
'selected' => $this->getData(['theme', 'body', 'imagePosition'])
]); ?>
</div>
</div>
<div class="row">
<div class="col6">
<?php echo template::select('themeBodyImageAttachment', $attachments, [
'label' => $text[14],
'selected' => $this->getData(['theme', 'body', 'imageAttachment'])
]); ?>
</div>
<div class="col6">
<?php echo template::select('themeBodyImageSize', $bodySizes, [
'label' => $text[15],
'selected' => $this->getData(['theme', 'body', 'imageSize'])
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>