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

212 lines
6.3 KiB
PHP

<?php
// Lexique
$text = [];
$val = $this->getData(['config', 'i18n', 'langAdmin']);
switch ($val) {
case 'fr' :
$text[0] = 'Retour';
$text[1] = 'Aide';
$text[3] = 'Réinitialiser';
$text[4] = 'Valider';
$text[5] = 'Couleurs';
$text[6] = 'Couleur visible en l\'absence d\'une image.<br />Le curseur horizontal règle le niveau de transparence.';
$text[7] = 'Couleur visible en l\'absence d\'une image.<br />Le curseur horizontal règle le niveau de transparence. La couleur du texte est automatique.';
$text[8] = 'Arrière-plan';
$text[9] = 'Titres';
$text[10] = 'Texte';
$text[11] = 'Arrière-plan des champs';
$text[12] = 'Bordure des champs';
$text[13] = 'Bouton Aide';
$text[14] = 'Bouton retour';
$text[15] = 'Bouton standard';
$text[16] = 'Bouton effacement';
$text[17] = 'Bouton validation';
$text[18] = 'Mise en forme du texte';
$text[19] = 'Police du texte';
$text[20] = 'Taille';
$text[21] = 'Police des titres';
break;
case 'en' :
$text[0] = 'Back';
$text[1] = 'Help';
$text[3] = 'Reset';
$text[4] = 'Validate';
$text[5] = 'Colors';
$text[6] = 'The colour visible in the absence of an image.<br /> The horizontal slider adjusts the level of transparency.';
$text[7] = 'The colour visible in the absence of an image.<br /> The horizontal slider adjusts the level of transparency. The text colour is automatic.';
$text[8] = 'Background';
$text[9] = 'Title';
$text[10] = 'Text';
$text[11] = 'Field background';
$text[12] = 'Field border';
$text[13] = 'Help button';
$text[14] = 'Back button';
$text[15] = 'Standard button';
$text[16] = 'Delete button';
$text[17] = 'Validation button';
$text[18] = 'Text formatting';
$text[19] = 'Text font';
$text[20] = 'Size';
$text[21] = 'Title font';
break;
}
?>
<?php echo template::formOpen('configAdminForm'); ?>
<div class="row">
<div class="col2">
<?php echo template::button('configAdminBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'theme',
'ico' => 'left',
'value' => $text[0]
]); ?>
</div>
<div class="col2">
<?php echo template::button('themeSiteHelp', [
'href' => 'https://doc.deltacms.fr/administration',
'target' => '_blank',
'ico' => 'help',
'value' => $text[1],
'class' => 'buttonHelp'
]); ?>
</div>
<div class="col2 offset4">
<?php echo template::button('configAdminReset', [
'class' => 'buttonRed',
'href' => helper::baseUrl() . 'theme/reset/admin' . '&csrf=' . $_SESSION['csrf'],
'value' => $text[3],
'ico' => 'cancel'
]); ?>
</div>
<div class="col2">
<?php echo template::submit('configAdminSubmit',[
'value' => $text[4],
'ico' => 'check'
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4><?php echo $text[5]; ?></h4>
<div class="row">
<div class="col4">
<?php echo template::text('adminBackgroundColor', [
'class' => 'colorPicker',
'help' => $text[6],
'label' => $text[8],
'value' => $this->getData(['admin', 'backgroundColor'])
]); ?>
</div>
<div class="col4">
<?php echo template::text('adminColorTitle', [
'class' => 'colorPicker',
'help' => $text[6],
'label' => $text[9],
'value' => $this->getData(['admin', 'colorTitle'])
]); ?>
</div>
<div class="col4">
<?php echo template::text('adminColorText', [
'class' => 'colorPicker',
'help' => $text[6],
'label' => $text[10],
'value' => $this->getData(['admin', 'colorText'])
]); ?>
</div>
</div>
<div class="row">
<div class="col4">
<?php echo template::text('adminBackGroundBlockColor', [
'class' => 'colorPicker',
'help' => $text[7],
'label' => $text[11],
'value' => $this->getData(['admin', 'backgroundBlockColor'])
]); ?>
</div>
<div class="col4">
<?php echo template::text('adminBorderBlockColor', [
'class' => 'colorPicker',
'help' => $text[6],
'label' => $text[12],
'value' => $this->getData(['admin', 'borderBlockColor'])
]); ?>
</div>
<div class="col3 offset1">
<?php echo template::text('adminColorHelp', [
'class' => 'colorPicker',
'help' => $text[6],
'label' => $text[13],
'value' => $this->getData(['admin', 'backgroundColorButtonHelp'])
]); ?>
</div>
</div>
<div class="row">
<div class="col3">
<?php echo template::text('adminColorGrey', [
'class' => 'colorPicker',
'help' => $text[6],
'label' => $text[14],
'value' => $this->getData(['admin', 'backgroundColorButtonGrey'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('adminColorButton', [
'class' => 'colorPicker',
'help' => $text[6],
'label' => $text[15],
'value' => $this->getData(['admin', 'backgroundColorButton'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('adminColorRed', [
'class' => 'colorPicker',
'help' => $text[6],
'label' => $text[16],
'value' => $this->getData(['admin', 'backgroundColorButtonRed'])
]); ?>
</div>
<div class="col3">
<?php echo template::text('adminColorGreen', [
'class' => 'colorPicker',
'help' => $text[6],
'label' => $text[17],
'value' => $this->getData(['admin', 'backgroundColorButtonGreen'])
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4><?php echo $text[18]; ?></h4>
<div class="row">
<div class="col4">
<?php echo template::select('adminFontText', $module::$fonts, [
'label' => $text[19],
'selected' => $this->getData(['admin', 'fontText']),
'fonts' => true
]); ?>
</div>
<div class="col4">
<?php echo template::select('adminFontTextSize', $module::$siteFontSizes, [
'label' => $text[20],
'selected' => $this->getData(['admin', 'fontSize'])
]); ?>
</div>
<div class="col4">
<?php echo template::select('adminFontTitle', $module::$fonts, [
'label' => $text[21],
'selected' => $this->getData(['admin', 'fontTitle']),
'fonts' => true
]); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>