Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
fusiondirectory
fusiondirectory
Commits
f7915f98
Commit
f7915f98
authored
7 years ago
by
Côme Chilliet
Browse files
Options
Download
Patches
Plain Diff
Fixes #5547 Adapted dashboard users code to ease ppolicy tab enhancement
parent
5b559a84
dev
6342-update-the-locales-for-1-5
6344-template-issue-when-creating-a-template-with-empty-password-error-message-should-not-be-seen
6365-core-locking-mechanism-is-not-changing-the-mail-ressource-it-does-lock-the-mail-account
6365-core-when-lock-mechanism-is-trigger-the-user-should-not-be-editable-if-not-unlock
6378-orcid-test-method-is-wrong-and-break-orcid-saving
core-php8
master
fusiondirectory-1.5
fusiondirectory-1.4
fusiondirectory-1.3.1
fusiondirectory-1.3
fusiondirectory-1.2.3
fusiondirectory-1.2.2
fusiondirectory-1.2.1
fusiondirectory-1.2
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
plugins/addons/dashboard/class_dashBoardUsers.inc
+21
-3
plugins/addons/dashboard/class_dashBoardUsers.inc
plugins/addons/dashboard/users_accounts.tpl
+39
-41
plugins/addons/dashboard/users_accounts.tpl
with
60 additions
and
44 deletions
+60
-44
plugins/addons/dashboard/class_dashBoardUsers.inc
+
21
−
3
View file @
f7915f98
...
@@ -57,6 +57,19 @@ class dashboardUsers extends simplePlugin
...
@@ -57,6 +57,19 @@ class dashboardUsers extends simplePlugin
{
{
parent
::
__construct
(
$dn
,
$object
,
$parent
,
$mainTab
);
parent
::
__construct
(
$dn
,
$object
,
$parent
,
$mainTab
);
$this
->
expiredAccountsColumns
=
array
(
'user'
=>
array
(
'uid'
=>
_
(
'Login'
),
'cn'
=>
_
(
'Name'
),
'telephoneNumber'
=>
_
(
'Phone number'
),
'expirationDate'
=>
_
(
'Expiration date'
),
),
'manager'
=>
array
(
'manager_cn'
=>
_
(
'Name'
),
'manager_mail'
=>
_
(
'Email'
),
'manager_phone'
=>
_
(
'Phone number'
),
)
);
$this
->
users_stats
=
$this
->
computeUsersStats
();
$this
->
users_stats
=
$this
->
computeUsersStats
();
$this
->
groups_stats
=
$this
->
computeGroupsStats
();
$this
->
groups_stats
=
$this
->
computeGroupsStats
();
$this
->
expired
=
$this
->
expired_accounts_info
();
$this
->
expired
=
$this
->
expired_accounts_info
();
...
@@ -155,6 +168,7 @@ class dashboardUsers extends simplePlugin
...
@@ -155,6 +168,7 @@ class dashboardUsers extends simplePlugin
}
}
return
array
(
return
array
(
'columns'
=>
$this
->
expiredAccountsColumns
,
'accounts'
=>
$expired_accounts
,
'accounts'
=>
$expired_accounts
,
'accounts_next_days'
=>
$next_expired_accounts
,
'accounts_next_days'
=>
$next_expired_accounts
,
'next_days'
=>
$next_expired_days
,
'next_days'
=>
$next_expired_days
,
...
@@ -176,8 +190,12 @@ class dashboardUsers extends simplePlugin
...
@@ -176,8 +190,12 @@ class dashboardUsers extends simplePlugin
$manager_phone
=
''
;
$manager_phone
=
''
;
}
}
/* 24 * 60 * 60 = 86400 */
if
(
isset
(
$attrs
[
'shadowExpire'
][
0
]))
{
$human_shadowExpire
=
date
(
'd.m.Y'
,
$attrs
[
'shadowExpire'
][
0
]
*
86400
);
/* 24 * 60 * 60 = 86400 */
$human_shadowExpire
=
date
(
'd.m.Y'
,
$attrs
[
'shadowExpire'
][
0
]
*
86400
);
}
else
{
$human_shadowExpire
=
''
;
}
return
array
(
return
array
(
'uid'
=>
$attrs
[
'uid'
][
0
],
'uid'
=>
$attrs
[
'uid'
][
0
],
...
@@ -187,7 +205,7 @@ class dashboardUsers extends simplePlugin
...
@@ -187,7 +205,7 @@ class dashboardUsers extends simplePlugin
'manager_cn'
=>
$manager_cn
,
'manager_cn'
=>
$manager_cn
,
'manager_mail'
=>
$manager_mail
,
'manager_mail'
=>
$manager_mail
,
'manager_phone'
=>
$manager_phone
,
'manager_phone'
=>
$manager_phone
,
'
shadowExpire'
=>
$human_shadowExpire
,
'
expirationDate'
=>
$human_shadowExpire
,
);
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
plugins/addons/dashboard/users_accounts.tpl
+
39
−
41
View file @
f7915f98
...
@@ -12,41 +12,39 @@
...
@@ -12,41 +12,39 @@
</h1>
</h1>
{
if
$attributes.expired.accounts
|@
count
>
0
}
{
if
$attributes.expired.accounts
|@
count
>
0
}
<table
style=
"width: 100%;"
class=
"listingTable"
>
<table
style=
"width: 100%;"
class=
"listingTable"
>
<colgroup>
<col
width=
"10%"
/>
<col
width=
"15%"
/>
<col
width=
"15%"
/>
<col
width=
"15%"
/>
<col
width=
"15%"
/>
<col
width=
"10%"
/>
</colgroup>
<thead>
<thead>
<tr
style=
"background-color: white; text-align:center;"
>
<tr
style=
"background-color: white; text-align:center;"
>
<th
colspan=
"
4
"
style=
"background-color: white; padding:5px;"
>
<th
colspan=
"
{
$attributes.expired.columns.user
|@
count
}
"
style=
"background-color: white; padding:5px;"
>
{
t
}
Expired accounts
{/
t
}
{
t
}
Expired accounts
{/
t
}
</th>
</th>
<th
colspan=
"
3
"
style=
"background-color: white; padding:5px;"
>
<th
colspan=
"
{
$attributes.expired.columns.manager
|@
count
}
"
style=
"background-color: white; padding:5px;"
>
{
t
}
Manager concerned
{/
t
}
{
t
}
Manager concerned
{/
t
}
</th>
</th>
</tr>
</tr>
<tr
style=
"background-color: #E8E8E8; height:26px;font-weight:bold;"
>
<tr>
<!-- uid/cn/telephonNumber/mail/shadowExpire/sambaKickoffTime -->
{
foreach
from
=
$attributes.expired.columns.user
item
=
colname
}
<th>
{
t
}
uid
{/
t
}
</th><th>
{
t
}
cn
{/
t
}
</th><th>
{
t
}
telephoneNumber
{/
t
}
</th><th>
{
t
}
shadowExpire
{/
t
}
</th>
<th>
{
$colname
}
</th>
<th>
{
t
}
manager
{/
t
}
</th><th>
{
t
}
mail
{/
t
}
</th><th>
{
t
}
telephoneNumber
{/
t
}
</th>
{/
foreach
}
{
foreach
from
=
$attributes.expired.columns.manager
item
=
colname
}
<th>
{
$colname
}
</th>
{/
foreach
}
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
{
foreach
from
=
$attributes.expired.accounts
item
=
account
}
{
foreach
from
=
$attributes.expired.accounts
item
=
account
}
<tr>
<tr>
<td>
{
$account.uid
}
</td>
{
foreach
from
=
$attributes.expired.columns.user
key
=
colkey
item
=
colname
}
<td>
{
$account.cn
}
</td>
<td>
{
$account
.
$colkey
}
</td>
<td>
{
$account.telephoneNumber
}
</td>
{/
foreach
}
<td>
{
$account.shadowExpire
}
</td>
{
foreach
from
=
$attributes.expired.columns.manager
key
=
colkey
item
=
colname
}
<td>
{
$account.manager_cn
}
</td>
{
if
$colkey
==
manager_mail
}
<td><a
href=
"mailto:
{
$account.manager_mail
}
"
>
{
$account.manager_mail
}
</a></td>
<td><a
href=
"mailto:
{
$account
.
$colkey
}
"
>
{
$account
.
$colkey
}
</a></td>
<td>
{
$account.manager_phone
}
</td>
{
else
}
<td>
{
$account
.
$colkey
}
</td>
{/
if
}
{/
foreach
}
</tr>
</tr>
{/
foreach
}
{/
foreach
}
</tbody>
</tbody>
...
@@ -62,39 +60,39 @@
...
@@ -62,39 +60,39 @@
</h1>
</h1>
{
if
$attributes.expired.accounts_next_days
|@
count
>
0
}
{
if
$attributes.expired.accounts_next_days
|@
count
>
0
}
<table
style=
"width: 100%;"
class=
"listingTable"
>
<table
style=
"width: 100%;"
class=
"listingTable"
>
<colgroup>
<col
width=
"10%"
/>
<col
width=
"15%"
/>
<col
width=
"15%"
/>
<col
width=
"15%"
/>
<col
width=
"15%"
/>
<col
width=
"10%"
/>
</colgroup>
<thead>
<thead>
<tr
style=
"background-color: white; text-align:center;"
>
<tr
style=
"background-color: white; text-align:center;"
>
<th
colspan=
"
4
"
style=
"background-color: white; padding:5px;"
>
<th
colspan=
"
{
$attributes.expired.columns.user
|@
count
}
"
style=
"background-color: white; padding:5px;"
>
{
t
}
Next expired accounts
{/
t
}
{
t
}
Next expired accounts
{/
t
}
</th>
</th>
<th
colspan=
"
3
"
style=
"background-color: white; padding:5px;"
>
<th
colspan=
"
{
$attributes.expired.columns.manager
|@
count
}
"
style=
"background-color: white; padding:5px;"
>
{
t
}
Manager concerned
{/
t
}
{
t
}
Manager concerned
{/
t
}
</th>
</th>
</tr>
</tr>
<tr>
<tr>
<!-- uid/cn/telephonNumber/mail/shadowExpire/sambaKickoffTime -->
{
foreach
from
=
$attributes.expired.columns.user
item
=
colname
}
<th>
{
t
}
uid
{/
t
}
</th><th>
{
t
}
cn
{/
t
}
</th><th>
{
t
}
telephoneNumber
{/
t
}
</th><th>
{
t
}
shadowExpire
{/
t
}
</th>
<th>
{
$colname
}
</th>
<th>
{
t
}
manager
{/
t
}
</th><th>
{
t
}
mail
{/
t
}
</th><th>
{
t
}
telephoneNumber
{/
t
}
</th>
{/
foreach
}
{
foreach
from
=
$attributes.expired.columns.manager
item
=
colname
}
<th>
{
$colname
}
</th>
{/
foreach
}
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
{
foreach
from
=
$attributes.expired.accounts_next_days
item
=
account
}
{
foreach
from
=
$attributes.expired.accounts_next_days
item
=
account
}
<tr>
<tr>
<td>
{
$account.uid
}
</td>
{
foreach
from
=
$attributes.expired.columns.user
key
=
colkey
item
=
colname
}
<td>
{
$account.cn
}
</td>
<td>
{
$account
.
$colkey
}
</td>
<td>
{
$account.telephoneNumber
}
</td>
{/
foreach
}
<td>
{
$account.shadowExpire
}
</td>
{
foreach
from
=
$attributes.expired.columns.manager
key
=
colkey
item
=
colname
}
<td>
{
$account.manager_cn
}
</td>
{
if
$colkey
==
manager_mail
}
<td><a
href=
"mailto:
{
$account.manager_mail
}
"
>
{
$account.manager_mail
}
</a></td>
<td><a
href=
"mailto:
{
$account
.
$colkey
}
"
>
{
$account
.
$colkey
}
</a></td>
<td>
{
$account.manager_phone
}
</td>
{
else
}
<td>
{
$account
.
$colkey
}
</td>
{/
if
}
{/
foreach
}
</tr>
</tr>
{/
foreach
}
{/
foreach
}
</tbody>
</tbody>
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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
Menu
Explore
Projects
Groups
Topics
Snippets