Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
968b2b43
Commit
968b2b43
authored
10 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Better position for username
parent
52222ecd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
htdocs/main.inc.php
+1
-38
1 addition, 38 deletions
htdocs/main.inc.php
htdocs/user/class/user.class.php
+4
-3
4 additions, 3 deletions
htdocs/user/class/user.class.php
with
5 additions
and
41 deletions
htdocs/main.inc.php
+
1
−
38
View file @
968b2b43
...
...
@@ -1401,43 +1401,6 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
$form
=
new
Form
(
$db
);
// Define link to login card
/*
$loginhtmltext=''; $logintext='';
if ($user->societe_id)
{
$thirdpartystatic=new Societe($db);
$thirdpartystatic->fetch($user->societe_id);
$companylink=' ('.$thirdpartystatic->getNomUrl('','').')';
$company=' ('.$langs->trans("Company").': '.$thirdpartystatic->name.')';
}
$logintext='<div class="login"><a href="'.DOL_URL_ROOT.'/user/card.php?id='.$user->id.'"';
$logintext.=$target?(' target="'.$target.'"'):'';
$logintext.='>'.$user->login.'</a>';
if ($user->societe_id) $logintext.=$companylink;
$logintext.='</div>';
$loginhtmltext.='<u>'.$langs->trans("User").'</u>';
$loginhtmltext.='<br><b>'.$langs->trans("Name").'</b>: '.$user->getFullName($langs);
$loginhtmltext.='<br><b>'.$langs->trans("Login").'</b>: '.$user->login;
$loginhtmltext.='<br><b>'.$langs->trans("EMail").'</b>: '.$user->email;
$loginhtmltext.='<br><b>'.$langs->trans("Administrator").'</b>: '.yn($user->admin);
$type=($user->societe_id?$langs->trans("External").$company:$langs->trans("Internal"));
$loginhtmltext.='<br><b>'.$langs->trans("Type").'</b>: '.$type;
$loginhtmltext.='<br>';
$loginhtmltext.='<br><u>'.$langs->trans("Connection").'</u>';
$loginhtmltext.='<br><b>'.$langs->trans("IPAddress").'</b>: '.$_SERVER["REMOTE_ADDR"];
if (! empty($conf->global->MAIN_MODULE_MULTICOMPANY)) $loginhtmltext.='<br><b>'.$langs->trans("ConnectedOnMultiCompany").'</b>: '.$conf->entity.' (user entity '.$user->entity.')';
$loginhtmltext.='<br><b>'.$langs->trans("AuthenticationMode").'</b>: '.$_SESSION["dol_authmode"].(empty($dolibarr_main_demo)?'':' (demo)');
$loginhtmltext.='<br><b>'.$langs->trans("ConnectedSince").'</b>: '.dol_print_date($user->datelastlogin,"dayhour");
$loginhtmltext.='<br><b>'.$langs->trans("PreviousConnexion").'</b>: '.dol_print_date($user->datepreviouslogin,"dayhour");
$loginhtmltext.='<br><b>'.$langs->trans("CurrentTheme").'</b>: '.$conf->theme;
$loginhtmltext.='<br><b>'.$langs->trans("CurrentMenuManager").'</b>: '.$menumanager->name;
$s=picto_from_langcode($langs->getDefaultLang());
$loginhtmltext.='<br><b>'.$langs->trans("CurrentUserLanguage").'</b>: '.($s?$s.' ':'').$langs->getDefaultLang();
$loginhtmltext.='<br><b>'.$langs->trans("Browser").'</b>: '.$conf->browser->name.($conf->browser->version?' '.$conf->browser->version:'').' ('.$_SERVER['HTTP_USER_AGENT'].')';
if (! empty($conf->browser->phone)) $loginhtmltext.='<br><b>'.$langs->trans("Phone").'</b>: '.$conf->browser->phone;
if (! empty($_SESSION["disablemodules"])) $loginhtmltext.='<br><b>'.$langs->trans("DisabledModules").'</b>: <br>'.join(', ',explode(',',$_SESSION["disablemodules"]));
*/
$appli
=
'Dolibarr'
;
if
(
!
empty
(
$conf
->
global
->
MAIN_APPLICATION_TITLE
))
{
...
...
@@ -1471,7 +1434,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
$toprightmenu
.
=
'<div class="login_block_user">'
;
// Add login user link
//$toprightmenu.=$form->textwithtooltip('',$loginhtmltext,2,1,$logintext,'login_block_elem2',2); // This include div class="login"
$toprightmenu
.
=
$user
->
getNomurl
(
0
,
''
,
1
);
$toprightmenu
.
=
$user
->
getNomurl
(
0
,
''
,
true
,
0
,
1
1
);
$toprightmenu
.
=
'</div>'
;
$toprightmenu
.
=
'<div class="login_block_other">'
;
...
...
This diff is collapsed.
Click to expand it.
htdocs/user/class/user.class.php
+
4
−
3
View file @
968b2b43
...
...
@@ -1779,9 +1779,10 @@ class User extends CommonObject
* @param string $option On what the link point to
* @param boolean $infologin Add connection info to the tooltip
* @param string $notooltip 1=Disable tooltip
* @param int $maxlen Max length of visible user name
* @return string String with URL
*/
function
getNomUrl
(
$withpicto
=
0
,
$option
=
''
,
$infologin
=
0
,
$notooltip
=
0
)
function
getNomUrl
(
$withpicto
=
0
,
$option
=
''
,
$infologin
=
0
,
$notooltip
=
0
,
$maxlen
=
24
)
{
global
$langs
,
$conf
,
$db
;
global
$dolibarr_main_authentication
,
$dolibarr_main_demo
;
...
...
@@ -1792,7 +1793,7 @@ class User extends CommonObject
$label
=
'<u>'
.
$langs
->
trans
(
"User"
)
.
'</u>'
;
$label
.
=
'<div width="100%">'
;
$label
.
=
'<b>'
.
$langs
->
trans
(
'Name'
)
.
':</b> '
.
$this
->
getFullName
(
$langs
,
''
,
''
,
24
);
$label
.
=
'<b>'
.
$langs
->
trans
(
'Name'
)
.
':</b> '
.
$this
->
getFullName
(
$langs
,
''
,
''
);
if
(
!
empty
(
$this
->
login
))
$label
.
=
'<br><b>'
.
$langs
->
trans
(
'Login'
)
.
':</b> '
.
$this
->
login
;
if
(
!
empty
(
$this
->
email
))
...
...
@@ -1845,7 +1846,7 @@ class User extends CommonObject
$result
.
=
(
$lien
.
img_object
((
$notooltip
?
''
:
$label
),
'user'
,
(
$notooltip
?
''
:
'class="classfortooltip"'
))
.
$lienfin
);
if
(
$withpicto
!=
2
)
$result
.
=
' '
;
}
$result
.
=
$lien
.
$this
->
getFullName
(
$langs
,
''
,
''
,
24
)
.
$companylink
.
$lienfin
;
$result
.
=
$lien
.
$this
->
getFullName
(
$langs
,
''
,
''
,
$maxlen
)
.
$companylink
.
$lienfin
;
return
$result
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment