4.0日常更新
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,3 +4,4 @@
|
||||
/bak
|
||||
*.log
|
||||
.env
|
||||
composer.lock
|
||||
@@ -19,9 +19,8 @@ class Ad extends Admin{
|
||||
*/
|
||||
public function index(AdPlace $adp){
|
||||
if ($this->request->isAjax()) {
|
||||
$res = $adp->paginate(25, false, array(
|
||||
'query' => $this->request->param()
|
||||
));
|
||||
$param = $this->request->param();
|
||||
$res = $adp->paginate($this->request->pageConfig);
|
||||
|
||||
$data = $res->append(['show_type_text', 'status_text'])->toArray();
|
||||
$this->data['data'] = $data;
|
||||
@@ -104,9 +103,7 @@ class Ad extends Admin{
|
||||
*/
|
||||
public function lists(AdModel $ad){
|
||||
if ($this->request->isAjax()) {
|
||||
$res = $ad->paginate(25, false, array(
|
||||
'query' => $this->request->param()
|
||||
));
|
||||
$res = $ad->paginate($this->request->pageConfig);
|
||||
$data = $res->append(['cover','status_text'])->toArray();
|
||||
$this->data['data'] = $data;
|
||||
return $this->data;
|
||||
|
||||
@@ -18,8 +18,13 @@ class Channel extends Admin{
|
||||
public function index(ChannelModel $channel){
|
||||
if($this->request->isAjax()){
|
||||
$tree = $this->request->param('tree', 0);
|
||||
$type = $this->request->param('type', 0);
|
||||
$map = array();
|
||||
|
||||
if($type){
|
||||
$map['type'] = $type;
|
||||
}
|
||||
|
||||
$res = $channel->where($map)->order('sort asc, id asc')->select();
|
||||
|
||||
$list = $res->toArray();
|
||||
|
||||
@@ -20,9 +20,8 @@ class Client extends Admin{
|
||||
*/
|
||||
public function index(ClientModel $client){
|
||||
if ($this->request->isAjax()) {
|
||||
$res = $client->paginate(25, false, array(
|
||||
'query' => $this->request->param()
|
||||
));
|
||||
$param = $this->request->param();
|
||||
$res = $client->paginate($this->request->pageConfig);
|
||||
$data = $res->toArray();
|
||||
$this->data['data'] = $data;
|
||||
return $this->data;
|
||||
|
||||
@@ -18,33 +18,34 @@ class Config extends Admin {
|
||||
* @title 系统首页
|
||||
*/
|
||||
public function index(ConfigModel $config) {
|
||||
$group = input('group', 0, 'trim');
|
||||
$name = input('name', '', 'trim');
|
||||
$system_config = Cache::get('system_config');
|
||||
if($this->request->isAjax()){
|
||||
$param = $this->request->param();
|
||||
$group = input('group', 0, 'trim');
|
||||
$name = input('name', '', 'trim');
|
||||
$system_config = Cache::get('system_config');
|
||||
|
||||
/* 查询条件初始化 */
|
||||
$map = array('status' => 1);
|
||||
if ($group) {
|
||||
$map['group'] = $group;
|
||||
/* 查询条件初始化 */
|
||||
$map = array('status' => 1);
|
||||
if ($group) {
|
||||
$map['group'] = $group;
|
||||
}
|
||||
|
||||
if ($name) {
|
||||
$map['name'] = array('like', '%' . $name . '%');
|
||||
}
|
||||
|
||||
$res = $config->where($map)->order('id desc')->paginate($this->request->pageConfig);
|
||||
|
||||
$data = $res->append(['type_text','group_text'])->toArray();
|
||||
$this->data['data'] = $data;
|
||||
return $this->data;
|
||||
}else{
|
||||
$data = array(
|
||||
'group_id' => $this->request->get('group', 0),
|
||||
);
|
||||
$this->data['data'] = $data;
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
if ($name) {
|
||||
$map['name'] = array('like', '%' . $name . '%');
|
||||
}
|
||||
|
||||
$list = $config->where($map)->order('id desc')->paginate(25, false, array(
|
||||
'query' => $this->request->param(),
|
||||
));
|
||||
// 记录当前列表页的cookie
|
||||
Cookie('__forward__', $_SERVER['REQUEST_URI']);
|
||||
|
||||
$data = array(
|
||||
'page' => $list->render(),
|
||||
'group_id' => $group,
|
||||
'list' => $list,
|
||||
);
|
||||
$this->data['data'] = $data;
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -19,9 +19,7 @@ class Form extends Admin{
|
||||
*/
|
||||
public function index(FormModel $form){
|
||||
if ($this->request->isAjax()) {
|
||||
$res = $form->paginate(25, false, array(
|
||||
'query' => $this->request->param()
|
||||
));
|
||||
$res = $form->paginate($this->request->pageConfig);
|
||||
$data = $res->toArray();
|
||||
$this->data['data'] = $data;
|
||||
return $this->data;
|
||||
|
||||
@@ -19,9 +19,7 @@ class Link extends Admin{
|
||||
*/
|
||||
public function index(LinkModel $link){
|
||||
if ($this->request->isAjax()) {
|
||||
$res = $link->paginate(25, false, array(
|
||||
'query' => $this->request->param()
|
||||
));
|
||||
$res = $link->paginate($this->request->pageConfig);
|
||||
$data = $res->toArray();
|
||||
$this->data['data'] = $data;
|
||||
return $this->data;
|
||||
|
||||
@@ -18,19 +18,16 @@ class Seo extends Admin{
|
||||
* @title 系统首页
|
||||
*/
|
||||
public function index(SeoRule $seo){
|
||||
//读取规则列表
|
||||
$map = array('status' => array('=', 0));
|
||||
if($this->request->isAjax()){
|
||||
//读取规则列表
|
||||
$map = array('status' => array('=', 0));
|
||||
|
||||
$list = $seo->where($map)->order('sort asc')->paginate(10, false, array(
|
||||
'query' => $this->request->param()
|
||||
));
|
||||
$res = $seo->where($map)->order('sort asc')->paginate($this->request->pageConfig);
|
||||
|
||||
$this->data['data'] = array(
|
||||
'list' => $list,
|
||||
'page' => $list->render()
|
||||
);
|
||||
$this->data['data'] = $res->toArray();
|
||||
|
||||
return $this->data;
|
||||
return $this->data;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,6 +18,10 @@ class Admin {
|
||||
protected $data = [];
|
||||
|
||||
public function handle($request, \Closure $next) {
|
||||
$request->pageConfig = array(
|
||||
'list_rows' => $request->param('limit', 20),
|
||||
'page' => $request->param('page', 1)
|
||||
);
|
||||
$response = $next($request);
|
||||
|
||||
if (is_array($response->getData())) {
|
||||
|
||||
@@ -35,6 +35,12 @@ class Config extends Model {
|
||||
return $type_text[0];
|
||||
}
|
||||
|
||||
protected function getGroupTextAttr($value, $data) {
|
||||
$config = Cache::get('system_config');
|
||||
$group = $config['config_group_list'];
|
||||
return isset($group[$data['group']]) ? $group[$data['group']] : '未分组';
|
||||
}
|
||||
|
||||
public function lists() {
|
||||
$map = array('status' => 1);
|
||||
$res = $this->where($map)->field('type,name,value')->select();
|
||||
|
||||
@@ -979,6 +979,8 @@ label {
|
||||
}
|
||||
}
|
||||
|
||||
.btn-outline{border: 1px solid #dedede; color: #333333;}
|
||||
|
||||
.data-skin-box{position: fixed; z-index: 1000000; top: 50px; right: -280px;}
|
||||
.data-skin-box .content{width: 280px; height: 240px; padding: 10px; background: #181f23; color: #ffffff;}
|
||||
.data-skin-box .tool-bar{height: 50px; width: 50px; line-height: 50px; text-align: center; font-size: 24px; display: inline-block; background: #181f23; color: #ffffff; position: absolute; right: 0; cursor: pointer;}
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
sortName: "",
|
||||
sortOrder: "asc",
|
||||
pagination: true,
|
||||
pageSize: 10,
|
||||
pageList: [10, 25, 50],
|
||||
pageSize: 20,
|
||||
pageList: [20, 30, 50, 100],
|
||||
toolbar: "toolbar",
|
||||
striped: false,
|
||||
escape: false,
|
||||
@@ -98,11 +98,11 @@
|
||||
queryParams: function(params) {
|
||||
var curParams = {
|
||||
// 传递参数查询参数
|
||||
pageSize: params.limit,
|
||||
pageNum: params.offset / params.limit + 1,
|
||||
limit: params.limit,
|
||||
page: params.offset / params.limit + 1,
|
||||
searchValue: params.search,
|
||||
orderByColumn: params.sort,
|
||||
isAsc: params.order
|
||||
sort: params.sort,
|
||||
sortorder: params.order
|
||||
};
|
||||
var currentId = $.common.isEmpty($.table._option.formId) ? $('form').attr('id') : $.table._option.formId;
|
||||
return $.extend(curParams, $.common.formToJSON(currentId));
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
{block name="script"}
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
var type = "{$type}";
|
||||
var addFlag = "";
|
||||
var editFlag = "";
|
||||
var removeFlag = "";
|
||||
@@ -48,12 +49,11 @@ $(function(){
|
||||
uniqueId: "id",
|
||||
expandAll: false,
|
||||
expandFirst: false,
|
||||
url: "/admin/channel/index",
|
||||
url: "/admin/channel/index?type="+type,
|
||||
createUrl: "/admin/channel/add?id={id}",
|
||||
updateUrl: "/admin/channel/edit?id={id}",
|
||||
removeUrl: "/admin/channel/del?id={id}",
|
||||
modalName: "频道",
|
||||
queryParams:{type:0},
|
||||
columns:[
|
||||
{field: 'selectItem', radio: true},
|
||||
{
|
||||
|
||||
@@ -7,30 +7,31 @@
|
||||
</header>
|
||||
<div class="box-body">
|
||||
<form method="post" class="form form-horizontal" role="ajax">
|
||||
<input type="hidden" name="id" value="{$info.id|default=''}">
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">配置标识</label>
|
||||
<div class="col-lg-10">
|
||||
<label class="col-sm-2 control-label">配置标识</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" style="width: 400px" name="name" value="{$info.name|default=''}">
|
||||
<span class="help-block">(用于config函数调用,只能使用英文且不能重复)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">配置标题</label>
|
||||
<div class="col-lg-10">
|
||||
<label class="col-sm-2 control-label">配置标题</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" style="width:400px;" name="title" value="{$info.title|default=''}">
|
||||
<span class="help-block">(用于后台显示的配置标题)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">排序</label>
|
||||
<div class="col-lg-10">
|
||||
<label class="col-sm-2 control-label">排序</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" style="width: 400px" name="sort" value="{$info.sort|default=0}">
|
||||
<span class="help-block">(用于分组显示的顺序)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">配置类型</label>
|
||||
<div class="col-lg-10">
|
||||
<label class="col-sm-2 control-label">配置类型</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="type" class="form-control" style="width:auto;">
|
||||
{volist name="config['config_type_list']" id="type"}
|
||||
<option value="{$key}" {if isset($info['type']) && $info['type'] == $key}selected{/if}>{$type}</option>
|
||||
@@ -40,8 +41,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">配置分组</label>
|
||||
<div class="col-lg-10">
|
||||
<label class="col-sm-2 control-label">配置分组</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="group" class="form-control" style="width: auto">
|
||||
<option value="0">不分组</option>
|
||||
{volist name="config['config_group_list']" id="group"}
|
||||
@@ -52,29 +53,28 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">配置值</label>
|
||||
<div class="col-lg-10">
|
||||
<label class="col-sm-2 control-label">配置值</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="value" class="form-control" style="width: 80%;height: 120px">{$info.value|default=''}</textarea>
|
||||
<span class="help-block">(配置值)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">配置项</label>
|
||||
<div class="col-lg-10">
|
||||
<label class="col-sm-2 control-label">配置项</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="extra" class="form-control" style="width: 80%;height: 120px">{$info.extra|default=''}</textarea>
|
||||
<span class="help-block">(如果是枚举型 需要配置该项)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">说明</label>
|
||||
<div class="col-lg-10">
|
||||
<label class="col-sm-2 control-label">说明</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="remark" class="form-control" style="width: 80%;height: 120px">{$info.remark|default=''}</textarea>
|
||||
<span class="help-block">(配置详细说明)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-lg-offset-2 col-lg-10">
|
||||
<input type="hidden" name="id" value="{$info.id|default=''}">
|
||||
<div class="form-group" style="display: none;">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button class="btn btn-success submit-btn ajax-post" type="submit" target-form="form-horizontal">确 定</button>
|
||||
<button class="btn btn-danger btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
|
||||
</div>
|
||||
|
||||
@@ -1,29 +1,23 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="body"}
|
||||
|
||||
<!-- Default box -->
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{$mate_title|default="新功能"}</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<ul class="nav nav-tabs">
|
||||
{volist name="config['config_group_list']" id="item"}
|
||||
<li {if $key == $id}class="active"{/if}><a href="/admin/config/group.html?id={$key}">{$item}</a></li>
|
||||
{/volist}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="tabs-wrapper">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
{volist name="config['config_group_list']" id="item"}
|
||||
<li {if $key == $id}class="active"{/if}><a href="/admin/config/group.html?id={$key}">{$item}</a></li>
|
||||
{/volist}
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- Font Awesome Icons -->
|
||||
<div class="tab-pane active">
|
||||
<div class="btn-group-sm" style="text-align: right; padding-bottom: 10px;">
|
||||
<a href="{:url('/admin/config/index')}" class="btn btn-primary"><i class="fa fa-list"></i> 配置列表</a>
|
||||
<a onclick="$.operate.openTab('配置列表', '/admin/config/index')" class="btn btn-primary"><i class="fa fa-list"></i> 配置列表</a>
|
||||
<a href="{:url('/admin/config/add')}" class="btn btn-danger"><i class="fa fa-list"></i> 添加配置</a>
|
||||
</div>
|
||||
<form method="post" class="form form-horizontal" role="ajax">
|
||||
{volist name="list" id="item"}
|
||||
<div class="form-group">
|
||||
<label for="inputEmail1" class="col-lg-2 control-label">{$item['title']}</label>
|
||||
<div class="col-lg-10">
|
||||
<label for="inputEmail1" class="col-sm-2 control-label">{$item['title']}</label>
|
||||
<div class="col-sm-10">
|
||||
{switch name="item['type']"}
|
||||
{case value="text"}
|
||||
<input type="text" class="form-control" name="config[{$item['name']}]" id="config[{$item['name']}]" value="{$item['value']}" placeholder="{$item['title']}" style="width:50%;">
|
||||
@@ -62,13 +56,13 @@
|
||||
</div>
|
||||
{/volist}
|
||||
<div class="form-group">
|
||||
<div class="col-lg-offset-2 col-lg-10">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<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><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
@@ -1,118 +1,82 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="body"}
|
||||
<div class="box box-primary">
|
||||
<header class="box-header with-border">
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title|default="新功能"}</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a href="{:url('Config/group')}" class="btn btn-danger">
|
||||
<i class="fa fa-list"></i>
|
||||
配置管理
|
||||
</a>
|
||||
<a href="{:url('Config/add')}" class="btn btn-danger">
|
||||
<i class="fa fa-plus"></i>
|
||||
添加配置
|
||||
</a>
|
||||
</div>
|
||||
</header>
|
||||
<div class="box-body">
|
||||
<div class="tabs-wrapper">
|
||||
<ul class="nav nav-tabs">
|
||||
<li {if condition="!$group_id"}class="active"{/if}><a href="{:url('/admin/config/index')}">全部</a></li>
|
||||
{volist name="config['config_group_list']" id="item"}
|
||||
<li {if condition="$group_id eq $key"}class="active"{/if}>
|
||||
<a href="{:url('/admin/config/index?group='.$key)}">{$item}</a>
|
||||
</li>
|
||||
{/volist}
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade in active">
|
||||
<div class="table-responsive clearfix">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="row-selected">
|
||||
<input class="checkbox check-all" type="checkbox">
|
||||
</th>
|
||||
<th>ID</th>
|
||||
<th>名称</th>
|
||||
<th>标题</th>
|
||||
<th>分组</th>
|
||||
<th>类型</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{notempty name="list"}
|
||||
{volist name="list" id="item"}
|
||||
<tr>
|
||||
<td><input class="ids row-selected" type="checkbox" name="id[]" value="{$item.id}"></td>
|
||||
<td>{$item.id}</td>
|
||||
<td><a href="{:url('edit?id='.$item['id'])}">{$item.name}</a></td>
|
||||
<td>{$item.title}</td>
|
||||
<td>{$config['config_group_list'][$item['group']]|default=''}</td>
|
||||
<td>{$item['type_text']}</td>
|
||||
<td>
|
||||
<a title="编辑" href="{:url('/admin/config/edit?id='.$item['id'])}">编辑</a>
|
||||
<a class="confirm ajax-get" title="删除" href="{:url('/admin/config/del?id='.$item['id'])}">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
{else/}
|
||||
<td colspan="7" class="text-center"> aOh! 暂时还没有内容!</td>
|
||||
{/notempty}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{$page|raw}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li {if condition="!$group_id"}class="active"{/if}><a href="{:url('/admin/config/index')}">全部</a></li>
|
||||
{volist name="config['config_group_list']" id="item"}
|
||||
<li {if condition="$group_id eq $key"}class="active"{/if}><a href="{:url('/admin/config/index', array('group'=>$key))}">{$item}</a></li>
|
||||
{/volist}
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.openTab('配置管理', '/admin/config/group')"><i class="fa fa-plus"></i> 配置管理</a>
|
||||
<a class="btn btn-success" onclick="$.operate.add()"><i class="fa fa-plus"></i> 新增</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()"><i class="fa fa-edit"></i> 修改</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()"><i class="fa fa-remove"></i> 删除</a>
|
||||
</div>
|
||||
<div class="table-striped">
|
||||
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
//搜索功能
|
||||
$("#search").click(function () {
|
||||
var url = $(this).attr('url');
|
||||
var query = $('.search-form').find('input').serialize();
|
||||
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
|
||||
query = query.replace(/^&/g, '');
|
||||
if (url.indexOf('?') > 0) {
|
||||
url += '&' + query;
|
||||
} else {
|
||||
url += '?' + query;
|
||||
}
|
||||
window.location.href = url;
|
||||
});
|
||||
//回车搜索
|
||||
$(".search-input").keyup(function (e) {
|
||||
if (e.keyCode === 13) {
|
||||
$("#search").click();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
//点击排序
|
||||
$('.list_sort').click(function () {
|
||||
var url = $(this).attr('url');
|
||||
var ids = $('.ids:checked');
|
||||
var param = '';
|
||||
if (ids.length > 0) {
|
||||
var str = new Array();
|
||||
ids.each(function () {
|
||||
str.push($(this).val());
|
||||
});
|
||||
param = str.join(',');
|
||||
}
|
||||
<!-- bootstrap-table 表格插件 -->
|
||||
<script src="__static__/plugins/bootstrap-table/bootstrap-table.min.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.min.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js"></script>
|
||||
|
||||
if (url != undefined && url != '') {
|
||||
window.location.href = url + '/ids/' + param;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
var group = "{$group_id|default=0}";
|
||||
var editFlag = "";
|
||||
var removeFlag = "";
|
||||
var resetPwdFlag = "";
|
||||
|
||||
$.table.init({
|
||||
url: "/admin/config/index?group="+group,
|
||||
createUrl: "/admin/config/add",
|
||||
updateUrl: "/admin/config/edit/id/{id}",
|
||||
removeUrl: "/admin/config/del",
|
||||
uniqueId: "id",
|
||||
sortName: "id",
|
||||
sortOrder: "desc",
|
||||
modalName: "配置",
|
||||
columns: [
|
||||
{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'title',
|
||||
title: '配置标题'
|
||||
},
|
||||
{
|
||||
field: 'name',
|
||||
title: '配置名称'
|
||||
},
|
||||
{
|
||||
field: 'group_text',
|
||||
title: '分组'
|
||||
},
|
||||
{
|
||||
field: 'type_text',
|
||||
title: '类型'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
|
||||
return actions.join('');
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
})
|
||||
|
||||
</script>
|
||||
{/block}
|
||||
Reference in New Issue
Block a user