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

262 lines
12 KiB
PHP

<?php
// Lexique
include('./core/module/theme/lang/'. $this->getData(['config', 'i18n', 'langAdmin']) . '/lex_theme.php');
echo template::formOpen('themeMenuForm'); ?>
<div class="row">
<div class="col2">
<?php echo template::button('themeMenuBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'theme',
'ico' => 'left',
'value' => $text['core_theme_view']['menu'][0]
]); ?>
</div>
<div class="col2">
<?php echo template::button('themeMenuHelp', [
'href' => 'https://doc.deltacms.fr/personnalisation-du-menu',
'target' => '_blank',
'ico' => 'help',
'value' => $text['core_theme_view']['menu'][1],
'class' => 'buttonHelp'
]); ?>
</div>
<div class="col2 offset6">
<?php echo template::submit('themeMenuSubmit',[
'value' => $text['core_theme_view']['menu'][2]
]); ?>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<div class="blockTitle"><?php echo $text['core_theme_view']['menu'][3]; ?></div>
<div class="row">
<div class="col6">
<?php
if ( $this->getData(['theme', 'header', 'position']) == "site")
{ echo template::select('themeMenuPosition', $menuPositionsSite, [
'label' => $text['core_theme_view']['menu'][4],
'selected' => $this->getData(['theme', 'menu', 'position'])
]);
}else{
echo template::select('themeMenuPosition', $menuPositionsBody, [
'label' => $text['core_theme_view']['menu'][4],
'selected' => $this->getData(['theme', 'menu', 'position'])
]); }
?>
</div>
<div class="col6 themeMenuWideWrapper">
<?php echo template::select('themeMenuWide', $containerWides, [
'label' => $text['core_theme_view']['menu'][5],
'help' => $text['core_theme_view']['menu'][40],
'selected' => $this->getData(['theme', 'menu', 'wide'])
]); ?>
</div>
</div>
<div class="row">
<div class="col4">
<?php echo template::select('themeMenuRadius', $menuRadius, [
'label' => $text['core_theme_view']['menu'][6],
'selected' => $this->getData(['theme', 'menu', 'radius']),
'help' => $text['core_theme_view']['menu'][7]
]); ?>
</div>
<div class="col4">
<?php echo template::select('themeMenuHeight', $menuHeights, [
'label' => $text['core_theme_view']['menu'][8],
'selected' => $this->getData(['theme', 'menu', 'height'])
]); ?>
</div>
<div class="col4">
<?php echo template::select('themeMenuTextAlign', $aligns, [
'label' => $text['core_theme_view']['menu'][9],
'selected' => $this->getData(['theme', 'menu', 'textAlign'])
]); ?>
</div>
</div>
<div class="row">
<div class="col4">
<div id="themeMenuPositionOptions" class="displayNone">
<?php echo template::checkbox('themeMenuMargin', true, $text['core_theme_view']['menu'][10], [
'checked' => $this->getData(['theme', 'menu', 'margin'])
]); ?>
</div>
<div id="themeMenuPositionFixed" class="displayNone">
<?php echo template::checkbox('themeMenuFixed', true, $text['core_theme_view']['menu'][11], [
'checked' => $this->getData(['theme', 'menu', 'fixed'])
]); ?>
</div>
</div>
<div class="col4">
<?php echo template::select('themeMenuMinWidthTab', $minWidthTab, [
'label' => $text['core_theme_view']['menu'][37],
'help' => $text['core_theme_view']['menu'][38],
'selected' => $this->getData(['theme', 'menu', 'minWidthTab'])
]); ?>
</div>
<div class="col4" style="padding:30px 0 0 10px;>
<?php echo template::checkbox('themeMenuMinWidthParentOrAll', true, $text['core_theme_view']['menu'][39], [
'checked' => $this->getData(['theme', 'menu', 'minWidthParentOrAll'])
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<div class="blockTitle"><?php echo $text['core_theme_view']['menu'][12]; ?></div>
<div class="row">
<div class="col3">
<?php echo template::checkbox('themeMenuLoginLink', true, $text['core_theme_view']['menu'][13], [
'checked' => $this->getData(['theme', 'menu', 'loginLink'])
]); ?>
</div>
<div class="col3">
<?php echo template::checkbox('themeMenuMemberBar', true, $text['core_theme_view']['menu'][14], [
'checked' => $this->getData(['theme', 'menu', 'memberBar']),
'help' => $text['core_theme_view']['menu'][15]
]); ?>
</div>
<div class="col6">
<?php echo template::select('themeMenuBurgerContent', $burgerContent, [
'label' => $text['core_theme_view']['menu'][16],
'selected' => $this->getData(['theme', 'menu', 'burgerContent']),
'help' => $text['core_theme_view']['menu'][17]
]); ?>
</div>
</div>
<div id="themeMenuBurgerTitle" class=" <?php if( $this->getData(['theme', 'menu', 'burgerContent']) !== 'title') echo 'displayNone';?>">
<div class="row">
<div class="col3 offset6">
<?php echo template::text('themeMenuBurgerTextColor', [
'class' => 'colorPicker',
'help' => $text['core_theme_view']['menu'][21],
'label' => $text['core_theme_view']['menu'][22],
'value' => $this->getData(['theme', 'menu', 'burgerTextColor'])
]); ?>
</div>
<div class="col3">
<?php echo template::select('themeMenuBurgerFontSize', $menuBurgerFontSizes, [
'label' => $text['core_theme_view']['menu'][32],
'help' => $text['core_theme_view']['menu'][33],
'selected' => $this->getData(['theme', 'menu', 'burgerFontSize'])
]); ?>
</div>
</div>
</div>
<div class="row">
<div id="themeMenuBurgerLogoId" class="col6 offset6 <?php if( $this->getData(['theme', 'menu', 'burgerContent']) !== 'logo') echo 'displayNone';?>">
<?php
$imageFile = file_exists(self::FILE_DIR.'source/'.$this->getData(['theme', 'menu', 'burgerLogo'])) ?
$this->getData(['theme', 'menu', 'burgerLogo']) : "";
echo template::file('themeMenuBurgerLogo', [
'help' => $text['core_theme_view']['menu'][18],
'label' => $text['core_theme_view']['menu'][19],
'type' => 1,
'value' => $imageFile
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<div class="blockTitle"><?php echo $text['core_theme_view']['menu'][20]; ?></div>
<div class="row">
<div class="col4">
<?php echo template::text('themeMenuTextColor', [
'class' => 'colorPicker',
'help' => $text['core_theme_view']['menu'][21],
'label' => $text['core_theme_view']['menu'][22],
'value' => $this->getData(['theme', 'menu', 'textColor'])
]); ?>
</div>
<div class="col4">
<?php echo template::text('themeMenuBackgroundColor', [
'class' => 'colorPicker',
'help' => $text['core_theme_view']['menu'][23],
'label' => $text['core_theme_view']['menu'][24],
'value' => $this->getData(['theme', 'menu', 'backgroundColor'])
]); ?>
</div>
<div class="col4">
<?php echo template::text('themeMenuBackgroundColorSub', [
'class' => 'colorPicker',
'help' => $text['core_theme_view']['menu'][23],
'label' => $text['core_theme_view']['menu'][25],
'value' => $this->getData(['theme', 'menu', 'backgroundColorSub'])
]); ?>
</div>
</div>
<div class="row">
<div class="col4">
<?php echo template::text('themeMenuActiveTextColor', [
'class' => 'colorPicker',
'help' => $text['core_theme_view']['menu'][23],
'label' => $text['core_theme_view']['menu'][26],
'value' => $this->getData(['theme', 'menu', 'activeTextColor'])
]); ?>
</div>
<div class="col4 verticalAlignBottom">
<?php
echo template::checkbox('themeMenuActiveColorAuto', true, $text['core_theme_view']['menu'][36], [
'checked' => $this->getData(['theme', 'menu', 'activeColorAuto']),
'help' => $text['core_theme_view']['menu'][27]
]); ?>
</div>
<div class="col4">
<?php echo template::text('themeMenuActiveColor', [
'class' => 'colorPicker',
'help' => $text['core_theme_view']['menu'][28],
'label' => $text['core_theme_view']['menu'][29],
'value' => $this->getData(['theme', 'menu', 'activeColor'])
]); ?>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<div class="blockTitle"><?php echo $text['core_theme_view']['menu'][30]; ?></div>
<div class="row">
<div class="col6">
<?php echo template::select('themeMenuFont', $module::$fonts, [
'label' => $text['core_theme_view']['menu'][31],
'selected' => $this->getData(['theme', 'menu', 'font']),
'fonts' => true
]); ?>
</div>
<div class="col6">
<?php echo template::select('themeMenuFontSize', $menuFontSizes, [
'label' => $text['core_theme_view']['menu'][32],
'help' => $text['core_theme_view']['menu'][33],
'selected' => $this->getData(['theme', 'menu', 'fontSize'])
]); ?>
</div>
</div>
<div class="row">
<div class="col6">
<?php echo template::select('themeMenuFontWeight', $fontWeights, [
'label' => $text['core_theme_view']['menu'][34],
'selected' => $this->getData(['theme', 'menu', 'fontWeight'])
]); ?>
</div>
<div class="col6">
<?php echo template::select('themeMenuTextTransform', $textTransforms, [
'label' => $text['core_theme_view']['menu'][35],
'selected' => $this->getData(['theme', 'menu', 'textTransform'])
]); ?>
</div>
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>