pull/6/head
guanghongwei 2015-01-24 16:49:47 +08:00
parent 373e417729
commit 0b79f8e345
2 changed files with 85 additions and 0 deletions

View File

@ -28,6 +28,13 @@ def perm_host(request):
return render_to_response('jperm/perm_host.html', locals())
def perm_edit(request):
header_title, path1, path2 = u'鎺堟潈缂栬緫 | Perm Edit.', u'jperm', u'perm_edit'
if request.method == 'GET':
if request.GET.get('id', None):
pass
def perm_add(request):
header_title, path1, path2 = u'娣诲姞鎺堟潈 | Add User perm.', u'鎺堟潈绠$悊', u'娣诲姞鎺堟潈'
if request.method == 'GET':

View File

@ -0,0 +1,78 @@
{% extends 'base.html' %}
{% load mytags %}
{% block content %}
{% include 'nav_cat_bar.html' %}
<div class="wrapper wrapper-content animated fadeInRight">
<div class="row">
<div class="col-lg-10">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>缂栬緫鎺堟潈 {{ user.name }} <small> Edit perm info.</small></h5>
<div class="ibox-tools">
<a class="collapse-link">
<i class="fa fa-chevron-up"></i>
</a>
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
<i class="fa fa-wrench"></i>
</a>
<ul class="dropdown-menu dropdown-user">
<li><a href="#">鏈惎鐢 1</a>
</li>
<li><a href="#">鏈惎鐢 2</a>
</li>
</ul>
<a class="close-link">
<i class="fa fa-times"></i>
</a>
</div>
</div>
<div class="ibox-content">
<form method="post" class="form-horizontal" action="">
{% if error %}
<div class="alert alert-warning text-center">{{ error }}</div>
{% endif %}
{% if msg %}
<div class="alert alert-success text-center">{{ msg }}</div>
{% endif %}
<div class="form-group">
<div class="col-sm-8">
<input name="username" value="{{ user.username }}" readonly="readonly">
</div>
</div>
<div class="form-group">
<div class="col-sm-4">
<input id="filter" name="filter" placeholder="杩囨护" type="text" class="form-control">
<select id="host_ids" name="host_ids" multiple style="width: 100%">
{% for host in hosts %}
<option value="{{ host.id }}">{{ host.ip }}</option>
{% endfor %}
</select>
</div>
<div class="col-sm-2">
</div>
<div class="col-sm-4">
<select id="host_ids" name="host_ids" multiple style="width: 100%">
{% for host in hosts %}
<option value="{{ host.id }}">{{ host.ip }}</option>
{% endfor %}
</select>
</div>
</div>
<div class="hr-line-dashed"></div>
<div class="form-group">
<div class="col-sm-4 col-sm-offset-2">
<button class="btn btn-white" type="submit">鍙栨秷</button>
<button id="submit_button" class="btn btn-primary" type="submit">纭淇濆瓨</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
{% endblock %}