From 293b08ab1d7d0d6a7daa1c74dd17752ad260cb31 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 14 Jun 2022 11:47:56 +0200 Subject: [PATCH] Debug v16 --- htdocs/admin/ihm.php | 2 ++ htdocs/core/lib/usergroups.lib.php | 7 ++++++- htdocs/langs/en_US/errors.lang | 3 ++- htdocs/theme/eldy/global.inc.php | 9 ++++++--- htdocs/theme/eldy/info-box.inc.php | 1 + htdocs/theme/md/info-box.inc.php | 2 ++ htdocs/theme/md/style.css.php | 14 ++++++++++---- htdocs/user/class/user.class.php | 16 +++++++++++++++- 8 files changed, 44 insertions(+), 10 deletions(-) diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index aedd91a34eb..d3afd4035e4 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -99,6 +99,8 @@ if ($action == 'update') { $error = 0; if ($mode == 'template') { + //dolibarr_del_const($db, "MAIN_THEME", 0); // To be sure we don't have this constant set for all entities + dolibarr_set_const($db, "MAIN_THEME", GETPOST("main_theme", 'aZ09'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", getDolGlobalInt('MAIN_IHM_PARAMS_REV') + 1, 'chaine', 0, '', $conf->entity); diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index 25945c4e83d..538fc299564 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -372,7 +372,12 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print ''; } - print ''; + print ''; + + if (!empty($conf->global->MAIN_FORCETHEME)) { + $langs->load("errors"); + print $langs->trans("WarningThemeForcedTo", $conf->global->MAIN_FORCETHEME); + } print '
'; diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index ba9cf1cb19a..2857d7a3f54 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -322,7 +322,8 @@ WarningCreateSubAccounts=Warning, you can't create directly a sub account, you m WarningAvailableOnlyForHTTPSServers=Available only if using HTTPS secured connection. WarningModuleXDisabledSoYouMayMissEventHere=Module %s has not been enabled. So you may miss a lot of event here. WarningPaypalPaymentNotCompatibleWithStrict=The value 'Strict' makes the online payment features not working correctly. Use 'Lax' instead. - +WarningThemeForcedTo=Warning, theme has been forced to %s by hidden constant MAIN_FORCETHEME + # Validate RequireValidValue = Value not valid RequireAtLeastXString = Requires at least %s character(s) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 930d28550c3..5eda12f56de 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -2377,6 +2377,9 @@ img.photoref, div.photoref { width: 80px; object-fit: contain; } +img.photokanban, div.photokanban { + padding: 0; +} div.photoref .fa, div.photoref .fas, div.photoref .far { font-size: 2.5em; } @@ -5339,11 +5342,11 @@ td.cal_other_month { /* ============================================================================== */ /* CSS for treeview */ -.treeview ul { background-color: transparent !important; margin-bottom: 4px !important; margin-top: 0 !important; padding-top: 2px !important; } -.treeview li { background-color: transparent !important; padding: 0 0 0 16px !important; min-height: 30px; } +.treeview ul { background-color: transparent !important; margin-top: 0 !important; /* margin-bottom: 4px !important; padding-top: 2px !important; */ } +.treeview li { background-color: transparent !important; padding: 0 0 0 20px !important; min-height: 30px; } +.treeview .hitarea { width: 20px !important; margin-left: -20px !important; margin-top: 3px; } .treeview li table { min-height: 30px; } .treeview .hover { color: var(--colortextlink) !important; text-decoration: underline !important; } -.treeview .hitarea { margin-top: 3px; } /* ============================================================================== */ diff --git a/htdocs/theme/eldy/info-box.inc.php b/htdocs/theme/eldy/info-box.inc.php index 77270b9d818..f1f82b757c0 100644 --- a/htdocs/theme/eldy/info-box.inc.php +++ b/htdocs/theme/eldy/info-box.inc.php @@ -489,6 +489,7 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) { .box-flex-container { margin: 0 0 0 0px !important; width: 100% !important; + justify-content: space-between; } .info-box-module { width: 100%; diff --git a/htdocs/theme/md/info-box.inc.php b/htdocs/theme/md/info-box.inc.php index 8ffd6fc3f93..daf3c409397 100644 --- a/htdocs/theme/md/info-box.inc.php +++ b/htdocs/theme/md/info-box.inc.php @@ -193,7 +193,9 @@ a.info-box-text-a i.fa.fa-exclamation-triangle { filter: saturate(global->THEME_SATURATE_RATIO; ?>); } + .info-box-sm .info-box-icon { + height: 80px; width: 80px; font-size: 25px; line-height: 92px; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 298b8b5c46a..fdc2e9db2d7 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -2399,6 +2399,11 @@ img.photoref, div.photoref { object-fit: contain; } +img.photokanban, div.photokanban { + padding: 0; + border: none; +} + div.photoref .fa, div.photoref .fas, div.photoref .far { font-size: 2.5em; } @@ -4110,7 +4115,8 @@ tr.liste_titre_topborder td { background: transparent; } tr.liste_titre:last-child th.liste_titre, tr.liste_titre:last-child th.liste_titre_sel, tr.liste_titre td.liste_titre, tr.liste_titre td.liste_titre_sel, form.liste_titre div.tagtd { /* For last line of table headers only */ - border-bottom: 1px solid var(--colortopbordertitle1); + /* border-bottom: 1px solid var(--colortopbordertitle1); */ + border-bottom: none; } div.liste_titre { @@ -5180,11 +5186,11 @@ td.gtaskname { /* ============================================================================== */ /* CSS for treeview */ -.treeview ul { background-color: transparent !important; margin-bottom: 4px !important; margin-top: 0 !important; padding-top: 8px !important; } -.treeview li { background-color: transparent !important; padding: 0 0 0 16px !important; min-height: 30px; } +.treeview ul { background-color: transparent !important; margin-top: 0 !important; /* margin-bottom: 4px !important; padding-top: 2px !important; */ } +.treeview li { background-color: transparent !important; padding: 0 0 0 20px !important; min-height: 30px; } +.treeview .hitarea { width: 20px !important; margin-left: -20px !important; margin-top: 3px; } .treeview li table { min-height: 30px; } .treeview .hover { color: var(--colortextlink) !important; text-decoration: underline !important; } -.treeview .hitarea { margin-top: 3px; } diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 11d21f4e957..c073937b048 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -2964,7 +2964,18 @@ class User extends CommonObject $return = '
'; $return .= '
'; $return .= ''; - $return .= img_picto('', $this->picto); + + $label = ''; + if (!empty($this->photo)) { + //$label .= '
'; + $label .= Form::showphoto('userphoto', $this, 0, 60, 0, 'photokanban photoref photowithmargin photologintooltip', 'small', 0, 1); // Force height to 60 so we total height of tooltip can be calculated and collision can be managed + //$label .= '
'; + //$label .= '
'; + $return .= $label; + } else { + $return .= img_picto('', $this->picto); + } + //$return .= ''; // Can be image $return .= '
'; $return .= '
'; @@ -2972,6 +2983,9 @@ class User extends CommonObject if (property_exists($this, 'label')) { $return .= '
'.$this->label.''; } + if ($this->email) { + $return .= '
'.img_picto('', 'email').' '.$this->email.''; + } if (method_exists($this, 'getLibStatut')) { $return .= '
'.$this->getLibStatut(5).'
'; }