重新初始化
This commit is contained in:
@@ -1,87 +0,0 @@
|
||||
{extend name="admin/base"/}
|
||||
{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">
|
||||
</div>
|
||||
</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-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-sm-2 control-label">URL</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" style="width:400px;" name="url" value="{$info['url']|default=''}">
|
||||
<span class="help-block"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">LOGO</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="fileinput fileinput-new" data-provides="fileinput">
|
||||
<span class="btn btn-white btn-file"><span class="fileinput-new">选择文件</span><span class="fileinput-exists">更改</span><input type="file" name="..."></span>
|
||||
<span class="fileinput-filename"></span>
|
||||
<a href="#" class="close fileinput-exists" data-dismiss="fileinput" style="float: none">×</a>
|
||||
</div>
|
||||
<span class="help-block"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">友链类型</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="ftype" class="form-control" style="width:auto;">
|
||||
<option value="">请选择</option>
|
||||
<option value="0">友情链接</option>
|
||||
<option value="1">合作单位</option>
|
||||
</select>
|
||||
<span class="help-block"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">排序</label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="sort" value="{$info['sort']|default=''}">
|
||||
<span class="help-block"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">点击量</label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="hits" value="{$info['hits']|default=''}">
|
||||
<span class="help-block"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">描述</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="descrip" value="{$info['descrip']|default=''}">
|
||||
<span class="help-block"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">状态</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="status" class="form-control" style="width:auto;">
|
||||
<option value="">请选择</option>
|
||||
</select>
|
||||
<span class="help-block"></span>
|
||||
</div>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
@@ -1,97 +0,0 @@
|
||||
{extend name="admin/base"/}
|
||||
{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">
|
||||
</div>
|
||||
</header>
|
||||
<div class="box-body">
|
||||
|
||||
<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"}
|
||||
<!-- 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>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
var editFlag = "";
|
||||
var removeFlag = "";
|
||||
var resetPwdFlag = "";
|
||||
|
||||
$.table.init({
|
||||
url: "/admin/link/index",
|
||||
createUrl: "/admin/link/add",
|
||||
updateUrl: "/admin/link/edit/id/{id}",
|
||||
removeUrl: "/admin/link/del",
|
||||
uniqueId: "id",
|
||||
sortName: "id",
|
||||
sortOrder: "desc",
|
||||
modalName: "友情链接",
|
||||
columns: [
|
||||
{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'title',
|
||||
title: '链接标题'
|
||||
},
|
||||
{
|
||||
field: 'url',
|
||||
title: 'URL'
|
||||
},
|
||||
{
|
||||
field: 'sort',
|
||||
title: '排序'
|
||||
},
|
||||
{
|
||||
field: 'hits',
|
||||
title: '访问量'
|
||||
},
|
||||
{
|
||||
field: 'create_time',
|
||||
title: '创建时间',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
field: 'update_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('');
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
})
|
||||
|
||||
</script>
|
||||
{/block}
|
||||
Reference in New Issue
Block a user