tp6更新到最新版本
目录结构调整
This commit is contained in:
@@ -1,75 +1,87 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="style"}
|
||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/libs/bootstrap-editable.css">
|
||||
{/block}
|
||||
{block name="body"}
|
||||
<div class="box box-primary">
|
||||
<header class="box-header with-border">
|
||||
<h3 class="box-title">{$meta_title|default='新功能'}</h3>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-primary" href="{:url('addhook')}">新 增</a>
|
||||
<button class="btn btn-danger ajax-post confirm" url="{:url('delhook')}" target-form="ids">删 除</button>
|
||||
</div>
|
||||
</header>
|
||||
<div class="box-body">
|
||||
<div class="table-responsive clearfix">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input class="checkbox check-all" type="checkbox"></th>
|
||||
<th>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']|default=0}</td>
|
||||
<td>{$item['name']}</td>
|
||||
<td>{$item['description']}</td>
|
||||
<td>{$item['type_text']}</td>
|
||||
<td>
|
||||
<a href="{:url('edithook?id='.$item['id'])}">编辑</a>
|
||||
<a href="{:url('delhook?id='.$item['id'])}" class="confirm ajax-get">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
{$page|raw}
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<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" src="__PUBLIC__/js/bootstrap-editable.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
//点击排序
|
||||
$('.item_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 type="text/javascript">
|
||||
$(function(){
|
||||
var editFlag = "";
|
||||
var removeFlag = "";
|
||||
var resetPwdFlag = "";
|
||||
|
||||
$.table.init({
|
||||
url: "/admin/client/index",
|
||||
createUrl: "/admin/client/add",
|
||||
updateUrl: "/admin/client/edit/id/{id}",
|
||||
removeUrl: "/admin/client/remove",
|
||||
sortName: "id",
|
||||
sortOrder: "desc",
|
||||
modalName: "客户端",
|
||||
columns: [
|
||||
{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'title',
|
||||
title: '客户端名称'
|
||||
},
|
||||
{
|
||||
field: 'appid',
|
||||
title: 'APPID'
|
||||
},
|
||||
{
|
||||
field: 'appsecret',
|
||||
title: 'APP秘钥'
|
||||
},
|
||||
{
|
||||
field: 'create_time',
|
||||
title: '创建时间',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
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('');
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
$.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}
|
||||
@@ -1,91 +1,87 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="style"}
|
||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/libs/bootstrap-editable.css">
|
||||
{/block}
|
||||
{block name="body"}
|
||||
<div class="box box-primary">
|
||||
<header class="box-header with-border">
|
||||
<h3 class="box-title">{$meta_title|default='新功能'}</h3>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-info" href="{:url('index?refresh=1')}">更 新</a>
|
||||
<a class="btn btn-primary" href="{:url('add')}">新 增</a>
|
||||
<button class="btn btn-danger ajax-post confirm" url="{:url('del')}" target-form="ids">删 除</button>
|
||||
</div>
|
||||
</header>
|
||||
<div class="box-body">
|
||||
<div class="table-responsive clearfix">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input class="checkbox check-all" type="checkbox"></th>
|
||||
<th>ID</th>
|
||||
<th>名称</th>
|
||||
<th>标识</th>
|
||||
<th>描述</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="id[]" value="{$item['id']}"></td>
|
||||
<td>{$item['id']|default=0}</td>
|
||||
<td>{$item['title']}</td>
|
||||
<td>{$item['name']}</td>
|
||||
<td>{$item['description']}</td>
|
||||
<td>{$item['status_text']}</td>
|
||||
<td>{$item['author']}</td>
|
||||
<td>{$item['version']}</td>
|
||||
<td>
|
||||
{if !$item['isinstall']}
|
||||
<a href="{:url('install?addon_name='.$item['name'])}" class="ajax-get">安装</a>
|
||||
{else/}
|
||||
<a href="{:url('uninstall?id='.$item['id'])}" class="confirm ajax-get">卸载</a>
|
||||
{if $item['status']}
|
||||
<a href="{:url('disable?id='.$item['id'])}" class="confirm ajax-get">禁用</a>
|
||||
{else/}
|
||||
<a href="{:url('enable?id='.$item['id'])}" class="confirm ajax-get">启用</a>
|
||||
{/if}
|
||||
<a href="{:url('config?id='.$item['id'])}">设置</a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
{$page|raw}
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<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" src="__PUBLIC__/js/bootstrap-editable.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
//点击排序
|
||||
$('.item_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 type="text/javascript">
|
||||
$(function(){
|
||||
var editFlag = "";
|
||||
var removeFlag = "";
|
||||
var resetPwdFlag = "";
|
||||
|
||||
$.table.init({
|
||||
url: "/admin/client/index",
|
||||
createUrl: "/admin/client/add",
|
||||
updateUrl: "/admin/client/edit/id/{id}",
|
||||
removeUrl: "/admin/client/remove",
|
||||
sortName: "id",
|
||||
sortOrder: "desc",
|
||||
modalName: "客户端",
|
||||
columns: [
|
||||
{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'title',
|
||||
title: '客户端名称'
|
||||
},
|
||||
{
|
||||
field: 'appid',
|
||||
title: 'APPID'
|
||||
},
|
||||
{
|
||||
field: 'appsecret',
|
||||
title: 'APP秘钥'
|
||||
},
|
||||
{
|
||||
field: 'create_time',
|
||||
title: '创建时间',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
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('');
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
$.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