';
- $toprightmenu.=$user->getNomurl(0, '', true, 0, 11, 0, ($user->firstname ? 'firstname' : -1),'atoplogin');
+ // Login name with photo and tooltip
+ $mode=-1;
+ $toprightmenu.='
';
+ $toprightmenu.=$user->getNomurl($mode, '', true, 0, 11, 0, ($user->firstname ? 'firstname' : -1),'atoplogin');
$toprightmenu.='
';
$toprightmenu.='
';
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index 45ca3a5b728..c152e1d93a3 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -699,7 +699,7 @@ div#tmenu_tooltip {
display:none;
- padding-: echo ($maxwidthloginblock - 10); ?>px;
+ padding-: px;
}
@@ -888,7 +888,6 @@ div.mainmenu.members {
div.mainmenu.products {
background-image: url();
- margin-left: 10px;
}
div.mainmenu.project {
@@ -3877,7 +3876,22 @@ border-top-right-radius: 6px;
}
@media only screen and (max-width: 570px)
{
- div.mainmenu {
+ /* Reduce login top right info */
+ .usertextatoplogin {
+ display: none;
+ }
+ div#tmenu_tooltip {
+
+ display:none;
+
+ padding-: 78px;
+
+ }
+ div.login_block {
+ top: 9px;
+ }
+
+ div.mainmenu {
min-width: 20px;
}
.topmenuimage {
@@ -3887,9 +3901,8 @@ border-top-right-radius: 6px;
#tooltip {
position: absolute;
width: px;
- }
+ }
}
-
close();
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index 0fa988c16e8..db6cfa50f86 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -499,7 +499,7 @@ div.confirmmessage {
.maxwidth100 { max-width: 100px; }
.maxwidth200 { max-width: 200px; }
.maxwidth300 { max-width: 300px; }
-.titlefield { width: 25%; }
+.titlefield { width: 30%; }
.hideonsmartphone { display: none; }
.noenlargeonsmartphone { width : 50px !important; display: inline !important; }
@@ -731,7 +731,7 @@ div#tmenu_tooltip {
display:none;
- /* padding-: echo ($maxwidthloginblock - 10); ?>px; */
+ /* padding-: px; */
}
@@ -913,7 +913,6 @@ div.mainmenu.members {
div.mainmenu.products {
background-image: url();
- margin-left: 10px;
}
div.mainmenu.project {
@@ -3715,7 +3714,22 @@ border-top-right-radius: 6px;
}
@media only screen and (max-width: 570px)
{
- div.mainmenu {
+ /* Reduce login top right info */
+ .usertextatoplogin {
+ display: none;
+ }
+ div#tmenu_tooltip {
+
+ display:none;
+
+ /* padding-: 78px; */
+
+ }
+ div.login_block {
+ top: 9px;
+ }
+
+ div.mainmenu {
min-width: 20px;
}
.topmenuimage {
diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php
index ae56be28aec..965ac2544b8 100644
--- a/htdocs/user/class/user.class.php
+++ b/htdocs/user/class/user.class.php
@@ -1842,23 +1842,24 @@ class User extends CommonObject
* Return a link to the user card (with optionaly the picto)
* Use this->id,this->lastname, this->firstname
*
- * @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto)
+ * @param int $withpictoimg Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto, -1=Include photo into link, -2=Only picto photo)
* @param string $option On what the link point to
* @param integer $infologin Add connection info to the tooltip
- * @param integer $notooltip 1=Disable tooltip
+ * @param integer $notooltip 1=Disable tooltip on picto and name
* @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
* @param string $morecss Add more css on link
* @return string String with URL
*/
- function getNomUrl($withpicto=0, $option='', $infologin=0, $notooltip=0, $maxlen=24, $hidethirdpartylogo=0, $mode='',$morecss='')
+ function getNomUrl($withpictoimg=0, $option='', $infologin=0, $notooltip=0, $maxlen=24, $hidethirdpartylogo=0, $mode='',$morecss='')
{
global $langs, $conf, $db;
global $dolibarr_main_authentication, $dolibarr_main_demo;
global $menumanager;
-
+ if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && $withpictoimg) $withpictoimg=0;
+
$result = '';
$companylink = '';
@@ -1908,18 +1909,28 @@ class User extends CommonObject
if (! empty($_SESSION["disablemodules"])) $label.= '
'.$langs->trans("DisabledModules").': '.join(', ',explode(',',$_SESSION["disablemodules"]));
}
-
- $link = '
';
$linkend='';
- if ($withpicto)
+ if (abs($withpictoimg) == 1) $result.='
';
+ $result.=$link;
+ if ($withpictoimg)
{
- $result.=($link.img_object(($notooltip?'':$label), 'user', ($notooltip?'':'class="classfortooltip"')).$linkend);
- if ($withpicto != 2) $result.=' ';
+ $paddafterimage='';
+ if (abs($withpictoimg) == 1) $paddafterimage='style="padding-right: 3px;"';
+ if ($withpictoimg > 0) $picto='
'.img_object('', 'user', $paddafterimage.' '.($notooltip?'':'class="classfortooltip"')).'
';
+ else $picto='
'.Form::showphoto('userphoto', $this, 0, 0, 0, 'loginphoto').'
';
+ $result.=$picto;
}
- $result.= $link . $this->getFullName($langs,'',($mode == 'firstname' ? 2 : -1),$maxlen) . $linkend . $companylink;
+ if (abs($withpictoimg) != 2)
+ {
+ $result.='
'.$this->getFullName($langs,'',($mode == 'firstname' ? 2 : -1),$maxlen).'
';
+ }
+ $result.=$linkend;
+ if (abs($withpictoimg) == 1) $result.='
';
+ $result.=$companylink;
return $result;
}