From 9a9b7ecb95c9e6557b18ebacfccc2ed4fea02579 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 15 Sep 2020 12:07:15 +0200 Subject: [PATCH] CSS --- htdocs/admin/delais.php | 244 +++++++++++++++-------------- htdocs/theme/eldy/info-box.inc.php | 12 +- htdocs/theme/md/info-box.inc.php | 13 +- 3 files changed, 136 insertions(+), 133 deletions(-) diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php index 2ece442d74f..11cd1dc3623 100644 --- a/htdocs/admin/delais.php +++ b/htdocs/admin/delais.php @@ -229,7 +229,7 @@ if ($action == 'edit') $value = (!empty($conf->global->{$delay['code']}) ? $conf->global->{$delay['code']}:0); print ''; print ''.img_object('', $delay['img']).''; - print ''.$langs->trans('Delays_'.$delay['code']).''; + print ''.$langs->trans('Delays_'.$delay['code']).''; print ' '.$langs->trans("days").''; } } @@ -290,148 +290,150 @@ if ($action == 'edit') print '
'; -// Show logo for weather -print ''.$langs->trans("DescWeather").' '; -if ($action == 'edit') { - $str_mode_std = $langs->trans('MeteoStdModEnabled').' : '.$langs->trans('MeteoUseMod', $langs->transnoentitiesnoconv('MeteoPercentageMod')); - $str_mode_percentage = $langs->trans('MeteoPercentageModEnabled').' : '.$langs->trans('MeteoUseMod', $langs->transnoentitiesnoconv('MeteoStdMod')); - if (empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) $str_mode_enabled = $str_mode_std; - else $str_mode_enabled = $str_mode_percentage; - print ''.$str_mode_enabled.''; - print ''; +if ($conf->global->MAIN_DISABLE_METEO != 1) { + // Show logo for weather + print ''.$langs->trans("DescWeather").' '; - print '

'; -} else { - if (empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) print $langs->trans('MeteoStdModEnabled'); - else print $langs->trans('MeteoPercentageModEnabled'); - print '

'; -} + if ($action == 'edit') { + $str_mode_std = $langs->trans('MeteoStdModEnabled').' : '.$langs->trans('MeteoUseMod', $langs->transnoentitiesnoconv('MeteoPercentageMod')); + $str_mode_percentage = $langs->trans('MeteoPercentageModEnabled').' : '.$langs->trans('MeteoUseMod', $langs->transnoentitiesnoconv('MeteoStdMod')); + if (empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) $str_mode_enabled = $str_mode_std; + else $str_mode_enabled = $str_mode_percentage; + print ''.$str_mode_enabled.''; + print ''; -$offset = 0; -$cursor = 10; // By default -//if (! empty($conf->global->MAIN_METEO_OFFSET)) $offset=$conf->global->MAIN_METEO_OFFSET; -//if (! empty($conf->global->MAIN_METEO_GAP)) $cursor=$conf->global->MAIN_METEO_GAP; -$level0 = $offset; if (!empty($conf->global->MAIN_METEO_LEVEL0)) $level0 = $conf->global->MAIN_METEO_LEVEL0; -$level1 = $offset + 1 * $cursor; if (!empty($conf->global->MAIN_METEO_LEVEL1)) $level1 = $conf->global->MAIN_METEO_LEVEL1; -$level2 = $offset + 2 * $cursor; if (!empty($conf->global->MAIN_METEO_LEVEL2)) $level2 = $conf->global->MAIN_METEO_LEVEL2; -$level3 = $offset + 3 * $cursor; if (!empty($conf->global->MAIN_METEO_LEVEL3)) $level3 = $conf->global->MAIN_METEO_LEVEL3; -$text = ''; $options = 'class="valignmiddle" height="60px"'; + print '

'; + } else { + if (empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) print $langs->trans('MeteoStdModEnabled'); + else print $langs->trans('MeteoPercentageModEnabled'); + print '

