diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 52f360d57a5..eed717a611a 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -1722,6 +1722,9 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead
function top_menu_user(user $user, $langs){
+ global $langs, $conf, $db, $hookmanager, $user;
+ global $dolibarr_main_authentication, $dolibarr_main_demo;
+ global $menumanager;
$userImage = $userDropDownImage = '';
if (! empty($user->photo))
@@ -1730,10 +1733,70 @@ function top_menu_user(user $user, $langs){
$userDropDownImage = Form::showphoto('userphoto', $user, 0, 0, 0, 'dropdown-user-image', 'small', 0, 1);
}
+ // login infos
+ $dropdownBody = '';
+ if (!empty($user->admin)){
+ $dropdownBody.= '
' . $langs->trans("Administrator").': '.yn($user->admin);
+ }
+
+ if (! empty($user->socid) ) // Add thirdparty for external users
+ {
+ $thirdpartystatic = new Societe($db);
+ $thirdpartystatic->fetch($user->socid);
+ $companylink = ' '.$thirdpartystatic->getNomUrl(2); // picto only of company
+ $company=' ('.$langs->trans("Company").': '.$thirdpartystatic->name.')';
+ }
+ $type=($user->socid?$langs->trans("External").$company:$langs->trans("Internal"));
+ $dropdownBody.= '
' . $langs->trans("Type") . ': ' . $type;
+ $dropdownBody.= '
' . $langs->trans("Status").': '.$user->getLibStatut(0);
+
+
+ $dropdownBody.= '
';
+ $dropdownBody.= '
'.$langs->trans("Connection").'';
+ $dropdownBody.= '
'.$langs->trans("IPAddress").': '.$_SERVER["REMOTE_ADDR"];
+ if (! empty($conf->global->MAIN_MODULE_MULTICOMPANY)) $dropdownBody.= '
'.$langs->trans("ConnectedOnMultiCompany").': '.$conf->entity.' (user entity '.$user->entity.')';
+ $dropdownBody.= '
'.$langs->trans("AuthenticationMode").': '.$_SESSION["dol_authmode"].(empty($dolibarr_main_demo)?'':' (demo)');
+ $dropdownBody.= '
'.$langs->trans("ConnectedSince").': '.dol_print_date($user->datelastlogin, "dayhour", 'tzuser');
+ $dropdownBody.= '
'.$langs->trans("PreviousConnexion").': '.dol_print_date($user->datepreviouslogin, "dayhour", 'tzuser');
+ $dropdownBody.= '
'.$langs->trans("CurrentTheme").': '.$conf->theme;
+ $dropdownBody.= '
'.$langs->trans("CurrentMenuManager").': '.$menumanager->name;
+ $s=picto_from_langcode($langs->getDefaultLang());
+ $dropdownBody.= '
'.$langs->trans("CurrentUserLanguage").': '.($s?$s.' ':'').$langs->getDefaultLang();
+ $dropdownBody.= '
'.$langs->trans("Browser").': '.$conf->browser->name.($conf->browser->version?' '.$conf->browser->version:'').' ('.$_SERVER['HTTP_USER_AGENT'].')';
+ $dropdownBody.= '
'.$langs->trans("Layout").': '.$conf->browser->layout;
+ $dropdownBody.= '
'.$langs->trans("Screen").': '.$_SESSION['dol_screenwidth'].' x '.$_SESSION['dol_screenheight'];
+ if ($conf->browser->layout == 'phone') $dropdownBody.= '
'.$langs->trans("Phone").': '.$langs->trans("Yes");
+ if (! empty($_SESSION["disablemodules"])) $dropdownBody.= '
'.$langs->trans("DisabledModules").':
'.join(', ', explode(',', $_SESSION["disablemodules"]));
+
+
+ // Execute hook
+ $parameters=array('user'=>$user, 'langs' => $langs);
+ $result=$hookmanager->executeHooks('printTopRightMenuLoginDropdownBody', $parameters); // Note that $action and $object may have been modified by some hooks
+ if (is_numeric($result))
+ {
+ if ($result == 0){
+ $dropdownBody.= $hookmanager->resPrint; // add
+ }
+ else{
+ $dropdownBody = $hookmanager->resPrint; // replace
+ }
+ }
+
+
+
+ $logoutLink ='';
+ $profilLink ='';
+
+
+ $profilName = $user->getFullName($langs).' ('.$user->login.')';
+
+ if($user->admin){
+ $profilName = ' '.$profilName;
+ }
$btnUser = '
-
+
';
diff --git a/htdocs/theme/eldy/_dropdown.css.php b/htdocs/theme/eldy/_dropdown.css.php
index c6ad165fc00..b5575273227 100644
--- a/htdocs/theme/eldy/_dropdown.css.php
+++ b/htdocs/theme/eldy/_dropdown.css.php
@@ -9,6 +9,7 @@ if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
.open>.dropdown-menu {
display: block;
}
+
.dropdown-menu {
box-shadow: none;
border-color: #eee;
@@ -42,15 +43,22 @@ if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
* MENU Dropdown
*/
+.tmenu .open.dropdown, .login_block .open.dropdown{
+ background: rgba(0, 0, 0, 0.1);
+}
.tmenu .dropdown-menu, .login_block .dropdown-menu {
position: absolute;
right: 0;
left: auto;
+ line-height:1.3em;
}
.tmenu .dropdown-menu, .login_block .dropdown-menu .user-body {
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
}
+.user-body {
+ color: #333;
+}
.side-nav-vert .user-menu .dropdown-menu {
border-top-right-radius: 0;
border-top-left-radius: 0;
@@ -70,17 +78,6 @@ if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
text-align: center;
}
-
-.dropdown-menu > li.user-header > img {
- z-index: 5;
- height: 90px;
- width: 90px;
- border: 3px solid;
- border-color: transparent;
- border-color: rgba(255, 255, 255, 0.2);
-}
-
-
.dropdown-user-image {
border-radius: 50%;
vertical-align: middle;
@@ -98,4 +95,52 @@ if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
background: rgb();
}
+.dropdown-menu > .user-footer {
+ background-color: #f9f9f9;
+ padding: 10px;
+}
+
+.dropdown-menu > .user-footer:after {
+ clear: both;
+}
+
+.dropdown-menu > .user-body {
+ padding: 15px;
+ border-bottom: 1px solid #f4f4f4;
+ border-top: 1px solid #dddddd;
+}
+
+
+.button-top-menu-dropdown {
+ display: inline-block;
+ padding: 6px 12px;
+ margin-bottom: 0;
+ font-size: 14px;
+ font-weight: 400;
+ line-height: 1.42857143;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: middle;
+ -ms-touch-action: manipulation;
+ touch-action: manipulation;
+ cursor: pointer;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ background-image: none;
+ border: 1px solid transparent;
+ border-radius: 4px;
+}
+
+.dropdown-menu > .user-footer .button-top-menu-dropdown {
+ color: #666666;
+ border-radius: 0;
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+ border-width: 1px;
+ background-color: #f4f4f4;
+ border-color: #ddd;
+}
\ No newline at end of file
diff --git a/htdocs/theme/eldy/_global.css.php b/htdocs/theme/eldy/_global.css.php
index 069e90e2110..3b881b4e34b 100644
--- a/htdocs/theme/eldy/_global.css.php
+++ b/htdocs/theme/eldy/_global.css.php
@@ -362,6 +362,9 @@ th .button {
textarea.centpercent {
width: 96%;
}
+.small, small {
+ font-size: 85%;
+}
.center {
text-align: center;
margin: 0px auto;
@@ -375,6 +378,12 @@ textarea.centpercent {
.justify {
text-align: justify;
}
+.pull-left {
+ float: left!important;
+}
+.pull-right {
+ float: right!important;
+}
.nowrap {
white-space: ;
}