From ec706fa13ee8995d0e9066102f54a5559ab5d230 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 16 Feb 2023 00:42:19 +0100 Subject: [PATCH] CSS --- htdocs/core/class/commonobject.class.php | 15 ++++++++++++--- htdocs/core/lib/functions.lib.php | 2 +- htdocs/theme/eldy/global.inc.php | 4 ++++ htdocs/theme/md/style.css.php | 8 ++++++-- 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 9eb66fa0745..0ac16532246 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -873,8 +873,11 @@ abstract class CommonObject $out .= img_picto($langs->trans("Address"), 'map-marker-alt'); $out .= ' '; } - $out .= dol_print_address($coords, 'address_'.$htmlkey.'_'.$this->id, $this->element, $this->id, 1, ', '); - $outdone++; + $address = dol_print_address($coords, 'address_'.$htmlkey.'_'.$this->id, $this->element, $this->id, 1, ', '); + if ($address) { + $out .= $address; + $outdone++; + } $outdone++; // List of extra languages @@ -900,6 +903,7 @@ abstract class CommonObject // If there is extra languages foreach ($arrayoflangcode as $extralangcode) { $s = picto_from_langcode($extralangcode, 'class="pictoforlang paddingright"'); + // This also call dol_format_address() $coords = $this->getFullAddress(1, ', ', $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT, $extralangcode); $htmltext .= $s.dol_print_address($coords, 'address_'.$htmlkey.'_'.$this->id, $this->element, $this->id, 1, ', '); } @@ -908,7 +912,8 @@ abstract class CommonObject } } - if (!in_array($this->country_code, $countriesusingstate) && empty($conf->global->MAIN_FORCE_STATE_INTO_ADDRESS) // If MAIN_FORCE_STATE_INTO_ADDRESS is on, state is already returned previously with getFullAddress + // If MAIN_FORCE_STATE_INTO_ADDRESS is on, state is already returned previously with getFullAddress + if (!in_array($this->country_code, $countriesusingstate) && empty($conf->global->MAIN_FORCE_STATE_INTO_ADDRESS) && empty($conf->global->SOCIETE_DISABLE_STATE) && $this->state) { if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1 && $this->region) { $out .= ($outdone ? ' - ' : '').$this->region.' - '.$this->state; @@ -918,6 +923,10 @@ abstract class CommonObject $outdone++; } + if ($outdone) { + $out = '
'.$out.'
'; + } + if (!empty($this->phone) || !empty($this->phone_pro) || !empty($this->phone_mobile) || !empty($this->phone_perso) || !empty($this->fax) || !empty($this->office_phone) || !empty($this->user_mobile) || !empty($this->office_fax)) { $out .= ($outdone ? '
' : ''); } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 0f42862b724..79e3c3e05c7 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2338,7 +2338,7 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi if (method_exists($object, 'getBannerAddress') && !in_array($object->element, array('product', 'bookmark', 'ecm_directories', 'ecm_files'))) { $moreaddress = $object->getBannerAddress('refaddress', $object); if ($moreaddress) { - $morehtmlref .= '
'; + $morehtmlref .= '
'; $morehtmlref .= $moreaddress; $morehtmlref .= '
'; } diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 23bb38e8d5a..b006978d5fa 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -3956,6 +3956,10 @@ div.refidno { font-size: ; line-height: 1.4em; } +div.refaddress div.address { + line-height: 1.2em; + font-size: 0.95em; +} div.refidno form { display: inline-block; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 8c2934fb227..945befdae08 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -4039,7 +4039,7 @@ div.refidpadding { div.refid { font-weight: bold; color: var(--colortexttitlenotab); - font-size: 160%; + font-size: 120%; } a.refid { color: var(--colortexttitlenotab) !important; @@ -4049,11 +4049,15 @@ div.refidno { font-weight: normal; color: var(--refidnocolor); font-size: ; - line-height: 21px; + line-height: 1.3em; } div.refidno form { display: inline-block; } +div.refaddress div.address { + line-height: 1.2em; + font-size: 0.9em; +} div.pagination { float: right;