'; + } + + $offset = 0; + $cursor = 10; // By default + //if (! empty($conf->global->MAIN_METEO_OFFSET)) $offset=$conf->global->MAIN_METEO_OFFSET; + //if (! empty($conf->global->MAIN_METEO_GAP)) $cursor=$conf->global->MAIN_METEO_GAP; + $level0 = $offset; if (!empty($conf->global->MAIN_METEO_LEVEL0)) $level0 = $conf->global->MAIN_METEO_LEVEL0; + $level1 = $offset + 1 * $cursor; if (!empty($conf->global->MAIN_METEO_LEVEL1)) $level1 = $conf->global->MAIN_METEO_LEVEL1; + $level2 = $offset + 2 * $cursor; if (!empty($conf->global->MAIN_METEO_LEVEL2)) $level2 = $conf->global->MAIN_METEO_LEVEL2; + $level3 = $offset + 3 * $cursor; if (!empty($conf->global->MAIN_METEO_LEVEL3)) $level3 = $conf->global->MAIN_METEO_LEVEL3; + $text = ''; $options = 'class="valignmiddle" height="60px"'; -if ($action == 'edit') { - print '
global->MAIN_USE_METEO_WITH_PERCENTAGE) ? '' : 'style="display:none;"').'>'; + if ($action == 'edit') { + print '
global->MAIN_USE_METEO_WITH_PERCENTAGE) ? '' : 'style="display:none;"').'>'; - print '
'; - print '
'; - print img_weather($text, 0, $options); - print '= '; - print '
'; - print img_weather($text, 1, $options); - print '<= '; - print '
'; - print img_weather($text, 2, $options); - print '<= '; - print '
'; - print img_weather($text, 3, $options); - print '<= '; - print '
'; - print '
'; + print '
'; + print '
'; + print img_weather($text, 0, $options); + print ' = '; + print '
'; + print img_weather($text, 1, $options); + print ' <= '; + print '
'; + print img_weather($text, 2, $options); + print ' <= '; + print '
'; + print img_weather($text, 3, $options); + print ' <= '; + print '
'; + print '
'; - print '
'; + print '
'; - print '
global->MAIN_USE_METEO_WITH_PERCENTAGE) ? 'style="display:none;"' : '').'>'; + print '
global->MAIN_USE_METEO_WITH_PERCENTAGE) ? 'style="display:none;"' : '').'>'; - print '
'; - print '
'; - print img_weather($text, 0, $options); - print '<=  %'; - print '
'; - print img_weather($text, 1, $options); - print '<=  %'; - print '
'; - print img_weather($text, 2, $options); - print '<=  %'; - print '
'; - print img_weather($text, 3, $options); - print '<=  %'; - print '
'; - print '
'; + print '
'; + print '
'; + print img_weather($text, 0, $options); + print ' <=  %'; + print '
'; + print img_weather($text, 1, $options); + print ' <=  %'; + print '
'; + print img_weather($text, 2, $options); + print ' <=  %'; + print '
'; + print img_weather($text, 3, $options); + print ' <=  %'; + print '
'; + print '
'; - print '
'; + print '
'; - ?> + ?> - - - - global->MAIN_USE_METEO_WITH_PERCENTAGE)) { - print '
'; - print '
'; - print img_weather($text, 0, $options); - print '= '.$conf->global->MAIN_METEO_PERCENTAGE_LEVEL0.' %'; - print '
'; - print img_weather($text, 1, $options); - print '<= '.$conf->global->MAIN_METEO_PERCENTAGE_LEVEL1.' %'; - print '
'; - print img_weather($text, 2, $options); - print '<= '.$conf->global->MAIN_METEO_PERCENTAGE_LEVEL2.' %'; - print '
'; - print img_weather($text, 3, $options); - print '<= '.$conf->global->MAIN_METEO_PERCENTAGE_LEVEL3.' %'; - print '
'; - print img_weather($text, 4, $options); - print '> '.$conf->global->MAIN_METEO_PERCENTAGE_LEVEL3.' %'; - print '
'; - print '
'; + '; - print '
'; - print img_weather($text, 0, $options); - print '= '.$level0; - print '
'; - print img_weather($text, 1, $options); - print '<= '.$level1; - print '
'; - print img_weather($text, 2, $options); - print '<= '.$level2; - print '
'; - print img_weather($text, 3, $options); - print '<= '.$level3; - print '
'; - print img_weather($text, 4, $options); - print '> '.$level3; - print '
'; - print ''; + if (!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) { + print '
'; + print '
'; + print img_weather($text, 0, $options); + print ' = '.$conf->global->MAIN_METEO_PERCENTAGE_LEVEL0.' %'; + print '
'; + print img_weather($text, 1, $options); + print ' <= '.$conf->global->MAIN_METEO_PERCENTAGE_LEVEL1.' %'; + print '
'; + print img_weather($text, 2, $options); + print ' <= '.$conf->global->MAIN_METEO_PERCENTAGE_LEVEL2.' %'; + print '
'; + print img_weather($text, 3, $options); + print ' <= '.$conf->global->MAIN_METEO_PERCENTAGE_LEVEL3.' %'; + print '
'; + print img_weather($text, 4, $options); + print ' > '.$conf->global->MAIN_METEO_PERCENTAGE_LEVEL3.' %'; + print '
'; + print '
'; + } else { + print '
'; + print '
'; + print img_weather($text, 0, $options); + print ' = '.$level0; + print '
'; + print img_weather($text, 1, $options); + print ' <= '.$level1; + print '
'; + print img_weather($text, 2, $options); + print ' <= '.$level2; + print '
'; + print img_weather($text, 3, $options); + print ' <= '.$level3; + print '
'; + print img_weather($text, 4, $options); + print ' > '.$level3; + print '
'; + print '
'; + } } } -print ''; if ($action == 'edit') { print '
'; diff --git a/htdocs/theme/eldy/info-box.inc.php b/htdocs/theme/eldy/info-box.inc.php index 4bc6a6595fc..26ba9fac867 100644 --- a/htdocs/theme/eldy/info-box.inc.php +++ b/htdocs/theme/eldy/info-box.inc.php @@ -379,23 +379,23 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO = } .fa-weather-level0:before{ content: "\f185"; - color : #ffbf00; + color : #cfbf00; } .fa-weather-level1:before{ content: "\f6c4"; - color : #b0b0b0; + color : #bc9526; } .fa-weather-level2:before{ - content: "\f0c2"; - color : #9b9b9b; + content: "\f743"; + color : #b16000; } .fa-weather-level3:before{ content: "\f740"; - color : #888888; + color : #b04000; } .fa-weather-level4:before{ content: "\f0e7"; - color : #b91f1f; + color : #b01000; } diff --git a/htdocs/theme/md/info-box.inc.php b/htdocs/theme/md/info-box.inc.php index 1297a99bf99..d024d824ea8 100644 --- a/htdocs/theme/md/info-box.inc.php +++ b/htdocs/theme/md/info-box.inc.php @@ -388,25 +388,26 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO = } .fa-weather-level0:before{ content: "\f185"; - color : #000000; + color : #cfbf00; } .fa-weather-level1:before{ content: "\f6c4"; - color : #000000; + color : #bc9526; } .fa-weather-level2:before{ - content: "\f0c2"; - color : #000000; + content: "\f743"; + color : #b16000; } .fa-weather-level3:before{ content: "\f740"; - color : #000000; + color : #b04000; } .fa-weather-level4:before{ content: "\f0e7"; - color : #000000; + color : #b01000; } + /* USING IMAGES FOR WEATHER INTEAD OF FONT AWESOME */ /* For other themes just uncomment this part */ /*.info-box-weather-level0,