Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
ops
jumpserver
Commits
46cc593a
Commit
46cc593a
authored
Feb 03, 2015
by
guanghongwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ȩ֧
parent
70fe42f3
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
232 additions
and
27 deletions
+232
-27
urls.py
jperm/urls.py
+1
-0
views.py
jperm/views.py
+35
-0
mytags.py
jumpserver/templatetags/mytags.py
+1
-1
views.py
juser/views.py
+0
-3
jquery.colorbox.js
static/js/jquery.colorbox.js
+3
-2
foot_script.html
templates/foot_script.html
+11
-3
head_script.html
templates/head_script.html
+0
-3
perm_list.html
templates/jperm/perm_list.html
+45
-7
perm_list_ajax.html
templates/jperm/perm_list_ajax.html
+133
-0
group_list.html
templates/juser/group_list.html
+1
-1
user_list.html
templates/juser/user_list.html
+1
-6
nav.html
templates/nav.html
+1
-1
No files found.
jperm/urls.py
View file @
46cc593a
...
@@ -8,6 +8,7 @@ urlpatterns = patterns('jperm.views',
...
@@ -8,6 +8,7 @@ urlpatterns = patterns('jperm.views',
(
r'^perm_edit/$'
,
'perm_edit'
),
(
r'^perm_edit/$'
,
'perm_edit'
),
(
r'^perm_list/$'
,
'perm_list'
),
(
r'^perm_list/$'
,
'perm_list'
),
(
r'^perm_list_ajax/$'
,
'perm_list_ajax'
),
(
r'^perm_detail/$'
,
'perm_detail'
),
(
r'^perm_detail/$'
,
'perm_detail'
),
(
r'^perm_del/$'
,
'perm_del'
),
(
r'^perm_del/$'
,
'perm_del'
),
(
r'^perm_asset_detail/$'
,
'perm_asset_detail'
),
(
r'^perm_asset_detail/$'
,
'perm_asset_detail'
),
...
...
jperm/views.py
View file @
46cc593a
...
@@ -65,6 +65,41 @@ def perm_list(request):
...
@@ -65,6 +65,41 @@ def perm_list(request):
return
render_to_response
(
'jperm/perm_list.html'
,
locals
())
return
render_to_response
(
'jperm/perm_list.html'
,
locals
())
def
perm_list_ajax
(
request
):
tab
=
request
.
POST
.
get
(
'tab'
,
'tab1'
)
search
=
request
.
POST
.
get
(
'search'
,
''
)
if
tab
==
'tab1'
:
groups
=
contact_list
=
UserGroup
.
objects
.
filter
(
name__icontains
=
search
)
.
order_by
(
'type'
)
p
=
paginator
=
Paginator
(
contact_list
,
10
)
try
:
page
=
int
(
request
.
GET
.
get
(
'page'
,
'1'
))
except
ValueError
:
page
=
1
try
:
contacts
=
paginator
.
page
(
page
)
except
(
EmptyPage
,
InvalidPage
):
contacts
=
paginator
.
page
(
paginator
.
num_pages
)
else
:
users
=
contact_list2
=
User
.
objects
.
filter
(
name__icontains
=
search
)
.
order_by
(
'id'
)
p2
=
paginator2
=
Paginator
(
contact_list2
,
10
)
try
:
page
=
int
(
request
.
GET
.
get
(
'page'
,
'1'
))
except
ValueError
:
page
=
1
try
:
contacts2
=
paginator2
.
page
(
page
)
except
(
EmptyPage
,
InvalidPage
):
contacts2
=
paginator2
.
page
(
paginator2
.
num_pages
)
return
render_to_response
(
'jperm/perm_list_ajax.html'
,
locals
())
def
perm_edit
(
request
):
def
perm_edit
(
request
):
if
request
.
method
==
'GET'
:
if
request
.
method
==
'GET'
:
header_title
,
path1
,
path2
=
u'编辑授权 | Perm Host Edit.'
,
u'jperm'
,
u'perm_edit'
header_title
,
path1
,
path2
=
u'编辑授权 | Perm Host Edit.'
,
u'jperm'
,
u'perm_edit'
...
...
jumpserver/templatetags/mytags.py
View file @
46cc593a
...
@@ -80,7 +80,7 @@ def perm_count(group_id):
...
@@ -80,7 +80,7 @@ def perm_count(group_id):
@register.filter
(
name
=
'group_type_to_str'
)
@register.filter
(
name
=
'group_type_to_str'
)
def
group_type_to_str
(
type_name
):
def
group_type_to_str
(
type_name
):
group_types
=
{
group_types
=
{
'P'
:
'
私有组
'
,
'P'
:
'
用户
'
,
'M'
:
'部门'
,
'M'
:
'部门'
,
'A'
:
'用户组'
,
'A'
:
'用户组'
,
}
}
...
...
juser/views.py
View file @
46cc593a
...
@@ -259,7 +259,6 @@ def group_add(request, group_type_select='A'):
...
@@ -259,7 +259,6 @@ def group_add(request, group_type_select='A'):
msg
=
''
msg
=
''
header_title
,
path1
,
path2
=
'添加属组 | Add Group'
,
'juser'
,
'group_add'
header_title
,
path1
,
path2
=
'添加属组 | Add Group'
,
'juser'
,
'group_add'
group_types
=
{
group_types
=
{
# 'P': '私有组',
'M'
:
'部门'
,
'M'
:
'部门'
,
'A'
:
'用户组'
,
'A'
:
'用户组'
,
}
}
...
@@ -345,7 +344,6 @@ def group_edit(request):
...
@@ -345,7 +344,6 @@ def group_edit(request):
msg
=
''
msg
=
''
header_title
,
path1
,
path2
=
'修改属组 | Edit Group'
,
'juser'
,
'group_edit'
header_title
,
path1
,
path2
=
'修改属组 | Edit Group'
,
'juser'
,
'group_edit'
group_types
=
{
group_types
=
{
# 'P': '私有组',
'M'
:
'部门'
,
'M'
:
'部门'
,
'A'
:
'用户组'
,
'A'
:
'用户组'
,
}
}
...
@@ -367,7 +365,6 @@ def group_edit(request):
...
@@ -367,7 +365,6 @@ def group_edit(request):
users_selected
=
request
.
POST
.
getlist
(
'users_selected'
)
users_selected
=
request
.
POST
.
getlist
(
'users_selected'
)
group_type
=
request
.
POST
.
get
(
'group_type'
)
group_type
=
request
.
POST
.
get
(
'group_type'
)
group
=
UserGroup
.
objects
.
filter
(
id
=
group_id
)
group
=
UserGroup
.
objects
.
filter
(
id
=
group_id
)
# return HttpResponse(group_type)
group
.
update
(
name
=
group_name
,
comment
=
comment
,
type
=
group_type
)
group
.
update
(
name
=
group_name
,
comment
=
comment
,
type
=
group_type
)
group_update_user
(
group_id
,
users_selected
)
group_update_user
(
group_id
,
users_selected
)
...
...
static/js/jquery.colorbox.js
View file @
46cc593a
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
maxHeight
:
false
,
maxHeight
:
false
,
scalePhotos
:
true
,
scalePhotos
:
true
,
scrolling
:
true
,
scrolling
:
true
,
opacity
:
0.
9
,
opacity
:
0.
3
,
preloading
:
true
,
preloading
:
true
,
className
:
false
,
className
:
false
,
overlayClose
:
true
,
overlayClose
:
true
,
...
@@ -418,7 +418,8 @@
...
@@ -418,7 +418,8 @@
$overlay
.
css
({
$overlay
.
css
({
opacity
:
opacity
===
opacity
?
opacity
:
''
,
opacity
:
opacity
===
opacity
?
opacity
:
''
,
cursor
:
settings
.
get
(
'overlayClose'
)
?
'pointer'
:
''
,
cursor
:
settings
.
get
(
'overlayClose'
)
?
'pointer'
:
''
,
visibility
:
'visible'
visibility
:
'visible'
,
// 'background-color': 'black'
}).
show
();
}).
show
();
if
(
settings
.
get
(
'closeButton'
))
{
if
(
settings
.
get
(
'closeButton'
))
{
...
...
templates/foot_script.html
View file @
46cc593a
<!-- Mainly scripts -->
<!-- Mainly scripts -->
<script
src=
"/static/js/jquery-2.1.1.js"
></script>
{#
<script
src=
"/static/js/jquery-2.1.1.js"
></script>
#}
<script
src=
"/static/js/bootstrap.min.js"
></script>
{#
<script
src=
"/static/js/bootstrap.min.js"
></script>
#}
<script
src=
"/static/js/plugins/metisMenu/jquery.metisMenu.js"
></script>
<script
src=
"/static/js/plugins/metisMenu/jquery.metisMenu.js"
></script>
<script
src=
"/static/js/plugins/slimscroll/jquery.slimscroll.min.js"
></script>
<script
src=
"/static/js/plugins/slimscroll/jquery.slimscroll.min.js"
></script>
<script
src=
"/static/js/bootstrap-dialog.js"
></script>
<script
src=
"/static/js/bootstrap-dialog.js"
></script>
...
@@ -21,7 +21,8 @@
...
@@ -21,7 +21,8 @@
<script
src=
"/static/js/base.js"
></script>
<script
src=
"/static/js/base.js"
></script>
<!-- pop windows -->
<script
src=
"/static/js/jquery.colorbox.js"
></script>
<!-- active menu -->
<!-- active menu -->
<script>
<script>
...
@@ -30,3 +31,9 @@
...
@@ -30,3 +31,9 @@
$
(
"#"
+
str
).
addClass
(
'active'
);
$
(
"#"
+
str
).
addClass
(
'active'
);
$
(
"#"
+
str1
).
addClass
(
'active'
);
$
(
"#"
+
str1
).
addClass
(
'active'
);
</script>
</script>
<script>
$
(
document
).
ready
(
function
(){
$
(
".iframe"
).
colorbox
({
iframe
:
true
,
width
:
"70%"
,
height
:
"80%"
});
});
</script>
\ No newline at end of file
templates/head_script.html
View file @
46cc593a
...
@@ -15,9 +15,6 @@
...
@@ -15,9 +15,6 @@
<!-- pop windows -->
<script
src=
"/static/js/jquery.colorbox.js"
></script>
<!-- validator js -->
<!-- validator js -->
<script
src=
"/static/js/validator/jquery.validator.js"
></script>
<script
src=
"/static/js/validator/jquery.validator.js"
></script>
<script
src=
"/static/js/validator/zh_CN.js"
></script>
<script
src=
"/static/js/validator/zh_CN.js"
></script>
templates/jperm/perm_list.html
View file @
46cc593a
...
@@ -33,8 +33,20 @@
...
@@ -33,8 +33,20 @@
<div
class=
"panel-heading"
>
<div
class=
"panel-heading"
>
<div
class=
"panel-options"
>
<div
class=
"panel-options"
>
<ul
class=
"nav nav-tabs"
>
<ul
class=
"nav nav-tabs"
>
<li
class=
"active"
><a
data-toggle=
"tab"
href=
"#tab-1"
>
授权编辑
</a></li>
<li
id=
"tab1"
class=
"active"
><a
data-toggle=
"tab"
href=
"#tab-1"
>
授权编辑
</a></li>
<li
class=
""
><a
data-toggle=
"tab"
href=
"#tab-2"
>
查看授权
</a></li>
<li
id=
"tab2"
class=
""
><a
data-toggle=
"tab"
href=
"#tab-2"
>
查看授权
</a></li>
<li
style=
"float: right"
>
<form
method=
"get"
action=
""
class=
"pull-right mail-search"
>
<div
class=
"input-group"
>
<input
type=
"text"
class=
"form-control input-sm"
id=
"search_input"
name=
"search"
placeholder=
"Search"
>
<div
class=
"input-group-btn"
>
<button
id=
'search_btn'
type=
"button"
class=
"btn btn-sm btn-primary"
>
Search
</button>
</div>
</div>
</form>
</li>
</ul>
</ul>
</div>
</div>
</div>
</div>
...
@@ -47,13 +59,15 @@
...
@@ -47,13 +59,15 @@
<thead>
<thead>
<tr>
<tr>
<th
class=
"text-center"
>
组名
</th>
<th
class=
"text-center"
>
组名
</th>
<th
class=
"text-center"
>
类型
</th>
<th
class=
"text-center"
>
<span
class=
"text-muted text-xs block"
>
类型
</span>
</th>
<th
class=
"text-center"
>
成员数量
</th>
<th
class=
"text-center"
>
成员数量
</th>
<th
class=
"text-center"
>
授权数量
</th>
<th
class=
"text-center"
>
授权数量
</th>
<th
class=
"text-center"
>
操作
</th>
<th
class=
"text-center"
>
操作
</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody
id=
"perm_edit"
>
{% for group in contacts.object_list %}
{% for group in contacts.object_list %}
<tr
class=
"gradeX"
>
<tr
class=
"gradeX"
>
<td
class=
"text-center"
>
{{ group.name }}
</td>
<td
class=
"text-center"
>
{{ group.name }}
</td>
...
@@ -61,7 +75,7 @@
...
@@ -61,7 +75,7 @@
<td
class=
"text-center"
>
{{ group.id|member_count }}
</td>
<td
class=
"text-center"
>
{{ group.id|member_count }}
</td>
<td
class=
"text-center"
>
{{ group.id|perm_count }}
</td>
<td
class=
"text-center"
>
{{ group.id|perm_count }}
</td>
<td
class=
"text-center"
>
<td
class=
"text-center"
>
<a
href=
"../perm_detail/?id={{ group.id }}"
class=
"iframe btn btn-xs btn-primary"
>
详情
</a>
<a
title=
"[ {{ group.name }} 授权详情 ]"
href=
"../perm_detail/?id={{ group.id }}"
class=
"iframe btn btn-xs btn-primary"
>
详情
</a>
<a
href=
"../perm_edit/?id={{ group.id }}"
class=
"btn btn-xs btn-info"
>
编辑
</a>
<a
href=
"../perm_edit/?id={{ group.id }}"
class=
"btn btn-xs btn-info"
>
编辑
</a>
<a
href=
"../perm_del/?id={{ group.id }}"
class=
"btn btn-xs btn-danger"
>
删除
</a>
<a
href=
"../perm_del/?id={{ group.id }}"
class=
"btn btn-xs btn-danger"
>
删除
</a>
</td>
</td>
...
@@ -120,7 +134,7 @@
...
@@ -120,7 +134,7 @@
<th
class=
"text-center"
>
操作
</th>
<th
class=
"text-center"
>
操作
</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody
id=
"perm_list"
>
{% for user in contacts2.object_list %}
{% for user in contacts2.object_list %}
<tr
class=
"gradeX"
>
<tr
class=
"gradeX"
>
<td
class=
"text-center"
>
{{ user.name }}
</td>
<td
class=
"text-center"
>
{{ user.name }}
</td>
...
@@ -128,7 +142,7 @@
...
@@ -128,7 +142,7 @@
<td
class=
"text-center"
>
{{ user.username | groups_str }}
</td>
<td
class=
"text-center"
>
{{ user.username | groups_str }}
</td>
<td
class=
"text-center"
>
{{ user.id | perm_asset_count }}
</td>
<td
class=
"text-center"
>
{{ user.id | perm_asset_count }}
</td>
<td
class=
"text-center"
>
<td
class=
"text-center"
>
<a
href=
"../perm_asset_detail/?id={{ user.id }}"
class=
"iframe btn btn-xs btn-primary"
>
详情
</a>
<a
title=
"[ {{ user.name }} ] 授权详情"
href=
"../perm_asset_detail/?id={{ user.id }}"
class=
"iframe btn btn-xs btn-primary"
>
详情
</a>
</td>
</td>
</tr>
</tr>
{% endfor %}
{% endfor %}
...
@@ -192,6 +206,29 @@
...
@@ -192,6 +206,29 @@
$
(
document
).
ready
(
function
(){
$
(
document
).
ready
(
function
(){
$
(
".iframe"
).
colorbox
({
iframe
:
true
,
width
:
"70%"
,
height
:
"70%"
});
$
(
".iframe"
).
colorbox
({
iframe
:
true
,
width
:
"70%"
,
height
:
"70%"
});
});
});
$
(
document
).
ready
(
function
(){
$
(
'#search_btn'
).
click
(
function
(){
if
(
$
(
'#tab2'
).
attr
(
'class'
)
==
'active'
){
var
tab
=
'tab2'
}
else
{
var
tab
=
'tab1'
}
var
search
=
$
(
'#search_input'
).
val
()
$
.
post
(
'/jperm/perm_list_ajax/'
,
{
'tab'
:
tab
,
'search'
:
search
},
function
(
data
){
if
(
$
(
'#tab2'
).
attr
(
'class'
)
==
'active'
){
$
(
'#tab-2'
).
html
(
data
)
}
else
{
$
(
'#tab-1'
).
html
(
data
)
}
})
})
})
</script>
</script>
{% endblock %}
{% endblock %}
\ No newline at end of file
templates/jperm/perm_list_ajax.html
0 → 100644
View file @
46cc593a
{% load mytags %}
{% ifequal tab 'tab1' %}
<table
class=
"table table-striped table-bordered table-hover "
id=
"editable"
>
<thead>
<tr>
<th
class=
"text-center"
>
组名
</th>
<th
class=
"text-center"
>
<span
class=
"text-muted text-xs block"
>
类型
</span>
</th>
<th
class=
"text-center"
>
成员数量
</th>
<th
class=
"text-center"
>
授权数量
</th>
<th
class=
"text-center"
>
操作
</th>
</tr>
</thead>
<tbody
id=
"perm_edit"
>
{% for group in contacts.object_list %}
<tr
class=
"gradeX"
>
<td
class=
"text-center"
>
{{ group.name }}
</td>
<td
class=
"text-center"
>
{{ group.type|group_type_to_str }}
</td>
<td
class=
"text-center"
>
{{ group.id|member_count }}
</td>
<td
class=
"text-center"
>
{{ group.id|perm_count }}
</td>
<td
class=
"text-center"
>
<a
title=
"[ {{ group.name }} ] 授权详情"
href=
"../perm_detail/?id={{ group.id }}"
class=
"iframe btn btn-xs btn-primary"
>
详情
</a>
<a
href=
"../perm_edit/?id={{ group.id }}"
class=
"btn btn-xs btn-info"
>
编辑
</a>
<a
href=
"../perm_del/?id={{ group.id }}"
class=
"btn btn-xs btn-danger"
>
删除
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div
class=
"row"
>
<div
class=
"col-sm-6"
>
<div
class=
"dataTables_info"
id=
"editable_info"
role=
"status"
aria-live=
"polite"
>
Showing {{ contacts.start_index }} to {{ contacts.end_index }} of {{ p.count }} entries
</div>
</div>
<div
class=
"col-sm-6"
>
<div
class=
"dataTables_paginate paging_simple_numbers"
id=
"editable_paginate"
>
<ul
class=
"pagination"
style=
"margin-top: 0; float: right"
>
{% if contacts.has_previous %}
<li
class=
"paginate_button previous"
aria-controls=
"editable"
tabindex=
"0"
id=
"editable_previous"
>
<a
href=
"?page={{ contacts.previous_page_number }}"
>
Previous
</a>
</li>
{% else %}
<li
class=
"paginate_button previous disabled"
aria-controls=
"editable"
tabindex=
"0"
id=
"editable_previous"
>
<a
href=
"#"
>
Previous
</a>
</li>
{% endif %}
{% for page in p.page_range %}
{% ifequal offset1 page %}
<li
class=
"paginate_button active"
aria-controls=
"editable"
tabindex=
"0"
><a
href=
"?page={{ page }}"
title=
"第{{ page }}页"
>
{{ page }}
</a></li>
{% else %}
<li
class=
"paginate_button"
aria-controls=
"editable"
tabindex=
"0"
><a
href=
"?page={{ page }}"
title=
"第{{ page }}页"
>
{{ page }}
</a></li>
{% endifequal %}
{% endfor %}
{% if contacts.has_next %}
<li
class=
"paginate_button next"
aria-controls=
"editable"
tabindex=
"0"
id=
"editable_next"
>
<a
href=
"?page={{ contacts.next_page_number }}"
>
Next
</a>
</li>
{% else %}
<li
class=
"paginate_button next disabled"
aria-controls=
"editable"
tabindex=
"0"
id=
"editable_next"
>
<a
href=
"#"
>
Next
</a>
</li>
{% endif %}
</ul>
</div>
</div>
</div>
{% else %}
<table
class=
"table table-striped table-bordered table-hover "
id=
"editable"
>
<thead>
<tr>
<th
class=
"text-center"
>
用户
</th>
<th
class=
"text-center"
>
角色
</th>
<th
class=
"text-center"
>
属组
</th>
<th
class=
"text-center"
>
主机数量
</th>
<th
class=
"text-center"
>
操作
</th>
</tr>
</thead>
<tbody
id=
"perm_list"
>
{% for user in contacts2.object_list %}
<tr
class=
"gradeX"
>
<td
class=
"text-center"
>
{{ user.name }}
</td>
<td
class=
"text-center"
>
{{ user.id | get_role }}
</td>
<td
class=
"text-center"
>
{{ user.username | groups_str }}
</td>
<td
class=
"text-center"
>
{{ user.id | perm_asset_count }}
</td>
<td
class=
"text-center"
>
<a
title=
"{{ user.name }} ] 授权详情"
href=
"../perm_asset_detail/?id={{ user.id }}"
class=
"iframe btn btn-xs btn-primary"
>
详情
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div
class=
"row"
>
<div
class=
"col-sm-6"
>
<div
class=
"dataTables_info"
id=
"editable_info"
role=
"status"
aria-live=
"polite"
>
Showing {{ contacts2.start_index }} to {{ contacts2.end_index }} of {{ p2.count }} entries
</div>
</div>
<div
class=
"col-sm-6"
>
<div
class=
"dataTables_paginate paging_simple_numbers"
id=
"editable_paginate"
>
<ul
class=
"pagination"
style=
"margin-top: 0; float: right"
>
{% if contacts2.has_previous %}
<li
class=
"paginate_button previous"
aria-controls=
"editable"
tabindex=
"0"
id=
"editable_previous"
>
<a
href=
"?page={{ contacts2.previous_page_number }}"
>
Previous
</a>
</li>
{% else %}
<li
class=
"paginate_button previous disabled"
aria-controls=
"editable"
tabindex=
"0"
id=
"editable_previous"
>
<a
href=
"#"
>
Previous
</a>
</li>
{% endif %}
{% for page in p2.page_range %}
{% ifequal offset1 page %}
<li
class=
"paginate_button active"
aria-controls=
"editable"
tabindex=
"0"
><a
href=
"?page={{ page }}"
title=
"第{{ page }}页"
>
{{ page }}
</a></li>
{% else %}
<li
class=
"paginate_button"
aria-controls=
"editable"
tabindex=
"0"
><a
href=
"?page={{ page }}"
title=
"第{{ page }}页"
>
{{ page }}
</a></li>
{% endifequal %}
{% endfor %}
{% if contacts2.has_next %}
<li
class=
"paginate_button next"
aria-controls=
"editable"
tabindex=
"0"
id=
"editable_next"
>
<a
href=
"?page={{ contacts2.next_page_number }}"
>
Next
</a>
</li>
{% else %}
<li
class=
"paginate_button next disabled"
aria-controls=
"editable"
tabindex=
"0"
id=
"editable_next"
>
<a
href=
"#"
>
Next
</a>
</li>
{% endif %}
</ul>
</div>
</div>
</div>
{% endifequal %}
\ No newline at end of file
templates/juser/group_list.html
View file @
46cc593a
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
<td
class=
"text-center"
>
{{ group.id|member_count }}
</td>
<td
class=
"text-center"
>
{{ group.id|member_count }}
</td>
<td
class=
"text-center"
>
{{ group.comment }}
</td>
<td
class=
"text-center"
>
{{ group.comment }}
</td>
<td
class=
"text-center"
>
<td
class=
"text-center"
>
<a
href=
"../group_detail/?id={{ group.id }}"
class=
"iframe btn btn-xs btn-primary"
>
成员
</a>
<a
title=
"[ {{ group.name }} ] 成员信息"
href=
"../group_detail/?id={{ group.id }}"
class=
"iframe btn btn-xs btn-primary"
>
成员
</a>
<a
href=
"../group_edit/?id={{ group.id }}"
class=
"btn btn-xs btn-info"
>
编辑
</a>
<a
href=
"../group_edit/?id={{ group.id }}"
class=
"btn btn-xs btn-info"
>
编辑
</a>
<a
href=
"../group_del/?id={{ group.id }}"
class=
"btn btn-xs btn-danger"
>
删除
</a>
<a
href=
"../group_del/?id={{ group.id }}"
class=
"btn btn-xs btn-danger"
>
删除
</a>
</td>
</td>
...
...
templates/juser/user_list.html
View file @
46cc593a
...
@@ -63,7 +63,7 @@
...
@@ -63,7 +63,7 @@
<td
class=
"text-center"
>
{{ user.id|get_role }}
</td>
<td
class=
"text-center"
>
{{ user.id|get_role }}
</td>
<td
class=
"text-center"
>
{{ user.is_active|bool2str }}
</td>
<td
class=
"text-center"
>
{{ user.is_active|bool2str }}
</td>
<td
class=
"text-center"
>
<td
class=
"text-center"
>
<a
href=
"../user_detail/?id={{ user.id }}"
class=
"iframe btn btn-xs btn-primary"
>
详情
</a>
<a
title=
"[ {{ user.name }} ] 详情"
href=
"../user_detail/?id={{ user.id }}"
class=
"iframe btn btn-xs btn-primary"
>
详情
</a>
<a
href=
"../user_edit/?id={{ user.id }}"
class=
"btn btn-xs btn-info"
>
编辑
</a>
<a
href=
"../user_edit/?id={{ user.id }}"
class=
"btn btn-xs btn-info"
>
编辑
</a>
<a
href=
"../user_del/?id={{ user.id }}"
class=
"btn btn-xs btn-danger"
>
删除
</a>
<a
href=
"../user_del/?id={{ user.id }}"
class=
"btn btn-xs btn-danger"
>
删除
</a>
</td>
</td>
...
@@ -115,10 +115,5 @@
...
@@ -115,10 +115,5 @@
</div>
</div>
</div>
</div>
<script>
$
(
document
).
ready
(
function
(){
$
(
".iframe"
).
colorbox
({
iframe
:
true
,
width
:
"70%"
,
height
:
"70%"
});
});
</script>
{% endblock %}
{% endblock %}
templates/nav.html
View file @
46cc593a
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<li
id=
"juser"
>
<li
id=
"juser"
>
<a
href=
"#"
><i
class=
"fa fa-rebel"
></i>
<span
class=
"nav-label"
>
用户管理
</span><span
class=
"fa arrow"
></span></a>
<a
href=
"#"
><i
class=
"fa fa-rebel"
></i>
<span
class=
"nav-label"
>
用户管理
</span><span
class=
"fa arrow"
></span></a>
<ul
class=
"nav nav-second-level"
>
<ul
class=
"nav nav-second-level"
>
<li
id=
"user_list"
><a
href=
"/juser/user_list/"
>
查看用户
</a></li>
<li
id=
"user_list"
><a
href=
"/juser/user_list/"
>
查看用户
<
span
class=
"label label-primary pull-right"
>
16/24
</span><
/a></li>
<li
id=
"user_add"
><a
href=
"/juser/user_add/"
>
添加用户
</a></li>
<li
id=
"user_add"
><a
href=
"/juser/user_add/"
>
添加用户
</a></li>
<li
id=
"group_list"
><a
href=
"/juser/group_list/"
>
查看属组
</a></li>
<li
id=
"group_list"
><a
href=
"/juser/group_list/"
>
查看属组
</a></li>
<li
id=
"group_add"
><a
href=
"/juser/group_add/"
>
添加属组
</a></li>
<li
id=
"group_add"
><a
href=
"/juser/group_add/"
>
添加属组
</a></li>
...
...
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