diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 135635ed94d..383723eefd3 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -389,7 +389,7 @@ abstract class CommonObject * * @param Translate $langs Language object for translation of civility * @param int $option 0=No option, 1=Add civility - * @param int $nameorder -1=Auto, 0=Lastname+Firstname, 1=Firstname+Lastname + * @param int $nameorder -1=Auto, 0=Lastname+Firstname, 1=Firstname+Lastname, 2=Firstname * @param int $maxlen Maximum length * @return string String with full name */ diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 8649528d883..1e256effa5f 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -4297,12 +4297,16 @@ function dolGetFirstLastname($firstname,$lastname,$nameorder=-1) $ret=''; // If order not defined, we use the setup if ($nameorder < 0) $nameorder=(empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION)); - if ($nameorder) + if ($nameorder && $nameorder != '2') { $ret.=$firstname; if ($firstname && $lastname) $ret.=' '; $ret.=$lastname; } + else if ($nameorder == 2) + { + $ret.=$firstname; + } else { $ret.=$lastname; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 7c682756edd..f1f15fc0f06 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1390,8 +1390,8 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a ' . "\n"; // Raven.js for client-side Sentry logging support - if (array_key_exists('mod_syslog_sentry', $conf->loghandlers) && ! empty($conf->global->SYSLOG_SENTRY_DSN)) { - + if (array_key_exists('mod_syslog_sentry', $conf->loghandlers) && ! empty($conf->global->SYSLOG_SENTRY_DSN)) + { // Filter out secret key $dsn = parse_url($conf->global->SYSLOG_SENTRY_DSN); $public_dsn = $dsn['scheme'] . '://' . $dsn['user'] .'@' . $dsn['host'] . $dsn['path']; @@ -1465,7 +1465,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a // Login name with tooltip $toprightmenu.='
'; - $toprightmenu.=$user->getNomurl(0, '', true, 0, 11); + $toprightmenu.=$user->getNomurl(0, '', true, 0, 11, 0, 'firstname'); $toprightmenu.='
'; $toprightmenu.=''; diff --git a/htdocs/theme/md_exp/img/title_hrm.png b/htdocs/theme/md_exp/img/title_hrm.png new file mode 100644 index 00000000000..de788526bc1 Binary files /dev/null and b/htdocs/theme/md_exp/img/title_hrm.png differ diff --git a/htdocs/theme/md_exp/style.css.php b/htdocs/theme/md_exp/style.css.php index bd70786dab4..0dec78afeb9 100644 --- a/htdocs/theme/md_exp/style.css.php +++ b/htdocs/theme/md_exp/style.css.php @@ -500,6 +500,7 @@ td.showDragHandle { margin-bottom: 0px; display: table; table-layout: fixed; + width: 100%; } #id-right, #id-left { display: table-cell; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index accd7c9c220..d291ee58010 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1836,9 +1836,10 @@ class User extends CommonObject * @param integer $notooltip 1=Disable tooltip * @param int $maxlen Max length of visible user name * @param int $hidethirdpartylogo Hide logo of thirdparty if user is external user + * @param string $mode 'firstname'=Show only firstname * @return string String with URL */ - function getNomUrl($withpicto=0, $option='', $infologin=0, $notooltip=0, $maxlen=24, $hidethirdpartylogo=0) + function getNomUrl($withpicto=0, $option='', $infologin=0, $notooltip=0, $maxlen=24, $hidethirdpartylogo=0, $mode='') { global $langs, $conf, $db; global $dolibarr_main_authentication, $dolibarr_main_demo; @@ -1905,7 +1906,7 @@ class User extends CommonObject $result.=($link.img_object(($notooltip?'':$label), 'user', ($notooltip?'':'class="classfortooltip"')).$linkend); if ($withpicto != 2) $result.=' '; } - $result.= $link . $this->getFullName($langs,'',-1,$maxlen) . $linkend . $companylink; + $result.= $link . $this->getFullName($langs,'',($mode == 'firstname' ? 2 : -1),$maxlen) . $linkend . $companylink; return $result; }