初始化项目
This commit is contained in:
75
application/admin/view/group/access.html
Normal file
75
application/admin/view/group/access.html
Normal file
@@ -0,0 +1,75 @@
|
||||
{extend name="public/base"/}
|
||||
{block name="body"}
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title}</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a href="{:url('Group/addnode',array('type'=>$type))}" class="btn btn-danger">
|
||||
<i class="fa fa-plus"></i>
|
||||
添加节点
|
||||
</a>
|
||||
<a href="{:url('Group/upnode',array('type'=>$type))}" class="btn btn-danger ajax-get">
|
||||
<i class="fa fa-plus"></i>
|
||||
更新节点
|
||||
</a>
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<div class="tabs-wrapper">
|
||||
<ul class="nav nav-tabs">
|
||||
{volist name=":config('user_group_type')" id="item"}
|
||||
<li {if condition="$key eq $type"}class="active"{/if}>
|
||||
<a href="{:url('Group/access',array('type'=>$key))}">{$item}</a>
|
||||
</li>
|
||||
{/volist}
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade in active" id="tab-home">
|
||||
{if condition="empty($list)"}
|
||||
<p>暂无数据!</p>
|
||||
{else/}
|
||||
<div class="table-responsive clearfix">
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="60">ID</th>
|
||||
<th>组名</th>
|
||||
<th>标识</th>
|
||||
<th>分组</th>
|
||||
<th>状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="list" id="item"}
|
||||
<tr>
|
||||
<td>{$item['id']}</td>
|
||||
<td>{$item['title']}</td>
|
||||
<td>{$item['name']}</td>
|
||||
<td>{$item['group']}</td>
|
||||
<td>
|
||||
{if condition="$item['status'] eq '0'"}
|
||||
<span class="label label-danger">禁用</span>
|
||||
{elseif condition="$item['status'] eq '1'"/}
|
||||
<span class="label label-primary">启用</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{:url('Group/editnode',array('id'=>$item['id']))}">编辑</a>
|
||||
<a href="{:url('Group/delnode',array('id'=>$item['id']))}" class="confirm ajax-get">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
{$page}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
63
application/admin/view/group/auth.html
Normal file
63
application/admin/view/group/auth.html
Normal file
@@ -0,0 +1,63 @@
|
||||
{extend name="public/base"/}
|
||||
{block name="body"}
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title}</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a href="{:url('Group/index')}" class="btn btn-danger">
|
||||
<i class="glyphicon glyphicon-menu-left"></i>
|
||||
返回
|
||||
</a>
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<div class="table-responsive clearfix">
|
||||
<form action="" class="form" method="post">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-lg-2 text-right">分组</th>
|
||||
<th>权限</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="list" id="node"}
|
||||
<tr>
|
||||
<td class="info col-lg-2 text-right">{$key}</td>
|
||||
<td class="col-lg-10 text-left">
|
||||
{volist name="node" id="item"}
|
||||
<div class="checkbox-nice checkbox-inline">
|
||||
<input type="checkbox" name="rule[]" value="{$item['id']}" id="{$item['name']}" {if in_array($item['id'],$auth_list)}checked{/if} />
|
||||
<label for="{$item['name']}">{$item['title']}</label>
|
||||
</div>
|
||||
{/volist}
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
<tr>
|
||||
<td class="info col-lg-2 text-right">模块</td>
|
||||
<td class="col-lg-10 text-left">
|
||||
{volist name="model" id="item"}
|
||||
<div class="checkbox-nice checkbox-inline">
|
||||
<input type="checkbox" name="extend_rule[2][]" value="{$item['id']}" id="{$item['name']}" {if in_array($item['id'],$extend_auth)}checked{/if} />
|
||||
<label for="{$item['name']}">{$item['title']}</label>
|
||||
</div>
|
||||
{/volist}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="form-group">
|
||||
<div class="col-lg-offset-2 col-lg-10">
|
||||
<input type="hidden" name="id" value="{$id}">
|
||||
<button type="submit" class="btn btn-success submit-btn ajax-post" target-form="form">确认提交</button>
|
||||
<button class="btn btn-danger btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
83
application/admin/view/group/index.html
Normal file
83
application/admin/view/group/index.html
Normal file
@@ -0,0 +1,83 @@
|
||||
{extend name="public/base"/}
|
||||
{block name="style"}
|
||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/libs/bootstrap-editable.css">
|
||||
{/block}
|
||||
{block name="body"}
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title}</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a href="{:url('Group/add',array('type'=>$type))}" class="btn btn-danger"><i class="fa fa-plus"></i> 添加用户组</a>
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<div class="tabs-wrapper">
|
||||
<ul class="nav nav-tabs">
|
||||
{volist name=":config('USER_GROUP_TYPE')" id="item"}
|
||||
<li {if condition="$key eq $type"}class="active"{/if}>
|
||||
<a href="{:url('Group/index',array('type'=>$key))}">{$item}</a>
|
||||
</li>
|
||||
{/volist}
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade in active" id="tab-home">
|
||||
{if condition="empty($list)"}
|
||||
<p>暂无数据!</p>
|
||||
{else/}
|
||||
<div class="table-responsive clearfix">
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="30"><input class="checkbox check-all" type="checkbox"></th>
|
||||
<th width="60">ID</th>
|
||||
<th>组名</th>
|
||||
<th>描述</th>
|
||||
<th>状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="list" id="item"}
|
||||
<tr>
|
||||
<td><input class="ids row-selected" type="checkbox" name="ids[]" value="{$item['id']}"></td>
|
||||
<td>{$item['id']}</td>
|
||||
<td><a href="#" class="editable editable-click" data-id="{$item['id']}" data-name="title" data-type="text" data-pk="{$item['id']}" data-url="{:url('editable')}">{$item['title']}</a></td>
|
||||
<td>{$item['description']}</td>
|
||||
<td>
|
||||
{if condition="$item['status'] eq '0'"}
|
||||
<span class="label label-danger">禁用</span>
|
||||
{elseif condition="$item['status'] eq '1'"/}
|
||||
<span class="label label-primary">启用</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{:url('Group/edit',array('id'=>$item['id']))}">编辑</a>
|
||||
<a href="{:url('Group/auth',array('id'=>$item['id']))}">授权</a>
|
||||
<a href="{:url('Group/del',array('id'=>$item['id']))}" class="confirm ajax-get">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
{$page}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script type="text/javascript" src="__PUBLIC__/js/bootstrap-editable.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$.fn.editable.defaults.mode = 'popup';
|
||||
$.fn.editableform.buttons = '<button type="submit" class="btn btn-success editable-submit btn-mini"><i class="fa fa-check-square-o fa-white"></i></button>' +
|
||||
'<button type="button" class="btn editable-cancel btn-mini"><i class="fa fa-times"></i></button>';
|
||||
$('.editable').editable();
|
||||
})
|
||||
</script>
|
||||
{/block}
|
||||
Reference in New Issue
Block a user