Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mailinabox
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mailinabox
Commits
8dfbb90f
Commit
8dfbb90f
authored
Sep 21, 2014
by
Joshua Tauberer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
admin: simplify the users table a bit
parent
c7c3bd33
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
24 deletions
+23
-24
users.html
management/templates/users.html
+23
-24
No files found.
management/templates/users.html
View file @
8dfbb90f
...
@@ -2,12 +2,12 @@
...
@@ -2,12 +2,12 @@
<style>
<style>
#user_table
tr
.account_inactive
td
.address
{
color
:
#888
;
text-decoration
:
line-through
;
}
#user_table
tr
.account_inactive
td
.address
{
color
:
#888
;
text-decoration
:
line-through
;
}
#user_table
.aliases
{
margin
:
.25em
0
0
1
em
;
font-size
:
95%
;
}
#user_table
.aliases
{
margin
-top
:
.33
em
;
font-size
:
95%
;
}
#user_table
.aliases
div
:before
{
content
:
"⇖ "
;
}
#user_table
.aliases
div
:before
{
content
:
"⇖ "
;
}
#user_table
.aliases
div
{
}
#user_table
.aliases
div
{
}
#user_table
.actions
{
margin
:
.25em
0
0
1
em
;
font-size
:
95%
;
}
#user_table
.actions
{
margin
-top
:
.33
em
;
font-size
:
95%
;
}
#user_table
.account_inactive
.
actions
a
.arch
ive
{
display
:
none
;
}
#user_table
.account_inactive
.
if_act
ive
{
display
:
none
;
}
#user_table
.account_active
.
actions
.restor
e
{
display
:
none
;
}
#user_table
.account_active
.
if_inactiv
e
{
display
:
none
;
}
</style>
</style>
<h3>
Add a mail user
</h3>
<h3>
Add a mail user
</h3>
...
@@ -38,13 +38,6 @@
...
@@ -38,13 +38,6 @@
<h3>
Existing mail users
</h3>
<h3>
Existing mail users
</h3>
<table
id=
"user_table"
class=
"table"
style=
"width: auto"
>
<table
id=
"user_table"
class=
"table"
style=
"width: auto"
>
<thead>
<tr>
<th></th>
<th>
Email Address
<br><small
style=
"font-weight: normal"
>
(Also the user
’
s login username.)
</small></th>
<th>
Privileges
</th>
</tr>
</thead>
<tbody>
<tbody>
</tbody>
</tbody>
</table>
</table>
...
@@ -52,19 +45,25 @@
...
@@ -52,19 +45,25 @@
<div
style=
"display: none"
>
<div
style=
"display: none"
>
<table>
<table>
<tr
id=
"user-template"
>
<tr
id=
"user-template"
>
<td
class=
'actions'
>
<a
href=
"#"
onclick=
"users_remove(this); return false;"
class=
'archive'
title=
"Archive Account"
>
<span
class=
"glyphicon glyphicon-trash"
></span>
</a>
</td>
<td
class=
'email'
>
<td
class=
'email'
>
<div
class=
'address'
>
</div>
<div
class=
'address'
>
</div>
<div
class=
'aliases'
style=
'display: none'
>
</div>
<div
class=
'actions'
>
<div
class=
'actions'
>
<span
class=
'restore'
style=
'color: #888; font-size: 90%'
>
To restore account, create a new account with this email address.
</span>
<span
class=
'privs'
>
</span>
<span
class=
'add-privs'
>
</span>
<a
href=
"#"
onclick=
"users_remove(this); return false;"
class=
'if_active'
title=
"Archive Account"
>
archive account
</a>
<div
class=
'if_inactive'
style=
'color: #888; font-size: 90%'
>
To restore account, create a new account with this email address.
</div>
</div>
</div>
<div
class=
'aliases'
style=
'display: none'
>
</div>
</td>
</td>
<td
class=
'privs'
>
</td>
</tr>
</tr>
</table>
</table>
</div>
</div>
...
@@ -88,22 +87,22 @@ function show_users() {
...
@@ -88,22 +87,22 @@ function show_users() {
n
.
find
(
'
td.email .address
'
).
text
(
r
[
i
].
email
)
n
.
find
(
'
td.email .address
'
).
text
(
r
[
i
].
email
)
$
(
'
#user_table tbody
'
).
append
(
n
);
$
(
'
#user_table tbody
'
).
append
(
n
);
if
(
r
[
i
].
status
==
'
inactive
'
)
continue
;
if
(
r
[
i
].
status
==
'
inactive
'
)
continue
;
var
add_privs
=
[
"
admin
"
];
var
add_privs
=
[
"
admin
"
];
for
(
var
j
=
0
;
j
<
r
[
i
].
privileges
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
r
[
i
].
privileges
.
length
;
j
++
)
{
var
p
=
$
(
"
<
div><span class='name'></span> <a href='#' onclick='mod_priv(this,
\"
remove
\"
); return false;' title='Remove Privilege'><span class=
\"
glyphicon glyphicon-trash
\"
style='font-size: 90%'></span></a></div
>
"
);
var
p
=
$
(
"
<
span><b><span class='name'></span></b> (<a href='#' onclick='mod_priv(this,
\"
remove
\"
); return false;' title='Remove Privilege'>remove privilege</a>) |</span
>
"
);
p
.
find
(
'
span.name
'
).
text
(
r
[
i
].
privileges
[
j
]);
p
.
find
(
'
span.name
'
).
text
(
r
[
i
].
privileges
[
j
]);
n
.
find
(
'
td
.privs
'
).
append
(
p
);
n
.
find
(
'
.privs
'
).
append
(
p
);
if
(
add_privs
.
indexOf
(
r
[
i
].
privileges
[
j
])
>=
0
)
if
(
add_privs
.
indexOf
(
r
[
i
].
privileges
[
j
])
>=
0
)
add_privs
.
splice
(
add_privs
.
indexOf
(
r
[
i
].
privileges
[
j
]),
1
);
add_privs
.
splice
(
add_privs
.
indexOf
(
r
[
i
].
privileges
[
j
]),
1
);
}
}
for
(
var
j
=
0
;
j
<
add_privs
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
add_privs
.
length
;
j
++
)
{
var
p
=
$
(
"
<
div><small><a href='#' onclick='mod_priv(this,
\"
add
\"
); return false;' title='Add Privilege'><span class=
\"
glyphicon glyphicon-plus
\"
style='font-size: 80%'></span><span class='name' style='padding-left: 3px'></span></a></small></div
>
"
);
var
p
=
$
(
"
<
span><a href='#' onclick='mod_priv(this,
\"
add
\"
); return false;' title='Add Privilege'>make <span class='name'></span></a> | </span
>
"
);
p
.
find
(
'
span.name
'
).
text
(
add_privs
[
j
]);
p
.
find
(
'
span.name
'
).
text
(
add_privs
[
j
]);
n
.
find
(
'
.
email .action
s
'
).
append
(
p
);
n
.
find
(
'
.
add-priv
s
'
).
append
(
p
);
}
}
if
(
r
[
i
].
aliases
&&
r
[
i
].
aliases
.
length
>
0
)
{
if
(
r
[
i
].
aliases
&&
r
[
i
].
aliases
.
length
>
0
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment