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
ef5ff2f2
Commit
ef5ff2f2
authored
9 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Use the complete popup on user in user list and hierarchy view.
parent
a52be157
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
htdocs/user/class/user.class.php
+14
-10
14 additions, 10 deletions
htdocs/user/class/user.class.php
htdocs/user/hierarchy.php
+3
-0
3 additions, 0 deletions
htdocs/user/hierarchy.php
htdocs/user/index.php
+15
-2
15 additions, 2 deletions
htdocs/user/index.php
with
32 additions
and
12 deletions
htdocs/user/class/user.class.php
+
14
−
10
View file @
ef5ff2f2
...
...
@@ -1816,14 +1816,15 @@ 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 string $option On what the link point to
* @param integer $infologin Add connection info to the tooltip
* @param integer $notooltip 1=Disable tooltip
* @param int $maxlen Max length of visible user name
* @return string String with URL
* @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto)
* @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 int $maxlen Max length of visible user name
* @param int $hidethirdpartylogo Hide logo of thirdparty if user is external user
* @return string String with URL
*/
function
getNomUrl
(
$withpicto
=
0
,
$option
=
''
,
$infologin
=
0
,
$notooltip
=
0
,
$maxlen
=
24
)
function
getNomUrl
(
$withpicto
=
0
,
$option
=
''
,
$infologin
=
0
,
$notooltip
=
0
,
$maxlen
=
24
,
$hidethirdpartylogo
=
0
)
{
global
$langs
,
$conf
,
$db
;
global
$dolibarr_main_authentication
,
$dolibarr_main_demo
;
...
...
@@ -1841,11 +1842,11 @@ class User extends CommonObject
$label
.
=
'<br><b>'
.
$langs
->
trans
(
"EMail"
)
.
':</b> '
.
$this
->
email
;
if
(
!
empty
(
$this
->
admin
))
$label
.
=
'<br><b>'
.
$langs
->
trans
(
"Administrator"
)
.
'</b>: '
.
yn
(
$this
->
admin
);
if
(
!
empty
(
$this
->
societe_id
))
// Add thirdparty for external users
if
(
!
empty
(
$this
->
societe_id
)
)
// Add thirdparty for external users
{
$thirdpartystatic
=
new
Societe
(
$db
);
$thirdpartystatic
->
fetch
(
$this
->
societe_id
);
$companylink
=
' '
.
$thirdpartystatic
->
getNomUrl
(
2
);
// picto only of company
if
(
empty
(
$hidethirdpartylogo
))
$companylink
=
' '
.
$thirdpartystatic
->
getNomUrl
(
2
);
// picto only of company
$company
=
' ('
.
$langs
->
trans
(
"Company"
)
.
': '
.
$thirdpartystatic
->
name
.
')'
;
}
$type
=
(
$this
->
societe_id
?
$langs
->
trans
(
"External"
)
.
$company
:
$langs
->
trans
(
"Internal"
));
...
...
@@ -2340,7 +2341,7 @@ class User extends CommonObject
$this
->
load_parentof
();
// Init $this->users array
$sql
=
"SELECT DISTINCT u.rowid, u.firstname, u.lastname, u.fk_user, u.
login
, u.statut, u.entity"
;
// Distinct reduce pb with old tables with duplicates
$sql
=
"SELECT DISTINCT u.rowid, u.firstname, u.lastname, u.fk_user, u.
fk_soc, u.login, u.email, u.gender
, u.statut, u.entity"
;
// Distinct reduce pb with old tables with duplicates
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"user as u"
;
if
(
!
empty
(
$conf
->
multicompany
->
enabled
)
&&
$conf
->
entity
==
1
&&
(
!
empty
(
$conf
->
multicompany
->
transverse_mode
)
||
(
!
empty
(
$user
->
admin
)
&&
empty
(
$user
->
entity
))))
{
...
...
@@ -2360,11 +2361,14 @@ class User extends CommonObject
$this
->
users
[
$obj
->
rowid
][
'rowid'
]
=
$obj
->
rowid
;
$this
->
users
[
$obj
->
rowid
][
'id'
]
=
$obj
->
rowid
;
$this
->
users
[
$obj
->
rowid
][
'fk_user'
]
=
$obj
->
fk_user
;
$this
->
users
[
$obj
->
rowid
][
'fk_soc'
]
=
$obj
->
fk_soc
;
$this
->
users
[
$obj
->
rowid
][
'firstname'
]
=
$obj
->
firstname
;
$this
->
users
[
$obj
->
rowid
][
'lastname'
]
=
$obj
->
lastname
;
$this
->
users
[
$obj
->
rowid
][
'login'
]
=
$obj
->
login
;
$this
->
users
[
$obj
->
rowid
][
'statut'
]
=
$obj
->
statut
;
$this
->
users
[
$obj
->
rowid
][
'entity'
]
=
$obj
->
entity
;
$this
->
users
[
$obj
->
rowid
][
'email'
]
=
$obj
->
email
;
$this
->
users
[
$obj
->
rowid
][
'gender'
]
=
$obj
->
gender
;
$i
++
;
}
}
...
...
This diff is collapsed.
Click to expand it.
htdocs/user/hierarchy.php
+
3
−
0
View file @
ef5ff2f2
...
...
@@ -78,6 +78,9 @@ foreach($fulltree as $key => $val)
$userstatic
->
firstname
=
$val
[
'firstname'
];
$userstatic
->
lastname
=
$val
[
'lastname'
];
$userstatic
->
statut
=
$val
[
'statut'
];
$userstatic
->
email
=
$val
[
'email'
];
$userstatic
->
gender
=
$val
[
'gender'
];
$userstatic
->
societe_id
=
$val
[
'fk_soc'
];
$entity
=
$val
[
'entity'
];
$entitystring
=
''
;
...
...
This diff is collapsed.
Click to expand it.
htdocs/user/index.php
+
15
−
2
View file @
ef5ff2f2
...
...
@@ -83,7 +83,7 @@ $buttonviewhierarchy='<form action="'.DOL_URL_ROOT.'/user/hierarchy.php" method=
print_fiche_titre
(
$langs
->
trans
(
"ListOfUsers"
),
$buttonviewhierarchy
);
$sql
=
"SELECT u.rowid, u.lastname, u.firstname, u.admin, u.fk_soc, u.login,"
;
$sql
=
"SELECT u.rowid, u.lastname, u.firstname, u.admin, u.fk_soc, u.login,
u.email, u.gender,
"
;
$sql
.
=
" u.datec,"
;
$sql
.
=
" u.tms as datem,"
;
$sql
.
=
" u.datelastlogin,"
;
...
...
@@ -168,8 +168,21 @@ if ($result)
$obj
=
$db
->
fetch_object
(
$result
);
$var
=!
$var
;
$userstatic
->
id
=
$obj
->
id
;
$userstatic
->
ref
=
$obj
->
label
;
$userstatic
->
login
=
$obj
->
login
;
$userstatic
->
statut
=
$obj
->
statut
;
$userstatic
->
email
=
$obj
->
email
;
$userstatic
->
gender
=
$obj
->
gender
;
$userstatic
->
societe_id
=
$obj
->
fk_soc
;
$userstatic
->
firstname
=
''
;
$userstatic
->
lastname
=
$obj
->
login
;
$li
=
$userstatic
->
getNomUrl
(
1
,
''
,
0
,
0
,
24
,
1
);
print
"<tr "
.
$bc
[
$var
]
.
">"
;
print
'<td><a href="card.php?id='
.
$obj
->
rowid
.
'">'
.
img_object
(
$langs
->
trans
(
"ShowUser"
),
"user"
)
.
' '
.
$obj
->
login
.
'</a>'
;
print
'<td>'
;
print
$li
;
if
(
!
empty
(
$conf
->
multicompany
->
enabled
)
&&
$obj
->
admin
&&
!
$obj
->
entity
)
{
print
img_picto
(
$langs
->
trans
(
"SuperAdministrator"
),
'redstar'
);
...
...
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