This commit is contained in:
guanghongwei
2015-03-12 18:43:17 +08:00
parent 546393d9c3
commit 475501595e
11 changed files with 87 additions and 101 deletions

View File

@@ -48,8 +48,8 @@
<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>
<th class="text-center">备注</th>
<th class="text-center">操作</th>
</tr>
@@ -63,7 +63,7 @@
<td class="text-center"> {{ dept.comment }} </td>
<td class="text-center">
<a title="[ {{ dept.name }} ] 成员信息" href="../dept_detail/?id={{ dept.id }}" class="iframe btn btn-xs btn-primary">主机</a>
<a href="../dept_perm_edit/?id={{ dept.id }}" class="btn btn-xs btn-info">授权编辑</a>
<a href="../dept_perm_edit/?id={{ dept.id }}" class="btn btn-xs btn-danger">授权编辑</a>
</td>
</tr>
{% endfor %}

View File

@@ -38,43 +38,10 @@
{% endif %}
<div class="row">
<div class="form-group">
<label for="name" class="col-sm-2 control-label">授权名<span class="red-fonts">*</span></label>
<div class="col-sm-8">
<input id="name" name="name" placeholder="授权名称" type="text" class="form-control" value="{{ name }}">
<input id="perm_id" name="perm_id" style="display: none" value="{{ perm.id }}">
<span class="help-block m-b-none">取个名字方便辨识</span>
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<label for="" class="col-sm-2 control-label">用户组<span class="red-fonts">*</span></label>
<label for="" class="col-sm-2 control-label">小组<span class="red-fonts">*</span></label>
<div class="col-sm-4">
<div>
<select id="user_groups" name="user_groups" class="form-control" size="5" multiple>
{% for user_group in user_groups %}
<option value="{{ user_group.id }}">{{ user_group.name }}</option>
{% endfor %}
</select>
</div>
</div>
<div class="col-sm-1">
<div class="btn-group" style="margin-top: 12px;">
<button type="button" class="btn btn-white" onclick="move('user_groups', 'user_groups_select')"><i class="fa fa-chevron-right"></i></button>
<button type="button" class="btn btn-white" onclick="move('user_groups_select', 'user_groups')"><i class="fa fa-chevron-left"></i> </button>
</div>
</div>
<div class="col-sm-3">
<div>
<select id="user_groups_select" name="user_groups_select" class="form-control m-b" size="5" multiple>
{% for user_group in user_groups_select %}
<option value="{{ user_group.id }}">{{ user_group.name }}</option>
{% endfor %}
</select>
</div>
<input id="user_group_id" name="user_group_id"type="text" value="{{ user_group.id }}" style="display: none">
<input id="user_group_name" name="user_group_name" type="text" class="form-control" value="{{ user_group.name }}" readonly>
</div>
</div>
@@ -84,7 +51,7 @@
<label for="" class="col-sm-2 control-label">主机组<span class="red-fonts">*</span></label>
<div class="col-sm-4">
<div>
<select id="asset_groups" name="asset_groups" class="form-control m-b" size="5" multiple>
<select id="asset_groups" name="asset_groups" class="form-control m-b" size="12" multiple>
{% for asset_group in asset_groups %}
<option value="{{ asset_group.id }}">{{ asset_group.name }}</option>
{% endfor %}
@@ -93,7 +60,7 @@
</div>
<div class="col-sm-1">
<div class="btn-group" style="margin-top: 12px;">
<div class="btn-group" style="margin-top: 42px;">
<button type="button" class="btn btn-white" onclick="move('asset_groups', 'asset_groups_select')"><i class="fa fa-chevron-right"></i></button>
<button type="button" class="btn btn-white" onclick="move('asset_groups_select', 'asset_groups')"><i class="fa fa-chevron-left"></i> </button>
</div>
@@ -101,7 +68,7 @@
<div class="col-sm-3">
<div>
<select id="asset_groups_select" name="asset_groups_select" class="form-control m-b" size="5" multiple>
<select id="asset_groups_select" name="asset_groups_select" class="form-control m-b" size="12" multiple>
{% for asset_group in asset_groups_select %}
<option value="{{ asset_group.id }}">{{ asset_group.name }}</option>
{% endfor %}
@@ -109,16 +76,7 @@
</div>
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<label for="group_name" class="col-sm-2 control-label">备注</label>
<div class="col-sm-8">
<input id="comment" name="comment" placeholder="备注说明" type="text" class="form-control" value="{{ comment }}">
</div>
</div>
<div class="hr-line-dashed"></div>
</div>
<div class="row">
<div class="form-group">

View File

@@ -48,9 +48,9 @@
<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>
<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>
@@ -61,12 +61,13 @@
<td class="text-center"> {{ group.name }} </td>
<td class="text-center"> {{ group.dept.name }} </td>
<td class="text-center"> {{ group.id | member_count }} </td>
<td class="text-center"> {{ group.id | member_count }} </td>
<td class="text-center"> {{ group.id | member_count }} </td>
<td class="text-center"> {{ group.id | ugrp_perm_agrp_count }} </td>
<td class="text-center"> {{ group.id | ugrp_perm_asset_count }} </td>
<td class="text-center"> {{ group.comment }} </td>
<td class="text-center">
<a href="../perm_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="../perm_edit/?id={{ group.id }}" class="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-danger">授权编辑</a>
</td>
</tr>
{% endfor %}

View File

@@ -51,7 +51,7 @@
<input type="checkbox" id="select_all" onclick="selectAll()" name="select_all">
</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>
@@ -66,7 +66,7 @@
<td class="text-center"> {{ dept.id | dept_member }} </td>
<td class="text-center"> {{ dept.comment }} </td>
<td class="text-center">
<a title="[ {{ dept.name }} ] 成员信息" href="../dept_detail/?id={{ dept.id }}" class="iframe btn btn-xs btn-primary">成员</a>
<a href="../user_list/dept/?did={{ dept.id }}" class="btn btn-xs btn-primary">成员</a>
<a href="../dept_edit/?id={{ dept.id }}" class="btn btn-xs btn-info">编辑</a>
<a href="../dept_del/?id={{ dept.id }}" class="btn btn-xs btn-danger">删除</a>
</td>

View File

@@ -52,7 +52,7 @@
</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>
@@ -68,7 +68,7 @@
<td class="text-center"> {{ group.id | member_count }} </td>
<td class="text-center"> {{ group.comment }} </td>
<td class="text-center">
<a title="[ {{ group.name }} ] 成员信息" href="../group_detail/?id={{ group.id }}" class="iframe btn btn-xs btn-primary">成员</a>
<a href="../user_list/group/?gid={{ group.id }}" class="btn btn-xs btn-primary">成员</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>
</td>

View File

@@ -40,9 +40,6 @@
<a href="/jperm/dept_perm_list/">部门授权</a>
</li>
<li id="perm_add">
<a href="/jperm/perm_add/">授权添加</a>
</li>
<li id="perm_list">
<a href="/jperm/perm_list/">小组授权</a>
</li>