This commit is contained in:
arraykeys
2019-08-08 17:13:34 +08:00
parent e8e5966a8c
commit f0bf2d5fec
2885 changed files with 1195993 additions and 12 deletions
+53
View File
@@ -0,0 +1,53 @@
<style>
.forx {
display: none;
}
</style>
{{$area:=.area}} {{$regions:=.regions}}
<div class="panel panel-default">
<div class="panel-body">
<form class="form-horizontal ajaxform" ajaxSuccess="success" ajaxAlways="always" method="post" action="/web/area/{{.action}}">
<input type="hidden" name="area_id" value="{{$area.area_id}}">
<div class="form-group">
<label class="col-sm-2 control-label"><span class="text-danger"> * </span>区域名称</label>
<div class="col-sm-4">
<input type="text" name="name" class="form-control" value="{{$area.name}}">
</div>
<div class="col-md-4">
<span class="text-danger"> * </span>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label"><span class="text-danger"> * </span>类型</label>
<div class="col-sm-4">
<select name="cs_type" class="form-control" default="{{$area.cs_type}}">
<option value="server">Server</option>
<option value="client">Client</option>
</select>
</div>
<div class="col-md-4">
<span class="text-danger"> * </span>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label"><span class="text-danger"> * </span>访问控制</label>
<div class="col-sm-4">
<select name="is_forbidden" class="form-control" default="{{$area.is_forbidden}}">
<option value="1">禁止</option>
<option value="0">允许</option>
</select>
</div>
<div class="col-md-4">
<span class="text-danger"> * </span>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-success">保存</button>
</div>
</div>
</form>
</div>
</div>
@@ -0,0 +1,67 @@
{{$areas:=.areas}}
<div class="panel panel-default">
<div class="panel-body">
<form action="/web/area/list" method="get">
<div class="panel-body">
<div class="row">
<div class="col-md-5"></div>
<div class="col-md-3">
<select class="form-control" name="type">
<option value="name">区域名称</option>
<option value="cs_type">类型[server|client]</option>
<option value="is_forbidden">访问控制[0禁止|1允许]</option>
</select>
</div>
<div class="col-md-3">
<input class="form-control" name="id" type="text" placeholder="">
</div>
<div class="col-md-1">
<span class="input-group-btn">
<button type="submit" class="btn btn-default"><i class="glyphicon glyphicon-search"></i></button>
</span>
</div>
</div>
</div>
</form>
</div>
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<th class="center w5p">ID</th>
<th class="center w15p">区域名称</th>
<th class="center w10p">类型</th>
<th class="center w15p">访问控制</th>
<th class="center w15p">创建时间</th>
<th class="center w15p">更新时间</th>
<th class="center">操作</th>
</tr>
</thead>
<tbody>
{{range $area := $areas}}
<tr>
<td class="center">{{$area.area_id}}</td>
<td class="center">{{$area.name}}</td>
<td class="center">{{$area.cs_type}}</td>
<td class="center">{{if eq $area.is_forbidden "1"}}
<span class="label label-warning">禁止</span> {{else}}
<span class="label label-success">允许</span> {{end}}
</td>
<td class="center">
{{dateFormat $area.create_time "Y-m-d H:i:s"}}
</td>
<td class="center">
{{dateFormat $area.update_time "Y-m-d H:i:s"}}
</td>
<td class="center">
<a name="edit" href="/web/area/edit?area_id={{$area.area_id}}"><i class="glyphicon glyphicon-pencil"> </i>修改</a>
<a name="delete" data-toggle="confirmation" data-placement="left" data-title="确定删除吗?" href="/web/area/delete?area_id={{$area.area_id}}"><i class="glyphicon glyphicon-remove"> </i>删除</a>
</td>
</tr>
{{end}}
</tbody>
</table>
</div>
<div class="panel-footer">
</div>
</div>