75 lines
2.3 KiB
HTML
75 lines
2.3 KiB
HTML
{extend name="admin/public/base"/}
|
|
{block name="style"}
|
|
<link rel="stylesheet" type="text/css" href="__static__/common/css/bootstrap-editable.css">
|
|
{/block}
|
|
{block name="body"}
|
|
<div class="box box-primary">
|
|
<div class="box-header with-border">
|
|
<h3 class="box-title">{$meta_title}</h3>
|
|
<div class="box-tools pull-right">
|
|
<a class="btn btn-sm btn-primary" href="{:url('/admin/addons/addhook')}">新 增</a>
|
|
<button class="btn btn-sm btn-danger ajax-post confirm" url="{:url('/admin/addons/delhook')}" data-form="ids">删 除</button>
|
|
</div>
|
|
</div>
|
|
<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('/admin/addons/edithook', ['id'=>$item['id']])}">编辑</a>
|
|
<a href="{:url('/admin/addons/delhook', ['id'=>$item['id']])}" class="confirm ajax-get">删除</a>
|
|
</td>
|
|
</tr>
|
|
{/volist}
|
|
</tbody>
|
|
</table>
|
|
{$page|raw}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{/block}
|
|
{block name="script"}
|
|
<script type="text/javascript" src="__static__/common/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(',');
|
|
}
|
|
|
|
if(url != undefined && url != ''){
|
|
window.location.href = url + '/ids/' + param;
|
|
}
|
|
});
|
|
$.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} |