模板文件目录更改
This commit is contained in:
1
view/README.md
Normal file
1
view/README.md
Normal file
@@ -0,0 +1 @@
|
||||
如果不使用模板,可以删除该目录
|
||||
32
view/admin/action/detail.html
Normal file
32
view/admin/action/detail.html
Normal file
@@ -0,0 +1,32 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="body"}
|
||||
<div class="main-box no-header clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<!-- 标题栏 -->
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title|default='新功能'}</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="main-box-body clearfix">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th align="right">名称</th>
|
||||
<th>信息</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="info" id="item"}
|
||||
<tr>
|
||||
<td align="right">{$key}:</td>
|
||||
<td>{$item}</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
67
view/admin/action/index.html
Normal file
67
view/admin/action/index.html
Normal file
@@ -0,0 +1,67 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="body"}
|
||||
<div class="main-box no-header clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<!-- 标题栏 -->
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title|default='新功能'}</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-primary" id="action_add" href="{:url('add')}">新 增</a>
|
||||
<button class="btn btn-success ajax-post" target-form="ids" url="{:url('setstatus?status=1')}" >启 用</button>
|
||||
<button class="btn btn-default ajax-post" target-form="ids" url="{:url('setstatus?status=0')}">禁 用</button>
|
||||
<button class="btn btn-danger ajax-post confirm" target-form="ids" url="{:url('del')}">删 除</button>
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<!-- 数据列表 -->
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="row-selected row-selected">
|
||||
<input class="check-all" type="checkbox"/>
|
||||
</th>
|
||||
<th class="">编号</th>
|
||||
<th class="">标识</th>
|
||||
<th class="">名称</th>
|
||||
<th class="">类型</th>
|
||||
<th class="">规则</th>
|
||||
<th class="">状态</th>
|
||||
<th class="">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td>
|
||||
<input class="ids" type="checkbox" name="id[]" value="{$vo['id']}" />
|
||||
</td>
|
||||
<td>{$vo.id}</td>
|
||||
<td>{$vo.name}</td>
|
||||
<td>
|
||||
<a href="{:url('edit?id='.$vo['id'])}">{$vo.title}</a>
|
||||
</td>
|
||||
<td>
|
||||
<span>{:get_action_type($vo['type'])}</span>
|
||||
</td>
|
||||
<td>{$vo.remark}</td>
|
||||
<td>{$vo.status_text}</td>
|
||||
<td>
|
||||
<a href="{:url('edit?id='.$vo['id'])}">编辑</a>
|
||||
{if $vo['status']}
|
||||
<a href="{:url('setstatus',array('id'=> $vo['id'],'status'=>0))}" class="ajax-get">禁用</a>
|
||||
{else/}
|
||||
<a href="{:url('setstatus',array('id'=> $vo['id'],'status'=>1))}" class="ajax-get">启用</a>
|
||||
{/if}
|
||||
<a href="{:url('del' , array('id' => $vo['id']))}" class="confirm ajax-get">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- 分页 -->
|
||||
{$page|raw}
|
||||
<!-- /分页 -->
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
49
view/admin/action/log.html
Normal file
49
view/admin/action/log.html
Normal file
@@ -0,0 +1,49 @@
|
||||
{extend name="admin/base"/}
|
||||
|
||||
{block name="body"}
|
||||
<div class="main-box no-header clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<!-- 标题栏 -->
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title|default='新功能'}</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-warning ajax-get confirm" href="{:url('clear')}">清 空</a>
|
||||
<button class="btn btn-danger ajax-post confirm" target-form="ids" url="{:url('dellog')}">删 除</button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="main-box-body clearfix">
|
||||
<!-- 数据列表 -->
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
|
||||
<th class="">编号</th>
|
||||
<th class="">行为名称</th>
|
||||
<th class="">执行者</th>
|
||||
<th class="">执行时间</th>
|
||||
<th class="">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="list" id="vo"}
|
||||
<tr>
|
||||
<td><input class="ids" type="checkbox" name="id[]" value="{$vo['id']}" /></td>
|
||||
<td>{$vo['id']} </td>
|
||||
<td>{:get_action($vo['action_id'],'title')}</td>
|
||||
<td>{:get_nickname($vo['user_id'])}</td>
|
||||
<td><span>{$vo.create_time|time_format}</span></td>
|
||||
<td><a href="{:url('detail?id='.$vo['id'])}">详细</a>
|
||||
<a class="confirm ajax-get" href="{:url('dellog?id='.$vo['id'])}">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- 分页 -->
|
||||
{$page|raw}
|
||||
<!-- /分页 -->
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
80
view/admin/ad/index.html
Normal file
80
view/admin/ad/index.html
Normal file
@@ -0,0 +1,80 @@
|
||||
{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="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title|default='新功能'}</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<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="main-box-body clearfix">
|
||||
<div class="table-responsive clearfix">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="30"><input class="checkbox check-all" type="checkbox"></th>
|
||||
<th width="60">ID</th>
|
||||
<th width="180">名称</th>
|
||||
<th width="140">标识</th>
|
||||
<th width="180">创建时间</th>
|
||||
<th width="180">更新时间</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']}</td>
|
||||
<td>{$item['title']}</td>
|
||||
<td>{$item['name']}</td>
|
||||
<td>{$item['create_time']|date='Y-m-d H:i',###}</td>
|
||||
<td>{$item['update_time']|date='Y-m-d H:i',###}</td>
|
||||
<td>
|
||||
<a title="广告列表" href="{:url('lists?id='.$item['id'])}">广告列表</a>
|
||||
<a title="移动" href="{:url('edit?id='.$item['id'])}">编辑</a>
|
||||
<a title="删除" href="{:url('del?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="__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(',');
|
||||
}
|
||||
|
||||
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}
|
||||
50
view/admin/ad/lists.html
Normal file
50
view/admin/ad/lists.html
Normal file
@@ -0,0 +1,50 @@
|
||||
{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="main-box no-header clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title|default='新功能'}</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-success" href="{:url('addad?id='.$id)}"><i class="fa fa-plus-circle fa-lg"></i> 新 增</a>
|
||||
<a class="btn btn-primary" href="{:url('index')}"><i class="fa fa-list fa-lg"></i> 广告位</a>
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<!-- 表格列表 -->
|
||||
<div class="table-responsive clearfix">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="30"><input class="checkbox check-all" type="checkbox"></th>
|
||||
<th width="60">ID</th>
|
||||
<th width="280">标题</th>
|
||||
<th width="280">创建时间</th>
|
||||
<th width="280">更新时间</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']}</td>
|
||||
<td>{$item['title']}</td>
|
||||
<td>{$item['create_time']|date='Y-m-d H:i',###}</td>
|
||||
<td>{$item['update_time']|date='Y-m-d H:i',###}</td>
|
||||
<td>
|
||||
<a href="{:url('editad?id='.$item['id'])}">编辑</a>
|
||||
<a href="{:url('delad?id='.$item['id'])}" class="confirm ajax-get">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- /表格列表 -->
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
78
view/admin/addons/add.html
Normal file
78
view/admin/addons/add.html
Normal file
@@ -0,0 +1,78 @@
|
||||
{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="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title|default='新功能'}</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<form method="post" class="form form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">插件名</label>
|
||||
<div class="col-lg-8 col-sm-10">
|
||||
{:widget('common/Form/show',array(array('name'=>'title','title'=>'插件名','type'=>'text'),''))}
|
||||
<div class="help-block">请输入插件名</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">插件标识名</label>
|
||||
<div class="col-lg-8 col-sm-10">
|
||||
{:widget('common/Form/show',array(array('name'=>'name','title'=>'插件标识名','type'=>'text'),''))}
|
||||
<div class="help-block">请输入插件标识</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">插件版本</label>
|
||||
<div class="col-lg-8 col-sm-10">
|
||||
{:widget('common/Form/show',array(array('name'=>'version','title'=>'插件版本','type'=>'text'),''))}
|
||||
<div class="help-block">请输入插件版本</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">插件作者</label>
|
||||
<div class="col-lg-8 col-sm-10">
|
||||
{:widget('common/Form/show',array(array('name'=>'author','title'=>'插件作者','type'=>'text'),''))}
|
||||
<div class="help-block">请输入插件作者</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">插件描述</label>
|
||||
<div class="col-lg-8 col-sm-10">
|
||||
{:widget('common/Form/show',array(array('name'=>'description','title'=>'插件描述','type'=>'textarea'),''))}
|
||||
<div class="help-block">请输入插件描述</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">是否启用</label>
|
||||
<div class="col-lg-8 col-sm-10">
|
||||
{:widget('common/Form/show',array(array('name'=>'is_open','title'=>'是否启用','type'=>'radio','option'=>array('1'=>'启用','0'=>'禁用')),''))}
|
||||
<div class="help-block">请输入插件描述</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">是否需要配置</label>
|
||||
<div class="col-lg-8 col-sm-10">
|
||||
{:widget('common/Form/show',array(array('name'=>'has_config','title'=>'是否需要配置','type'=>'radio','option'=>array('1'=>'启用','0'=>'禁用')),''))}
|
||||
<div class="help-block">请输入插件描述</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-lg-offset-2 col-lg-10">
|
||||
<input type="hidden" name="id" value="{$info['id']|default=''}">
|
||||
<button class="btn btn-success submit-btn ajax-post" type="submit" target-form="form-horizontal">确 定</button>
|
||||
<button class="btn btn-primary submit-btn" type="button">预 览</button>
|
||||
<button class="btn btn-danger btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
{/block}
|
||||
38
view/admin/addons/addons.tpl
Normal file
38
view/admin/addons/addons.tpl
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | SentCMS [ WE CAN DO IT JUST THINK IT ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2013 http://www.tensent.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace addons\[name];
|
||||
use common\controller\Addon;
|
||||
|
||||
/**
|
||||
* [title]插件
|
||||
* @author [author]
|
||||
*/
|
||||
class [name] extends Addon{
|
||||
|
||||
public $info = array(
|
||||
'name'=>'[name]',
|
||||
'title'=>'[title]',
|
||||
'description'=>'[description]',
|
||||
'status'=>[status],
|
||||
'author'=>'[author]',
|
||||
'version'=>'[version]'
|
||||
);
|
||||
|
||||
//插件安装
|
||||
public function install(){
|
||||
return true;
|
||||
}
|
||||
|
||||
public function uninstall(){
|
||||
return true;
|
||||
}
|
||||
|
||||
[hook]
|
||||
}
|
||||
77
view/admin/addons/hooks.html
Normal file
77
view/admin/addons/hooks.html
Normal file
@@ -0,0 +1,77 @@
|
||||
{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="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title|default='新功能'}</h2>
|
||||
</div>
|
||||
<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="main-box-body clearfix">
|
||||
<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>
|
||||
</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(',');
|
||||
}
|
||||
|
||||
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}
|
||||
93
view/admin/addons/index.html
Normal file
93
view/admin/addons/index.html
Normal file
@@ -0,0 +1,93 @@
|
||||
{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="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title|default='新功能'}</h2>
|
||||
</div>
|
||||
<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="main-box-body clearfix">
|
||||
<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>
|
||||
</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(',');
|
||||
}
|
||||
|
||||
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}
|
||||
64
view/admin/attribute/index.html
Normal file
64
view/admin/attribute/index.html
Normal file
@@ -0,0 +1,64 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="body"}
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title|default='新功能'}</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-danger" href="{:url('add',array('model_id'=>$model_id))}"><i class="fa fa-plus"></i> 新 增</a>
|
||||
<!-- <button class="btn btn-danger ajax-post confirm" url="{:url('del')}" target-form="ids"><i class="fa fa-remove"></i> 删 除</button> -->
|
||||
<a class="btn btn-warning" href="{:url('Model/index')}"><i class="fa fa-reply"></i> 返回</a>
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<div class="table-responsive clearfix">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input class="checkbox check-all" type="checkbox"></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['title']}</td>
|
||||
<td>{$item['name']}</td>
|
||||
<td>{$item['type_text']}</td>
|
||||
<td>{$item['length']}</td>
|
||||
<td>{$item['value']}</td>
|
||||
<td>
|
||||
<a href="{:url('edit',array('id'=>$item['id'], 'model_id'=>$model_id))}">编辑</a>
|
||||
<a href="{:url('del',array('id'=>$item['id'], 'model_id'=>$model_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="__PUBLIC__/plugs/layer/layer.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$('.openDilog').click(function(){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
area: ['900px', '560px'],
|
||||
content: $('.openDilog').attr('url')
|
||||
});
|
||||
});
|
||||
})
|
||||
</script>
|
||||
{/block}
|
||||
238
view/admin/base.html
Normal file
238
view/admin/base.html
Normal file
@@ -0,0 +1,238 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
||||
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"/>
|
||||
<meta charset="utf-8">
|
||||
<title>SentCMS后台管理系统-{$meta_title|default="后台首页"}</title>
|
||||
<link href="__static__/libs/bootstrap/css/bootstrap.min.css" rel="stylesheet"/>
|
||||
<link href="__static__/libs/font-awesome/css/font-awesome.min.css" rel="stylesheet"/>
|
||||
<link rel="stylesheet" href="__static__/libs/nanoscroller/nanoscroller.css" />
|
||||
<link rel="stylesheet" href="__static__/libs/hopscotch/hopscotch.css" />
|
||||
<link href="__css__/theme_styles.css" rel="stylesheet"/>
|
||||
{block name="style"}{/block}
|
||||
</meta>
|
||||
</head>
|
||||
<body>
|
||||
<div id="theme-wrapper">
|
||||
<header class="navbar" id="header-navbar">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#header-nav">
|
||||
<span class="sr-only">菜单</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a href="{:url('/admin/index/index')}" id="logo" class="navbar-brand">
|
||||
<img src="__static__/images/logo.png" alt="" class="normal-logo logo-white"/>
|
||||
</a>
|
||||
<ul class="nav navbar-nav pull-right visible-xs">
|
||||
<li class="dropdown profile-dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<img src="__static__/images/samples/scarlet-159.png" alt=""/>
|
||||
<span class="hidden-xs">{:session('user_auth.username')}</span> <b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li>
|
||||
<a href="{:url('/admin/User/edit')}">
|
||||
<i class="fa fa-user"></i>
|
||||
修改资料
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{:url('/admin/User/editpwd')}">
|
||||
<i class="fa fa-cog"></i>
|
||||
修改密码
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{:url('/admin/index/logout')}">
|
||||
<i class="fa fa-power-off"></i>
|
||||
退出后台
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{$config['web_site_url']|default='/'}" target="_blank">
|
||||
<i class="fa fa-home"></i>
|
||||
前台首页
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="nav-no-collapse navbar-left pull-left hidden-sm hidden-xs">
|
||||
<ul class="nav navbar-nav pull-left">
|
||||
<li>
|
||||
<a class="btn" id="make-small-nav"> <i class="fa fa-bars"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse" id="header-nav">
|
||||
<ul class="nav navbar-nav">
|
||||
{volist name="headerMenu" id="item"}
|
||||
<li {if isset($item['active']) && $item['active']}class="active"{/if}>
|
||||
<a href="{$item['url']|url}">
|
||||
<i class="fa fa-{$item['icon']|default='file'}"></i>
|
||||
<span>{$item['title']}</span>
|
||||
</a>
|
||||
</li>
|
||||
{/volist}
|
||||
</ul>
|
||||
<ul class="nav navbar-nav pull-right">
|
||||
<li class="dropdown profile-dropdown hidden-sm hidden-xs">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<img src="__static__/images/samples/scarlet-159.png" alt=""/>
|
||||
<span class="hidden-xs">{:session('user_auth.username')}</span> <b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li>
|
||||
<a href="{:url('admin/User/edit')}">
|
||||
<i class="fa fa-user"></i>
|
||||
修改资料
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{:url('admin/User/editpwd')}">
|
||||
<i class="fa fa-cog"></i>
|
||||
修改密码
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{:url('admin/index/logout')}">
|
||||
<i class="fa fa-power-off"></i>
|
||||
退出后台
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{$config['web_site_url']|default='/'}" target="_blank">
|
||||
<i class="fa fa-home"></i>
|
||||
前台首页
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="visible-lg">
|
||||
<a href="#" class="btn" onclick="helpIntro();">
|
||||
<i class="fa fa-question-circle"></i>
|
||||
操作指南
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div id="page-wrapper" class="container nav-small">
|
||||
<div class="row">
|
||||
<div id="nav-col">
|
||||
<section id="col-left" class="col-left-nano">
|
||||
<div id="col-left-inner" class="col-left-nano-content">
|
||||
<div id="sidebar-nav">
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
{volist name="asideMenu" id="nav"}
|
||||
<li class="nav-header hidden-sm hidden-xs">{$key}</li>
|
||||
{volist name="nav" id="item"}
|
||||
{if isset($item['_child'])}
|
||||
<li {if isset($item['active']) && $item['active']}class="active"{/if}>
|
||||
<a href="#" class="dropdown-toggle">
|
||||
<i class="fa fa-{$item['icon']|default='file'}"></i>
|
||||
<span>{$item['title']}</span>
|
||||
<i class="fa fa-angle-right drop-icon"></i>
|
||||
</a>
|
||||
<ul class="submenu">
|
||||
{volist name="item['_child']" id="vo" key="k"}
|
||||
<li class="{$vo['active']}">
|
||||
<a href="{$vo['url']|url}">
|
||||
<i class="fa fa-{$vo['icon']|default='file'}"></i>
|
||||
<span>{$vo['title']}</span>
|
||||
</a>
|
||||
</li>
|
||||
{/volist}
|
||||
</ul>
|
||||
</li>
|
||||
{else/}
|
||||
<li {if isset($item['active']) && $item['active']}class="active"{/if}>
|
||||
<a href="{$item['url']|url}">
|
||||
<i class="fa fa-{$item['icon']|default='file'}"></i>
|
||||
<span>{$item['title']}</span>
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
{/volist}
|
||||
{/volist}
|
||||
{if isset($extend_menu)}
|
||||
{volist name="extend_menu" id="sub"}
|
||||
{if is_string($key)}<li class="nav-header hidden-sm hidden-xs">{$key}</li>{/if}
|
||||
{volist name="sub" id="item"}
|
||||
<li {if isset($item['active']) && $item['active']}class="active"{/if}>
|
||||
<a href="{$item['url']|url}">
|
||||
<i class="fa fa-{$item['icon']|default='file'}"></i>
|
||||
<span>{$item['title']}</span>
|
||||
</a>
|
||||
</li>
|
||||
{/volist}
|
||||
{/volist}
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<div id="nav-col-submenu"></div>
|
||||
</div>
|
||||
|
||||
<div id="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div id="content-header" class="clearfix">
|
||||
<div class="pull-left">
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<a href="{:url('Admin/Index/index')}">后台首页</a>
|
||||
</li>
|
||||
<li class="active">
|
||||
{if isset($meta_title)}
|
||||
<span>{$meta_title}</span>
|
||||
{else/}
|
||||
<span>{:lang(request()->controller().'_'.request()->action())}</span>
|
||||
{/if}
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
<div class="pull-right hidden-xs">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
{block name="body"}{/block}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer id="footer-bar" class="row">
|
||||
<p id="footer-copyright" class="col-xs-12">Powered by <a href="http://www.tensent.cn" target="_blank">TenSent,Inc.</a></p>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{include file="admin/setting"}
|
||||
<script type="text/javascript" src="__static__/libs/jquery/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="__static__/libs/nanoscroller/jquery.nanoscroller.min.js"></script>
|
||||
<script type="text/javascript" src="__static__/libs/bootstrap/js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="__static__/libs/hopscotch/hopscotch.js"></script>
|
||||
<script src="__js__/app.js"></script>
|
||||
<script type="text/javascript" src="__static__/libs/requirejs/require.js" data-main="__js__/main.js?v={$system_version|default='4.0.0'}"></script>
|
||||
{block name="script"}
|
||||
<script type="text/javascript">
|
||||
var isLoadModule = false;
|
||||
</script>
|
||||
{/block}
|
||||
</body>
|
||||
</html>
|
||||
192
view/admin/category/edit.html
Normal file
192
view/admin/category/edit.html
Normal file
@@ -0,0 +1,192 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="body"}
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{:isset($info['id'])?'编辑':'新增'}分类</h2>
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<form action="{:url()}" method="post" class="form form-horizontal">
|
||||
<div class="tabs-wrapper">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a href="#tab-base" data-toggle="tab">基 础</a>
|
||||
</li>
|
||||
<li><a href="#tab-better" data-toggle="tab">高 级</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade in active" id="tab-base">
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">上级分类</label>
|
||||
<div class="col-lg-8">
|
||||
<input type="hidden" name="pid" value="{$category['id']|default=0}">
|
||||
<input type="text" class="form-control" disabled="disabled" value="{$category['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-8">
|
||||
<input type="text" name="title" class="form-control" 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-8">
|
||||
<input type="text" name="name" class="form-control" value="{$info.name|default=''}">
|
||||
<span class="help-block">(英文字母)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">分组定义</label>
|
||||
<div class="col-lg-8">
|
||||
<textarea name="groups" class="form-control">{$info.groups|default=''}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">绑定模型</label>
|
||||
<div class="col-lg-8">
|
||||
<select name="model_id" class="form-control" style="width: auto;">
|
||||
<option value="">--请选择--</option>
|
||||
{volist name="model_list" id="item"}
|
||||
<option value="{$item['id']}" {if isset($info['model_id']) && $info['model_id'] == $item['id']}selected{/if}>{$item['title']}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">发布内容</label>
|
||||
<div class="col-lg-8">
|
||||
<label class="am-radio-inline"><input type="radio" name="allow_publish" value="0">不允许</label>
|
||||
<label class="am-radio-inline"><input type="radio" name="allow_publish" value="1" checked>仅允许后台</label>
|
||||
<label class="am-radio-inline"><input type="radio" name="allow_publish" value="2" >允许前后台</label>
|
||||
<span class="help-block">(是否允许发布内容)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">
|
||||
是否审核
|
||||
</label>
|
||||
<div class="col-lg-8">
|
||||
<label class="am-radio-inline"><input type="radio" name="check" value="0" checked>不需要</label>
|
||||
<label class="am-radio-inline"><input type="radio" name="check" value="1">需要</label>
|
||||
<span class="help-block">(在该分类下发布的内容是否需要审核)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">分类图标</label>
|
||||
<div class="col-lg-8">
|
||||
{:widget('common/Form/show',array(array('name'=>'icon','type'=>'image'),$info))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="tab-pane fade" id="tab-better">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">可见性</label>
|
||||
<div class="col-lg-3">
|
||||
<select name="display" class="form-control">
|
||||
<option value="1">所有人可见</option>
|
||||
<option value="0">不可见</option>
|
||||
<option value="2">管理员可见</option>
|
||||
</select>
|
||||
<span class="help-block">(是否对用户可见,针对前台)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">排序</label>
|
||||
<div class="col-lg-2">
|
||||
<input type="text" name="sort" class="form-control" 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-5">
|
||||
<input type="text" name="list_row" class="form-control" value="{$info.list_row|default=10}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">网页标题</label>
|
||||
<div class="col-lg-8">
|
||||
<input type="text" name="meta_title" class="form-control" value="{$info.meta_title|default=''}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">关键字</label>
|
||||
<div class="col-lg-8">
|
||||
<textarea class="form-control" name="keywords">{$info.keywords|default=''}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">描述</label>
|
||||
<div class="col-lg-8">
|
||||
<textarea class="form-control" name="description">{$info.description|default=''}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">频道模板</label>
|
||||
<div class="col-lg-8">
|
||||
<input type="text" name="template_index" class="form-control" value="{$info.template_index|default=''}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">列表模板</label>
|
||||
<div class="col-lg-8">
|
||||
<input type="text" name="template_lists" class="form-control" value="{$info.template_lists|default=''}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">详情模板</label>
|
||||
<div class="col-lg-8">
|
||||
<input type="text" name="template_detail" class="form-control" value="{$info.template_detail|default=''}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">编辑模板</label>
|
||||
<div class="col-lg-8">
|
||||
<input type="text" name="template_edit" class="form-control" value="{$info.template_edit|default=''}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-lg-offset-2 col-lg-10">
|
||||
<input type="hidden" name="id" value="{$info['id']|default=''}">
|
||||
<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>
|
||||
{/block}
|
||||
|
||||
{block name="script"}
|
||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/plugs/webuploader/webuploader.css">
|
||||
<script type="text/javascript" src="__PUBLIC__/plugs/webuploader/webuploader.min.js"></script>
|
||||
<script type="text/javascript" src="__PUBLIC__/plugs/webuploader/webuploader.custom.js"></script>
|
||||
<script type="text/javascript">
|
||||
{present name="info['id']"}
|
||||
Sent.setValue("allow_publish", {$info.allow_publish|default=1});
|
||||
Sent.setValue("check", {$info.check|default=0});
|
||||
Sent.setValue("model[]", {$info.model|json_encode} || [1]);
|
||||
Sent.setValue("model_sub[]", {$info.model_sub|json_encode} || [1]);
|
||||
Sent.setValue("type[]", {$info.type|json_encode} || [2]);
|
||||
Sent.setValue("display", {$info.display|default=1});
|
||||
Sent.setValue("reply", {$info.reply|default=0});
|
||||
Sent.setValue("reply_model[]", {$info.reply_model|json_encode} || [1]);
|
||||
{/present}
|
||||
$(function(){
|
||||
$("input[name=reply]").change(function(){
|
||||
var $reply = $(".form-group.reply");
|
||||
parseInt(this.value) ? $reply.show() : $reply.hide();
|
||||
}).filter(":checked").change();
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
114
view/admin/category/edit_channel.html
Normal file
114
view/admin/category/edit_channel.html
Normal file
@@ -0,0 +1,114 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="body"}
|
||||
<!-- datepicker end -->
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>
|
||||
生成到导航
|
||||
</h2>
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<form method="post" class="form form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">导航标题</label>
|
||||
<div class="col-lg-6">
|
||||
<input type="text" class="form-control" 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-6">
|
||||
<input type="text" class="form-control" name="active" value="{$info.active|default=''}">
|
||||
<span class="help-block">(当前标识)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">导航连接</label>
|
||||
<div class="col-lg-8">
|
||||
<input type="text" class="form-control" name="url" value="{$info.url|default=''}">
|
||||
<span class="help-block">(用于调转的URL,支持带http://的URL或U函数参数格式)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">导航类型</label>
|
||||
<div class="col-lg-8">
|
||||
<select name="type" id="type" class="form-control" style="width:auto;">
|
||||
{volist name=":config('nav_type_list')" id="item"}
|
||||
<option value="{$key}" {if isset($info['type']) && $info['type'] == $key}selected{/if}>{$item}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">父导航</label>
|
||||
<div class="col-lg-5">
|
||||
<select name="pid" class="form-control" style="width:auto;">
|
||||
<option value="0">--一级导航--</option>
|
||||
{volist name=":parse_field_bind('Channel',$data['pid'],'')" id="item"}
|
||||
{if condition="$item['id'] neq $data['id']"}
|
||||
<option value="{$item['id']}" {if condition="$pid eq $item['id']"}selected{/if}>{$item['title_show']}</option>
|
||||
{/if}
|
||||
{/volist}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">新窗口打开</label>
|
||||
<div class="col-lg-2">
|
||||
<select name="target" class="form-control" style="width:auto;">
|
||||
<option value="0" >否</option>
|
||||
<option value="1" {eq name="data.target" value="1"}selected{/eq}>是</option>
|
||||
</select>
|
||||
<span class="help-block">(是否新窗口打开链接)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">图标</label>
|
||||
<div class="col-lg-2">
|
||||
<input type="text" class="form-control" name="icon" value="{$info.icon|default=''}">
|
||||
<span class="help-block">输入图标英文</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">优先级</label>
|
||||
<div class="col-lg-2">
|
||||
<input type="text" class="form-control" name="sort" value="{$info.sort|default='1'}">
|
||||
<span class="help-block">(导航显示顺序)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">文字颜色</label>
|
||||
<div class="col-lg-2">
|
||||
<input type="text" class="form-control" name="color" value="{$info['color']|default=''}">
|
||||
<span class="help-block">(右上角的标志点颜色,支持各类css表示方式)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">标志点颜色</label>
|
||||
<div class="col-lg-2">
|
||||
<input type="text" class="form-control" name="band_color" value="{$info['band_color']|default=''}">
|
||||
<span class="help-block">(右上角的标志点颜色,支持各类css表示方式)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">标志点文字</label>
|
||||
<div class="col-lg-3">
|
||||
<input type="text" class="form-control" name="band_text" value="{$info['band_text']|default=''}">
|
||||
<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="{$data.id|default=''}">
|
||||
<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}
|
||||
103
view/admin/category/index.html
Normal file
103
view/admin/category/index.html
Normal file
@@ -0,0 +1,103 @@
|
||||
{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="main-box no-header clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title|default='新功能'}</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-primary" href="{:url('add')}"><i class="fa fa-plus-circle fa-lg"></i> 新 增</a>
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<!-- 表格列表 -->
|
||||
<div class="table-responsive clearfix">
|
||||
<div class="tabs-wrapper">
|
||||
<ul class="nav nav-tabs">
|
||||
<li {if $model_id == ''}class="active"{/if}><a href="{:url('admin/category/index')}">全部</a></li>
|
||||
{volist name="model_list" id="item"}
|
||||
<li {if $item['id'] == $model_id}class="active"{/if}>
|
||||
<a href="{:url('admin/category/index',array('model_id'=>$item['id']))}">{$item['title']}</a>
|
||||
</li>
|
||||
{/volist}
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade in active" id="tab-home">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="30"><input class="checkbox check-all" type="checkbox"></th>
|
||||
<th width="60">ID</th>
|
||||
<th>名称</th>
|
||||
<th width="120">排序</th>
|
||||
<th width="120">发布</th>
|
||||
<th width="120">状态</th>
|
||||
<th width="120">生成导航</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="tree" id="list"}
|
||||
<tr>
|
||||
<td><input class="ids row-selected" type="checkbox" name="id[]" value="{$list.id}"></td>
|
||||
<td>{$list['id']}</td>
|
||||
<td>
|
||||
{$list['level_show']}
|
||||
<a href="#" class="editable editable-click" data-id="{$list['id']}" data-name="title" data-type="text" data-pk="{$list['id']}" data-url="{:url('editable')}">{$list['title']}</a>
|
||||
<a class="add-sub-cate" title="添加子分类" href="{:url('add?pid='.$list['id'])}">
|
||||
<i class="fa fa-plus-square"></i>
|
||||
</a>
|
||||
</td>
|
||||
<td><a href="#" class="editable editable-click" data-id="{$list['id']}" data-name="sort" data-type="text" data-pk="{$list['id']}" data-url="{:url('editable')}">{$list['sort']}</a></td>
|
||||
<td>{$list['allow_publish']?'是':'否'}</td>
|
||||
<td>
|
||||
{if $list['status']}
|
||||
<span class="label label-primary">启用</span>
|
||||
{else/}
|
||||
<span class="label label-danger">禁用</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
{if $list['ismenu']}
|
||||
<a href="{:url('admin/channel/del?id='.$list['ismenu'])}" class="ajax-get"><span class="label label-primary">已生成</span></a>
|
||||
{else/}
|
||||
<a href="{:url('add_channel?title='.$list['title'].'&model_id='.$list['model_id'].'&active='.$list['name'].'&mid='.$list['id'])}" ><span class="label label-danger">未生成</span></a>
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
<a title="编辑" href="{:url('edit?id='.$list['id'].'&pid='.$list['pid'])}">编辑</a>
|
||||
{if $list['status']}
|
||||
<a href="{:url('status?id='.$list['id'].'&status=0')}" class="ajax-get">禁用</a>
|
||||
{else/}
|
||||
<a href="{:url('status?id='.$list['id'].'&status=1')}" class="ajax-get">启用</a>
|
||||
{/if}
|
||||
<a title="删除" href="{:url('remove?id='.$list['id'])}" class="confirm ajax-get">删除</a>
|
||||
<a title="移动" href="{:url('operate?type=move&from='.$list['id'])}">移动</a>
|
||||
<a title="合并" href="{:url('operate?type=merge&from='.$list['id'])}">合并</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</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}
|
||||
37
view/admin/category/operate.html
Normal file
37
view/admin/category/operate.html
Normal file
@@ -0,0 +1,37 @@
|
||||
{extend name="admin/base"/}
|
||||
|
||||
{block name="body"}
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{$operate}分类</h2>
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<form action="{:url($type)}" method="post" class="form form-horizontal">
|
||||
<div id="tab1" class="tab-pane in tab1">
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">目标分类</label>
|
||||
<div class="col-lg-5">
|
||||
<select name="to" class="form-control">
|
||||
{volist name="list" id="vo"}
|
||||
<option value="{$vo.id}">{$vo.title}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
<span class="help-block">(将{$operate}至的分类)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-lg-offset-2 col-lg-10">
|
||||
<input type="hidden" name="from" value="{$from}">
|
||||
<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>
|
||||
{/block}
|
||||
|
||||
114
view/admin/channel/edit.html
Normal file
114
view/admin/channel/edit.html
Normal file
@@ -0,0 +1,114 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="body"}
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>
|
||||
{$info['id']?'编辑':'新增'}导航
|
||||
</h2>
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<form method="post" class="form form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">导航标题</label>
|
||||
<div class="col-lg-6">
|
||||
<input type="text" class="form-control" 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-6">
|
||||
<input type="text" class="form-control" name="active" value="{$info.active|default=''}">
|
||||
<span class="help-block">(当前标识)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">导航连接</label>
|
||||
<div class="col-lg-8">
|
||||
<input type="text" class="form-control" name="url" value="{$info.url|default=''}">
|
||||
<span class="help-block">(用于调转的URL,支持带http://的URL或U函数参数格式)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">导航类型</label>
|
||||
<div class="col-lg-8">
|
||||
<select name="type" id="type" class="form-control" style="width:auto;">
|
||||
{volist name=":config('nav_type_list')" id="item"}
|
||||
<option value="{$key}" {if isset($info['type']) && $info['type'] == $key}selected{/if}>{$item}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">父导航</label>
|
||||
<div class="col-lg-5">
|
||||
<select name="pid" class="form-control" style="width:auto;">
|
||||
<option value="0">--一级导航--</option>
|
||||
{volist name=":parse_field_bind('Channel',$info['pid'], 0)" id="item"}
|
||||
{if condition="$item['id'] neq $info['id']"}
|
||||
<option value="{$item['id']}" {if condition="$pid eq $item['id']"}selected{/if}>{$item['title_show']}</option>
|
||||
{/if}
|
||||
{/volist}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">新窗口打开</label>
|
||||
<div class="col-lg-2">
|
||||
<select name="target" class="form-control" style="width:auto;">
|
||||
<option value="0" >否</option>
|
||||
<option value="1" {eq name="info.target" value="1"}selected{/eq}>是
|
||||
</option>
|
||||
</select>
|
||||
<span class="help-block">(是否新窗口打开链接)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">图标</label>
|
||||
<div class="col-lg-2">
|
||||
<input type="text" class="form-control" name="icon" value="{$info.icon|default=''}">
|
||||
<span class="help-block">输入图标英文</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">优先级</label>
|
||||
<div class="col-lg-2">
|
||||
<input type="text" class="form-control" name="sort" value="{$info.sort|default='1'}">
|
||||
<span class="help-block">(导航显示顺序)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">文字颜色</label>
|
||||
<div class="col-lg-2">
|
||||
<input type="text" class="form-control" name="color" value="{$info['color']|default=''}">
|
||||
<span class="help-block">(右上角的标志点颜色,支持各类css表示方式)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">标志点颜色</label>
|
||||
<div class="col-lg-2">
|
||||
<input type="text" class="form-control" name="band_color" value="{$info['band_color']|default=''}">
|
||||
<span class="help-block">(右上角的标志点颜色,支持各类css表示方式)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">标志点文字</label>
|
||||
<div class="col-lg-3">
|
||||
<input type="text" class="form-control" name="band_text" value="{$info['band_text']|default=''}">
|
||||
<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=''}">
|
||||
<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}
|
||||
106
view/admin/channel/index.html
Normal file
106
view/admin/channel/index.html
Normal file
@@ -0,0 +1,106 @@
|
||||
{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="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title|default='新功能'}</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-primary" href="{:url('add')}">新 增</a>
|
||||
<button class="btn btn-danger ajax-post confirm" url="{:url('del')}" target-form="ids">删 除</button>
|
||||
<button class="btn btn-success list_sort" url="{:url('sort')}">排序</button>
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<div class="tabs-wrapper">
|
||||
<ul class="nav nav-tabs">
|
||||
<li {if isset($type) && 0 == $type}class="active"{/if}><a href="{:url('admin/channel/index',array('type'=>0))}">全部</a></li>
|
||||
{volist name="config['nav_type_list']" id="item"}
|
||||
<li {if isset($type) && $key == $type}class="active"{/if}>
|
||||
<a href="{:url('admin/channel/index',array('type'=>$key))}">{$item}</a>
|
||||
</li>
|
||||
{/volist}
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
|
||||
<div class="table-responsive clearfix">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="30"><input class="checkbox check-all" type="checkbox"></th>
|
||||
<th width="60">ID</th>
|
||||
<th>名称</th>
|
||||
<th>URL</th>
|
||||
<th width="120">排序</th>
|
||||
<th>状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="tree" id="list"}
|
||||
<tr>
|
||||
<td><input class="ids row-selected" type="checkbox" name="id[]" value="{$list.id}"></td>
|
||||
<td>{$list['id']}</td>
|
||||
<td>
|
||||
{$list['level_show']}
|
||||
<a href="#" class="editable editable-click" data-id="{$list['id']}" data-name="title" data-type="text" data-pk="{$list['id']}" data-url="{:url('editable')}">{$list['title']} </a>
|
||||
<a class="add-sub-cate" title="添加子分类" href="{:url('add?pid='.$list['id'])}">
|
||||
<i class="fa fa-plus-square"></i>
|
||||
</a>
|
||||
</td>
|
||||
<td>{$list['url']}</td>
|
||||
<td><a href="#" class="editable editable-click" data-id="{$list['id']}" data-name="sort" data-type="text" data-pk="{$list['id']}" data-url="{:url('editable')}">{$list['sort']}</a></td>
|
||||
<td>
|
||||
{if $list['status']}
|
||||
<span class="label label-primary">{$list.status|get_status_title}</span>
|
||||
{else/}
|
||||
<span class="label label-danger">{$list.status|get_status_title}</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
<a title="编辑" href="{:url('edit?id='.$list['id'].'&pid='.$list['pid'])}">编辑</a>
|
||||
<a title="{$list.status|show_status_op}" href="{:url('setStatus?ids='.$list['id'].'&status='.abs(1-$list['status']))}" class="ajax-get">{$list.status|show_status_op}</a>
|
||||
<a title="删除" href="{:url('del?id='.$list['id'])}" class="confirm ajax-get">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</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() {
|
||||
//点击排序
|
||||
$('.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(',');
|
||||
}
|
||||
|
||||
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}
|
||||
112
view/admin/channel/sort.html
Normal file
112
view/admin/channel/sort.html
Normal file
@@ -0,0 +1,112 @@
|
||||
{extend name="admin/base"/}
|
||||
|
||||
{block name="body"}
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>菜单排序 [ <a href="{:url('index',array('pid'=>input('pid')))}">返回列表</a> ]</h2>
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<form action="{:url('sort')}" method="post" class="form form-horizontal">
|
||||
<div class="form-group">
|
||||
<div class="col-lg-2">
|
||||
<select value="" size="8" class="form-control">
|
||||
{volist name="list" id="vo"}
|
||||
<option class="ids" title="{$vo.title}" value="{$vo.id}">{$vo.title}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
<button class="top btn btn-primary btn-block" type="button"><i class="fa fa-arrow-up"></i> 第 一</button>
|
||||
<button class="up btn btn-primary btn-block" type="button"><i class="fa fa-chevron-up"></i> 上 移</button>
|
||||
<button class="down btn btn-primary btn-block" type="button"><i class="fa fa-chevron-down"></i> 下 移</button>
|
||||
<button class="bottom btn btn-primary btn-block" type="button"><i class="fa fa-arrow-down"></i> 最 后</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sort_bottom form-group">
|
||||
<div class="col-lg-12">
|
||||
<input type="hidden" name="ids">
|
||||
<button class="sort_confirm btn btn-primary submit-btn" type="button">确 定</button>
|
||||
<button class="sort_cancel btn btn-dafault btn-return" type="button" url="{$Think.cookie.__forward__}">返 回</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name="script"}
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
sort();
|
||||
$(".top").click(function(){
|
||||
rest();
|
||||
$("option:selected").prependTo("select");
|
||||
sort();
|
||||
})
|
||||
$(".bottom").click(function(){
|
||||
rest();
|
||||
$("option:selected").appendTo("select");
|
||||
sort();
|
||||
})
|
||||
$(".up").click(function(){
|
||||
rest();
|
||||
$("option:selected").after($("option:selected").prev());
|
||||
sort();
|
||||
})
|
||||
$(".down").click(function(){
|
||||
rest();
|
||||
$("option:selected").before($("option:selected").next());
|
||||
sort();
|
||||
})
|
||||
$(".search").click(function(){
|
||||
var v = $("input").val();
|
||||
$("option:contains("+v+")").attr('selected','selected');
|
||||
})
|
||||
function sort(){
|
||||
$('option').text(function(){return ($(this).index()+1)+'.'+$(this).text()});
|
||||
}
|
||||
|
||||
//重置所有option文字。
|
||||
function rest(){
|
||||
$('option').text(function(){
|
||||
return $(this).text().split('.')[1]
|
||||
});
|
||||
}
|
||||
|
||||
//获取排序并提交
|
||||
$('.sort_confirm').click(function(){
|
||||
var arr = new Array();
|
||||
$('.ids').each(function(){
|
||||
arr.push($(this).val());
|
||||
});
|
||||
$('input[name=ids]').val(arr.join(','));
|
||||
$.post(
|
||||
$('form').attr('action'),
|
||||
{
|
||||
'ids' : arr.join(',')
|
||||
},
|
||||
function(data){
|
||||
if (data.code) {
|
||||
updateAlert(data.msg + ' 页面即将自动跳转~','alert-success');
|
||||
}else{
|
||||
updateAlert(data.msg,'alert-success');
|
||||
}
|
||||
setTimeout(function(){
|
||||
if (data.code) {
|
||||
$('.sort_cancel').click();
|
||||
}
|
||||
},1500);
|
||||
},
|
||||
'json'
|
||||
);
|
||||
});
|
||||
|
||||
//点击取消按钮
|
||||
$('.sort_cancel').click(function(){
|
||||
window.location.href = $(this).attr('url');
|
||||
});
|
||||
})
|
||||
</script>
|
||||
{/block}
|
||||
44
view/admin/client/add.html
Normal file
44
view/admin/client/add.html
Normal file
@@ -0,0 +1,44 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="body"}
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title|default='新功能'}</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<form method="post" class="form form-horizontal" role="ajax">
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">客户端名称</label>
|
||||
<div class="col-md-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-md-2 control-label">APPID</label>
|
||||
<div class="col-md-10">
|
||||
<input type="text" class="form-control" style="width:400px;" name="appid" value="{$info['appid']|default=''}">
|
||||
<span class="help-block"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-md-2 control-label">APPSECRET</label>
|
||||
<div class="col-md-10">
|
||||
<input type="text" class="form-control" style="width:400px;" name="appsecret" value="{$info['appsecret']|default=''}">
|
||||
<span class="help-block"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-md-offset-2 col-md-10">
|
||||
<input type="hidden" name="id" value="{$info['id']|default=''}">
|
||||
<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}
|
||||
55
view/admin/client/index.html
Normal file
55
view/admin/client/index.html
Normal file
@@ -0,0 +1,55 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="body"}
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title|default='新功能'}</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-primary" href="{:url('/admin/client/add')}">新 增</a>
|
||||
<button class="btn btn-danger ajax-post confirm" url="{:url('/admin/client/del')}" target-form="ids">删 除</button>
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<div class="table-responsive clearfix">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="30"><input class="checkbox check-all" type="checkbox"></th>
|
||||
<th>ID</th>
|
||||
<th>名称</th>
|
||||
<th>APPID</th>
|
||||
<th>APPSECRET</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']}</td>
|
||||
<td>{$item['title']}</td>
|
||||
<td>{$item['appid']}</td>
|
||||
<td>{$item['appsecret']}</td>
|
||||
<td>{$item['create_time']}</td>
|
||||
<td>{$item['update_time']}</td>
|
||||
<td>
|
||||
<a href="{:url('/admin/client/edit', array('id'=>$item['id']))}">编辑</a>
|
||||
<a href="{:url('/admin/client/del', array('id'=>$item['id']))}" class="ajax-post confirm">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
{$page|raw}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script type="text/javascript">
|
||||
var isLoadModule = true;
|
||||
</script>
|
||||
{/block}
|
||||
88
view/admin/config/edit.html
Normal file
88
view/admin/config/edit.html
Normal file
@@ -0,0 +1,88 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="body"}
|
||||
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>配置管理</h2>
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<form method="post" class="form form-horizontal" role="ajax">
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">配置标识</label>
|
||||
<div class="col-lg-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">
|
||||
<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">
|
||||
<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">
|
||||
<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>
|
||||
{/volist}
|
||||
</select>
|
||||
<span class="help-block">(系统会根据不同类型解析配置值)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">配置分组</label>
|
||||
<div class="col-lg-10">
|
||||
<select name="group" class="form-control" style="width: auto">
|
||||
<option value="0">不分组</option>
|
||||
{volist name="config['config_group_list']" id="group"}
|
||||
<option value="{$key}" {if isset($info['group']) && $info['group'] == $key}selected{/if}>{$group}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
<span class="help-block">(配置分组 用于批量设置 不分组则不会显示在系统设置中)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">配置值</label>
|
||||
<div class="col-lg-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">
|
||||
<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">
|
||||
<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=''}">
|
||||
<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}
|
||||
86
view/admin/config/group.html
Normal file
86
view/admin/config/group.html
Normal file
@@ -0,0 +1,86 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="body"}
|
||||
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>配置管理</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a href="{:url('/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>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<div class="tabs-wrapper">
|
||||
<ul class="nav nav-tabs">
|
||||
{volist name="config['config_group_list']" id="item"}
|
||||
<li {if condition="$key eq $id"}class="active"{/if}>
|
||||
<a href="{:url('/admin/config/group',array('id'=>$key))}">{$item}</a>
|
||||
</li>
|
||||
{/volist}
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade in active" id="tab-home">
|
||||
<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">
|
||||
{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%;">
|
||||
{/case}
|
||||
{case value="num"}
|
||||
<input type="text" class="form-control" name="config[{$item['name']}]" id="config[{$item['name']}]" value="{$item['value']}" placeholder="{$item['title']}" style="width:30%;">
|
||||
{/case}
|
||||
{case value="string"}
|
||||
<input type="text" class="form-control" name="config[{$item['name']}]" id="config[{$item['name']}]" value="{$item['value']}" placeholder="{$item['title']}" style="width:80%;">
|
||||
{/case}
|
||||
{case value="textarea"}
|
||||
<textarea class="form-control" name="config[{$item['name']}]" id="config[{$item['name']}]" style="width:80%; height:120px;">{$item['value']}</textarea>
|
||||
{/case}
|
||||
{case value="select"}
|
||||
<select class="form-control" name="config[{$item['name']}]" id="config[{$item['name']}]" data-toggle='cxselect' style="width:auto;">
|
||||
{volist name=":parse_config_attr($item['extra'])" id="vo"}
|
||||
<option value="{$key}" {eq name="item['value']" value="$key"}selected{/eq}>{$vo}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
{/case}
|
||||
{case value="bool"}
|
||||
<select class="form-control" name="config[{$item['name']}]" id="config[{$item['name']}]" data-toggle='cxselect' style="width:auto;">
|
||||
{volist name=":parse_config_attr($item['extra'])" id="vo"}
|
||||
<option value="{$key}" {eq name="item['value']" value="$key"}selected{/eq}>{$vo}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
{/case}
|
||||
{case value="image"}
|
||||
{:widget('common/Form/showConfig',array($item,$item))}
|
||||
{/case}
|
||||
{/switch}
|
||||
{if condition="$item['remark']"}
|
||||
<span class="help-block">({$item['remark']})</span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
<div class="form-group">
|
||||
<div class="col-lg-offset-2 col-lg-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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/block}
|
||||
118
view/admin/config/index.html
Normal file
118
view/admin/config/index.html
Normal file
@@ -0,0 +1,118 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="body"}
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<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="main-box-body clearfix">
|
||||
<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>
|
||||
|
||||
{/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(',');
|
||||
}
|
||||
|
||||
if (url != undefined && url != '') {
|
||||
window.location.href = url + '/ids/' + param;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
67
view/admin/config/themes.html
Normal file
67
view/admin/config/themes.html
Normal file
@@ -0,0 +1,67 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="body"}
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title|default='新功能'}</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<form method="post" class="form form-horizontal" action="edit" role="ajax">
|
||||
<div class="tabs-wrapper">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#pc" data-toggle="tab">PC端模板</a></li>
|
||||
<li><a href="#mobile" data-toggle="tab">移动端模板</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade in active" id="pc">
|
||||
<div class="row">
|
||||
{volist name="list['pc']" id="item"}
|
||||
<div class="col-sm-4 col-md-3">
|
||||
<div class="thumbnail">
|
||||
<img src="{$item['img']}" alt="{$item['name']}" class="img-rounded">
|
||||
<div class="caption">
|
||||
<h4>{$item['name']}</h4>
|
||||
<p class="text-right">
|
||||
{if $pc == $item['id']}
|
||||
<button class="btn btn-danger btn-block" disabled>已启用</button>
|
||||
{else/}
|
||||
<a href="{:url('admin/config/setthemes?name=pc&id='.$item['id'])}" class="btn btn-primary btn-block ajax-get">启用</a>
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="mobile">
|
||||
<div class="row">
|
||||
{volist name="list['mobile']" id="item"}
|
||||
<div class="col-sm-4 col-md-3">
|
||||
<div class="thumbnail">
|
||||
<img src="{$item['img']}" alt="{$item['name']}" class="img-rounded">
|
||||
<div class="caption">
|
||||
<h4>{$item['name']}</h4>
|
||||
<p class="text-right">
|
||||
{if $mobile == $item['id']}
|
||||
<button class="btn btn-danger btn-block" disabled>已启用</button>
|
||||
{else/}
|
||||
<a href="{:url('admin/config/setthemes?name=mobile&id='.$item['id'])}" class="btn btn-primary btn-block ajax-get">启用</a>
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/block}
|
||||
94
view/admin/content/index.html
Normal file
94
view/admin/content/index.html
Normal file
@@ -0,0 +1,94 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="body"}
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title|default='新功能'}</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-primary" href="{:url('admin/content/add?model_id='.$model_id)}">新 增</a>
|
||||
<button class="btn btn-danger ajax-post confirm" url="{:url('admin/content/del?model_id='.$model_id)}" target-form="ids">删 除</button>
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<div class="row">
|
||||
<form method="get">
|
||||
<div class="col-sm-12 col-md-4 col-lg-3">
|
||||
<input type="text" class="form-control" name="keyword" value="{$keyword|default=''}" placeholder="请输入关键字">
|
||||
</div>
|
||||
{if isset($cate_list)}
|
||||
<div class="col-sm-12 col-md-4 col-lg-3">
|
||||
<select name="category" id="category" class="form-control">
|
||||
<option value="">请选择栏目</option>
|
||||
{volist name="cate_list" id="item"}
|
||||
<option value="{$item['id']}" {if isset($category) && $item['id'] == $category}selected{/if}>{$item['title_show']}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="col-sm-12 col-md-4">
|
||||
<button class="btn btn-primary" type="submit">搜索</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="table-responsive clearfix">
|
||||
|
||||
<div class="table-responsive clearfix">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="30"><input class="checkbox check-all" type="checkbox"></th>
|
||||
{volist name="grid['grids']" id="item"}
|
||||
<th>{$item['title']}</th>
|
||||
{/volist}
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{if condition="empty($list)"}
|
||||
{php}
|
||||
$cow = count($grid['grids'])+2;
|
||||
{/php}
|
||||
<tr>
|
||||
<td colspan="{$cow}" align="center">暂无数据!</td>
|
||||
</tr>
|
||||
{else/}
|
||||
{volist name="list" id="item"}
|
||||
<tr>
|
||||
<td><input class="ids row-selected" type="checkbox" name="id[]" value="{$item['id']}"></td>
|
||||
{volist name="grid['grids']" id="vo"}
|
||||
{if isset($vo['format'])}
|
||||
<td>{$item[$vo['field'][0]]|$vo['format']}</td>
|
||||
{else/}
|
||||
<td>{$item[$vo['field'][0]]}</td>
|
||||
{/if}
|
||||
{/volist}
|
||||
<td>
|
||||
{if isset($item['is_top'])}
|
||||
{if $item['is_top']}
|
||||
<a href="{:url('admin/content/settop?model_id='.$model_id,array('id'=>$item['id'],'is_top'=>'0'))}" class="ajax-get">取消置顶</a>
|
||||
{else/}
|
||||
<a href="{:url('admin/content/settop?model_id='.$model_id,array('id'=>$item['id'],'is_top'=>'1'))}" class="ajax-get">置顶</a>
|
||||
{/if}
|
||||
{/if}
|
||||
{if isset($item['status'])}
|
||||
{if $item['status']}
|
||||
<a href="{:url('admin/content/status?model_id='.$model_id,array('id'=>$item['id'],'status'=>'0'))}" class="ajax-get">取消审核</a>
|
||||
{else/}
|
||||
<a href="{:url('admin/content/status?model_id='.$model_id,array('id'=>$item['id'],'status'=>'1'))}" class="ajax-get">审核</a>
|
||||
{/if}
|
||||
{/if}
|
||||
<a href="{:url('admin/content/edit?model_id='.$model_id,array('id'=>$item['id']))}" >编辑</a>
|
||||
<a href="{:url('admin/content/del?model_id='.$model_id,array('id'=>$item['id']))}" class="ajax-get confirm">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
{/if}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{$page|raw}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
136
view/admin/database/export.html
Normal file
136
view/admin/database/export.html
Normal file
@@ -0,0 +1,136 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="body"}
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<!-- 标题栏 -->
|
||||
<div class="pull-left">
|
||||
<h2>数据备份</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a id="export" class="btn btn-primary" href="javascript:;" autocomplete="off">立即备份</a>
|
||||
<a id="optimize" class="btn btn-success" href="{:url('optimize')}">优化表</a>
|
||||
<a id="repair" class="btn btn-warning" href="{:url('repair')}">修复表</a>
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<form id="export-form" method="post" action="{:url('export')}">
|
||||
<div class="table-responsive clearfix">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="48">
|
||||
<input class="check-all" checked="chedked" type="checkbox" value=""></th>
|
||||
<th>表名</th>
|
||||
<th width="120">数据量</th>
|
||||
<th width="120">数据大小</th>
|
||||
<th width="180">创建时间</th>
|
||||
<th width="160">备份状态</th>
|
||||
<th width="120">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="list" id="table"}
|
||||
<tr>
|
||||
<td class="num">
|
||||
<input class="ids" checked="chedked" type="checkbox" name="tables[]" value="{$table.name}"></td>
|
||||
<td>{$table.name}</td>
|
||||
<td>{$table.rows}</td>
|
||||
<td>{$table.data_length|format_bytes}</td>
|
||||
<td>{$table.create_time}</td>
|
||||
<td class="info">未备份</td>
|
||||
<td class="action">
|
||||
<a class="ajax-get no-refresh" href="{:url('optimize?tables='.$table['name'])}">优化表</a>
|
||||
|
||||
<a class="ajax-get no-refresh" href="{:url('repair?tables='.$table['name'])}">修复表</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name="script"}
|
||||
<script type="text/javascript">
|
||||
(function($){
|
||||
var $form = $("#export-form"), $export = $("#export"), tables
|
||||
$optimize = $("#optimize"), $repair = $("#repair");
|
||||
|
||||
$optimize.add($repair).click(function(){
|
||||
$.post(this.href, $form.serialize(), function(data){
|
||||
if(data.code){
|
||||
updateAlert(data.msg,'alert-success');
|
||||
} else {
|
||||
updateAlert(data.msg,'alert-error');
|
||||
}
|
||||
setTimeout(function(){
|
||||
$('#top-alert').find('button').click();
|
||||
$(that).removeClass('disabled').prop('disabled',false);
|
||||
},1500);
|
||||
}, "json");
|
||||
return false;
|
||||
});
|
||||
|
||||
$export.click(function(){
|
||||
$export.parent().children().addClass("disabled");
|
||||
$export.html("正在发送备份请求...");
|
||||
$.post(
|
||||
$form.attr("action"),
|
||||
$form.serialize(),
|
||||
function(data){
|
||||
if(data.code){
|
||||
tables = data.data.tables;
|
||||
$export.html(data.msg + "开始备份,请不要关闭本页面!");
|
||||
backup(data.data.tab);
|
||||
window.onbeforeunload = function(){ return "正在备份数据库,请不要关闭!" }
|
||||
} else {
|
||||
updateAlert(data.msg,'alert-error');
|
||||
$export.parent().children().removeClass("disabled");
|
||||
$export.html("立即备份");
|
||||
setTimeout(function(){
|
||||
$('#top-alert').find('button').click();
|
||||
$(that).removeClass('disabled').prop('disabled',false);
|
||||
},1500);
|
||||
}
|
||||
},
|
||||
"json"
|
||||
);
|
||||
return false;
|
||||
});
|
||||
|
||||
function backup(tab, status){
|
||||
status && showmsg(tab.id, "开始备份...(0%)");
|
||||
$.get($form.attr("action"), tab, function(data){
|
||||
if(data.code){
|
||||
var info = data.data;
|
||||
showmsg(tab.id, data.msg);
|
||||
|
||||
if(!$.isPlainObject(info.tab)){
|
||||
$export.parent().children().removeClass("disabled");
|
||||
$export.html("备份完成,点击重新备份");
|
||||
window.onbeforeunload = function(){ return null }
|
||||
return;
|
||||
}
|
||||
backup(info.tab, tab.id != info.tab.id);
|
||||
} else {
|
||||
updateAlert(data.msg,'alert-error');
|
||||
$export.parent().children().removeClass("disabled");
|
||||
$export.html("立即备份");
|
||||
setTimeout(function(){
|
||||
$('#top-alert').find('button').click();
|
||||
$(that).removeClass('disabled').prop('disabled',false);
|
||||
},1500);
|
||||
}
|
||||
}, "json");
|
||||
|
||||
}
|
||||
|
||||
function showmsg(id, msg){
|
||||
$form.find("input[value=" + tables[id] + "]").closest("tr").find(".info").html(msg);
|
||||
}
|
||||
})(jQuery);
|
||||
</script>
|
||||
{/block}
|
||||
87
view/admin/database/import.html
Normal file
87
view/admin/database/import.html
Normal file
@@ -0,0 +1,87 @@
|
||||
{extend name="admin/base"/}
|
||||
|
||||
{block name="body"}
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<!-- 标题栏 -->
|
||||
<div class="pull-left">
|
||||
<h2>数据恢复</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
|
||||
<div class="table-responsive clearfix">
|
||||
<!-- 应用列表 -->
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="200">备份名称</th>
|
||||
<th width="80">卷数</th>
|
||||
<th width="80">压缩</th>
|
||||
<th width="80">数据大小</th>
|
||||
<th width="200">备份时间</th>
|
||||
<th>状态</th>
|
||||
<th width="120">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="list" id="item"}
|
||||
<tr>
|
||||
<td>{$item['time']|date='Ymd-His',###}</td>
|
||||
<td>{$item['part']}</td>
|
||||
<td>{$item['compress']}</td>
|
||||
<td>{$item['size']|format_bytes}</td>
|
||||
<td>{$key}</td>
|
||||
<td>-</td>
|
||||
<td class="action">
|
||||
<a class="db-import" href="{:url('import?time='.$item['time'])}">还原</a>
|
||||
|
||||
<a class="ajax-get confirm" href="{:url('del?time='.$item['time'])}">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /应用列表 -->
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name="script"}
|
||||
<script type="text/javascript">
|
||||
$(".db-import").click(function(){
|
||||
var self = this, status = ".";
|
||||
$.get(self.href, success, "json");
|
||||
window.onbeforeunload = function(){ return "正在还原数据库,请不要关闭!" }
|
||||
return false;
|
||||
|
||||
function success(data){
|
||||
if(data.code){
|
||||
if(data.data.gz){
|
||||
data.msg += status;
|
||||
if(status.length === 5){
|
||||
status = ".";
|
||||
} else {
|
||||
status += ".";
|
||||
}
|
||||
}
|
||||
$(self).parent().prev().text(data.msg);
|
||||
if(data.data.part){
|
||||
$.get(self.href,
|
||||
{"part" : data.data.part, "start" : data.data.start},
|
||||
success,
|
||||
"json"
|
||||
);
|
||||
} else {
|
||||
window.onbeforeunload = function(){ return null; }
|
||||
}
|
||||
} else {
|
||||
updateAlert(data.msg,'alert-error');
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
64
view/admin/form/attr.html
Normal file
64
view/admin/form/attr.html
Normal file
@@ -0,0 +1,64 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="body"}
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title|default='新功能'}</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-danger" href="{:url('addattr',array('form_id'=>$form_id))}"><i class="fa fa-plus"></i> 新 增</a>
|
||||
<!-- <button class="btn btn-danger ajax-post confirm" url="{:url('del')}" target-form="ids"><i class="fa fa-remove"></i> 删 除</button> -->
|
||||
<a class="btn btn-warning" href="{:url('Form/index')}"><i class="fa fa-reply"></i> 返回</a>
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<div class="table-responsive clearfix">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input class="checkbox check-all" type="checkbox"></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['title']}</td>
|
||||
<td>{$item['name']}</td>
|
||||
<td>{$item['type_text']}</td>
|
||||
<td>{$item['length']}</td>
|
||||
<td>{$item['value']}</td>
|
||||
<td>
|
||||
<a href="{:url('editattr',array('id'=>$item['id'], 'form_id'=>$form_id))}">编辑</a>
|
||||
<a href="{:url('delattr',array('id'=>$item['id'], 'form_id'=>$form_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="__PUBLIC__/plugs/layer/layer.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$('.openDilog').click(function(){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
area: ['900px', '560px'],
|
||||
content: $('.openDilog').attr('url')
|
||||
});
|
||||
});
|
||||
})
|
||||
</script>
|
||||
{/block}
|
||||
62
view/admin/form/detail_alumn.html
Normal file
62
view/admin/form/detail_alumn.html
Normal file
@@ -0,0 +1,62 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="body"}
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title|default='新功能'}</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<div class="table-responsive clearfix">
|
||||
<table class="table table-hover table-bordered">
|
||||
<tr>
|
||||
<th width="120" style="text-align: right;">姓名</th>
|
||||
<td>{$info['name']}</td>
|
||||
<th width="120" style="text-align: right;">性别</th>
|
||||
<td>{if $info['sex'] == 0}保密{elseif $info['sex'] == 1}男{elseif $info['sex'] == 2}女{/if}</td>
|
||||
<th width="120" style="text-align: right;">出生年月</th>
|
||||
<td>{$info['birthday']|date='Y-m-d',###}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width="120" style="text-align: right;">从事行业</th>
|
||||
<td>{$info['industry']}</td>
|
||||
<th width="120" style="text-align: right;">所在单位</th>
|
||||
<td colspan="3">{$info['company']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width="120" style="text-align: right;">单位职务</th>
|
||||
<td>{$info['duties']}</td>
|
||||
<th width="120" style="text-align: right;">入学年份</th>
|
||||
<td>{$info['en_year']}</td>
|
||||
<th width="120" style="text-align: right;">所学专业</th>
|
||||
<td>{$info['major']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width="120" style="text-align: right;">联系电话</th>
|
||||
<td>{$info['mobile']}</td>
|
||||
<th width="120" style="text-align: right;">QQ</th>
|
||||
<td>{$info['qq']}</td>
|
||||
<th width="120" style="text-align: right;">微信</th>
|
||||
<td>{$info['wechat']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width="120" style="text-align: right;">个人简历</th>
|
||||
<td colspan="5">
|
||||
{$info['profile']}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
说明:个人简历中,您可以添加任何您愿意提供的信息,例如您可以为校友提供何种帮助,有何特长,获得的主要荣誉,是否参加其他社团组织等等。
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
|
||||
{/block}
|
||||
69
view/admin/form/index.html
Normal file
69
view/admin/form/index.html
Normal file
@@ -0,0 +1,69 @@
|
||||
{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="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title|default='新功能'}</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<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="main-box-body clearfix">
|
||||
<div class="table-responsive clearfix">
|
||||
<table class="table 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>
|
||||
{notempty name="list"}
|
||||
{volist name="list" id="item"}
|
||||
<tr>
|
||||
<td>
|
||||
<input class="ids" type="checkbox" name="ids[]" value="{$item['id']}" />
|
||||
</td>
|
||||
<td>{$item['id']}</td>
|
||||
<td>{$item['name']}</td>
|
||||
<td>
|
||||
<a data-id="{$item.id}" href="{:url('form/edit?id='.$item['id'])}">{$item['title']}</a>
|
||||
</td>
|
||||
<td>
|
||||
<span>{$item.create_time|time_format}</span>
|
||||
</td>
|
||||
<td>
|
||||
{if $item['status']}
|
||||
<span class="label label-primary">{$item['status_text']}</span>
|
||||
{else/}
|
||||
<span class="label label-danger">{$item['status_text']}</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{:url('admin/form/attr?form_id='.$item['id'])}">字段</a>
|
||||
<a href="{:url('admin/form/status?id='.$item['id'].'&status='.abs(1-$item['status']))}" class="ajax-get">{$item['status']|show_status_op}</a>
|
||||
<a href="{:url('admin/form/edit?id='.$item['id'])}">编辑</a>
|
||||
<a href="{:url('admin/form/del?id='.$item['id'])}" class="confirm ajax-get">删除</a>
|
||||
<a href="{:url('admin/form/lists?form_id='.$item['id'])}">数据</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
{else/}
|
||||
<td colspan="7" class="text-center">aOh! 暂时还没有创建模型!</td>
|
||||
{/notempty}
|
||||
</tbody>
|
||||
</table>
|
||||
{$page|raw}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
62
view/admin/form/list_alumn.html
Normal file
62
view/admin/form/list_alumn.html
Normal file
@@ -0,0 +1,62 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="body"}
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title|default='新功能'}</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-primary" href="{:url('admin/form/outxls?form_id='.$form_id)}" target="_blank">导出</a>
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<div class="table-responsive clearfix">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input class="checkbox check-all" type="checkbox"></th>
|
||||
<th>姓名</th>
|
||||
<th>性别</th>
|
||||
<th>生日</th>
|
||||
<th>从事行业</th>
|
||||
<th>所在单位</th>
|
||||
<th>职务</th>
|
||||
<th>入学年份</th>
|
||||
<th>所学专业</th>
|
||||
<th>电话</th>
|
||||
<th>QQ</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['name']}</td>
|
||||
<td>{if $item['sex'] == 0}保密{elseif $item['sex'] == 1}男{elseif $item['sex'] == 2}女{/if}</td>
|
||||
<td>{$item['birthday']|date='Y-m-d',###}</td>
|
||||
<td>{$item['industry']}</td>
|
||||
<td>{$item['company']}</td>
|
||||
<td>{$item['duties']}</td>
|
||||
<td>{$item['en_year']}</td>
|
||||
<td>{$item['major']}</td>
|
||||
<td>{$item['mobile']}</td>
|
||||
<td>{$item['qq']}</td>
|
||||
<td>{$item['wechat']}</td>
|
||||
<td>
|
||||
<a href="{:url('detail',array('id'=>$item['id'], 'form_id'=>$form_id))}">详情</a>
|
||||
<a href="{:url('deldata',array('id'=>$item['id'], 'form_id'=>$form_id))}" class="confirm ajax-get">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
{$page|raw}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
|
||||
{/block}
|
||||
77
view/admin/group/access.html
Normal file
77
view/admin/group/access.html
Normal file
@@ -0,0 +1,77 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="body"}
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title|default='新功能'}</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="30"><input class="checkbox check-all" type="checkbox"></th>
|
||||
<th width="60">ID</th>
|
||||
<th>组名</th>
|
||||
<th>标识</th>
|
||||
<th>分组</th>
|
||||
<th>状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="list" id="item"}
|
||||
<tr>
|
||||
<th width="30"><input class="ids row-selected" type="checkbox" name="id[]" value="{$item['id']}"></th>
|
||||
<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|raw}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
63
view/admin/group/auth.html
Normal file
63
view/admin/group/auth.html
Normal file
@@ -0,0 +1,63 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="body"}
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title|default='新功能'}</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
view/admin/group/index.html
Normal file
83
view/admin/group/index.html
Normal file
@@ -0,0 +1,83 @@
|
||||
{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="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title|default='新功能'}</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|raw}
|
||||
</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}
|
||||
16
view/admin/index/clear.html
Normal file
16
view/admin/index/clear.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{extend name="admin/base"/}
|
||||
|
||||
{block name="body"}
|
||||
<Card style="width:350px">
|
||||
<p slot="title">
|
||||
<Icon type="ios-film-outline"></Icon>
|
||||
Classic film
|
||||
</p>
|
||||
<Input v-model="value" placeholder="Enter something..." style="width: 300px" />
|
||||
</Card>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script type="text/javascript">
|
||||
var isLoadModule = true;
|
||||
</script>
|
||||
{/block}
|
||||
104
view/admin/index/index.html
Normal file
104
view/admin/index/index.html
Normal file
@@ -0,0 +1,104 @@
|
||||
{extend name="admin/base"/}
|
||||
|
||||
{block name="body"}
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="row">
|
||||
<div class="col-lg-3 col-sm-6 col-xs-12">
|
||||
<div class="main-box infographic-box colored emerald-bg"> <i class="fa fa-envelope"></i>
|
||||
<span class="headline">今日行为</span>
|
||||
<span class="value">0</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-sm-6 col-xs-12">
|
||||
<div class="main-box infographic-box colored green-bg"> <i class="fa fa-money"></i>
|
||||
<span class="headline">栏目总数</span>
|
||||
<span class="value">14</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-sm-6 col-xs-12">
|
||||
<div class="main-box infographic-box colored red-bg"> <i class="fa fa-user"></i>
|
||||
<span class="headline">用户总数</span>
|
||||
<span class="value">241</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-sm-6 col-xs-12">
|
||||
<div class="main-box infographic-box colored purple-bg">
|
||||
<i class="fa fa-globe"></i>
|
||||
<span class="headline">模型总数</span>
|
||||
<span class="value">4</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><div class="col-lg-6">
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<h2>SentCMS开发团队</h2>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>总策划</th>
|
||||
<td>郭平平</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>产品设计及研发团队</th>
|
||||
<td>郭平平</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>界面及用户体验团队</th>
|
||||
<td>BootStrap 团队</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>官方网址</th>
|
||||
<td><a href="http://www.tensent.cn" target="_blank">www.tensent.cn</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>官方QQ群</th>
|
||||
<td><a target="_blank" href="http://jq.qq.com/?_wv=1027&k=WVW2se"><img border="0" src="http://pub.idqqimg.com/wpa/images/group.png" alt="SentCMS技术交流" title="SentCMS技术交流"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>BUG反馈</th>
|
||||
<td><a href="http://bbs.sentcms.com/" target="_blank">SentCMS讨论区</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div><div class="col-lg-6">
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<h2>系统信息</h2>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>核心版本</th>
|
||||
<td>SentCMS v3.6.201803</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>服务器操作系统</th>
|
||||
<td>Linux</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>运行环境</th>
|
||||
<td>nginx/1.12.2</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>MYSQL版本</th>
|
||||
<td>5.6.37-log</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>上传限制</th>
|
||||
<td>50M</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>系统版权所有</th>
|
||||
<td>
|
||||
<a href="http://www.tensent.cn/" target="_blank">南昌腾速科技有限公司</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div></div>
|
||||
{/block}
|
||||
109
view/admin/index/login.html
Normal file
109
view/admin/index/login.html
Normal file
@@ -0,0 +1,109 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>SentCMS后台管理系统-后台登录</title>
|
||||
<link href="__static__/libs/bootstrap/css/bootstrap.min.css" rel="stylesheet"/>
|
||||
<link href="__static__/libs/font-awesome/css/font-awesome.min.css" rel="stylesheet"/>
|
||||
<link href="__css__/theme_styles.css" rel="stylesheet"/>
|
||||
<link href="__css__/login.css" rel="stylesheet"/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="login-container">
|
||||
|
||||
<!-- 动态云层动画 开始 -->
|
||||
<div class="clouds-container">
|
||||
<div class="clouds clouds-footer"></div>
|
||||
<div class="clouds"></div>
|
||||
<div class="clouds clouds-fast"></div>
|
||||
</div>
|
||||
<!-- 动态云层动画 结束 -->
|
||||
|
||||
<!-- 顶部导航条 开始 -->
|
||||
<div class="header notselect">
|
||||
<span class="title notselect">SentCMS <sup>v{$system_version|default="4.0.0"}</sup></span>
|
||||
<ul>
|
||||
<li><a href="javascript:void(0)" target="_blank">帮助</a></li>
|
||||
<li>
|
||||
<a href="http://sw.bos.baidu.com/sw-search-sp/software/9e6bc213b9d0b/ChromeStandalone_63.0.3239.132_Setup.exe" target="_blank">推荐使用谷歌浏览器</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 顶部导航条 结束 -->
|
||||
|
||||
<!-- 页面表单主体 开始 -->
|
||||
<div class="container">
|
||||
<div class="login-from">
|
||||
<div class="logo"><img src="__static__/images/logo.png"></div>
|
||||
<div class="form">
|
||||
<form action="">
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="basic-addon1"><i class="fa fa-user"></i></span>
|
||||
<input type="text" class="form-control" name="username" placeholder="用户名" aria-describedby="basic-addon1">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon" id="basic-addon1"><i class="fa fa-lock"></i></span>
|
||||
<input type="password" class="form-control" name="password" placeholder="密码" aria-describedby="basic-addon1">
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-default btn-block" type="submit">确认登录</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 页面表单主体 结束 -->
|
||||
|
||||
<!-- 底部版权信息 开始 -->
|
||||
<div class="footer notselect">
|
||||
腾速科技 © TenSent.Icn
|
||||
</div>
|
||||
<!-- 底部版本信息 结束 -->
|
||||
|
||||
</div>
|
||||
<script src="__static__/libs/jquery/jquery.min.js"></script>
|
||||
<script src="__static__/libs/layer/layer.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
//表单提交
|
||||
$(document).ajaxStart(function(){
|
||||
$("button:submit").addClass("log-in").attr("disabled", true);
|
||||
}).ajaxStop(function(){
|
||||
$("button:submit").removeClass("log-in").attr("disabled", false);
|
||||
});
|
||||
|
||||
$("form").submit(function(){
|
||||
var self = $(this);
|
||||
$.post(self.attr("action"), self.serialize(), success, "json");
|
||||
return false;
|
||||
|
||||
function success(data){
|
||||
if(data.code == 0){
|
||||
layer.msg(data.msg, {time:3000, end:function(){
|
||||
window.location.href = data.url;
|
||||
}});
|
||||
} else {
|
||||
layer.msg(data.msg, {time:3000, end:function(){
|
||||
//刷新验证码
|
||||
//$(".reloadverify").click();
|
||||
}});
|
||||
}
|
||||
}
|
||||
});
|
||||
//初始化选中用户名输入框
|
||||
$("#itemBox").find("input[name=username]").focus();
|
||||
//刷新验证码
|
||||
var verifyimg = $(".verifyimg").attr("src");
|
||||
$(".reloadverify").click(function(){
|
||||
if( verifyimg.indexOf('?')>0){
|
||||
$(".verifyimg").attr("src", verifyimg+'&random='+Math.random());
|
||||
}else{
|
||||
$(".verifyimg").attr("src", verifyimg.replace(/\?.*$/,'')+'?'+Math.random());
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
49
view/admin/link/index.html
Normal file
49
view/admin/link/index.html
Normal file
@@ -0,0 +1,49 @@
|
||||
{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="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title|default='新功能'}</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-primary" href="{:url('add')}">新 增</a>
|
||||
<button class="btn btn-danger ajax-post confirm" url="{:url('delete')}" target-form="ids">删 除</button>
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<div class="table-responsive clearfix">
|
||||
<table class="table 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="id[]" value="{$item['id']}"></td>
|
||||
<td>{$item['id']}</td>
|
||||
<td>{$item['title']}</td>
|
||||
<td>{$item['sort']}</td>
|
||||
<td>{$item['update_time']|date='Y-m-d',###}</td>
|
||||
<td>
|
||||
<a href="{:url('edit?id='.$item['id'])}">编辑</a>
|
||||
<a href="{:url('delete?id='.$item['id'])}" class="confirm ajax-get">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
{$page|raw}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
96
view/admin/menu/edit.html
Normal file
96
view/admin/menu/edit.html
Normal file
@@ -0,0 +1,96 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="body"}
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{:isset($info['id'])?'编辑':'新增'}后台菜单</h2>
|
||||
</div>
|
||||
<div class="pull-right"></div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<form method="post" class="form form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">标题</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="title" value="{$info.title|default=''}" style="width: 80%">
|
||||
<span class="help-block">(用于后台显示的配置标题)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">小图标</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="icon" value="{$info.icon|default=''}" style="width: 80%">
|
||||
<span class="help-block">(用于显示在菜单左侧,不填则不显示)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">排序</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="sort" value="{$info.sort|default=0}" style="width: 60%">
|
||||
<span class="help-block">(用于分组显示的顺序)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">链接</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="url" value="{$info['url']|default=''}" style="width: 80%">
|
||||
<span class="help-block">(U函数解析的URL或者外链)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">上级菜单</label>
|
||||
<div class="col-lg-10">
|
||||
<select name="pid" class="form-control" style="width: 50%">
|
||||
{volist name="Menus" id="menu"}
|
||||
<option value="{$menu['id']}" {if $info['pid'] == $menu['id']}selected{/if}>{$menu.title_show}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
<span class="help-block">(所属的上级菜单)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">分组</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="group" value="{$info['group']|default=''}" style="width: 50%">
|
||||
<span class="help-block">(用于左侧分组二级菜单)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">是否隐藏</label>
|
||||
<div class="col-lg-1">
|
||||
<select name="hide" class="form-control">
|
||||
<option value="0" >否</option>
|
||||
<option value="1" {if isset($info['hide']) && $info['hide']==1}selected{/if}>是
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">仅开发者模式可见</label>
|
||||
<div class="col-lg-1">
|
||||
<select name="is_dev" class="form-control">
|
||||
<option value="0" >否</option>
|
||||
<option value="1" {if isset($info['is_dev']) && $info['is_dev']==1}selected{/if}>是
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">说明</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name="tip" value="{$info.tip|default=''}" style="width: 60%;">
|
||||
<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=''}">
|
||||
<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}
|
||||
29
view/admin/menu/import.html
Normal file
29
view/admin/menu/import.html
Normal file
@@ -0,0 +1,29 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="body"}
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>批量导入 [{$data['title']|default='顶级菜单'}]</h2>
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<form id="form" action="{:url('import')}" method="post" class="form form-horizontal">
|
||||
<!-- 基础文档模型 -->
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">导入的内容</label>
|
||||
<div class="col-lg-10">
|
||||
<textarea name="tree" class="form-control" style="width:80%; height:160px;"></textarea>
|
||||
<span class="help-block"><b>导入格式:</b><br/>首页|Index/index|0|分组名称<br/>更新缓存|Index/clear|0|分组名称<br/>(请按照导入格式输入)</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=''}">
|
||||
<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}
|
||||
120
view/admin/menu/index.html
Normal file
120
view/admin/menu/index.html
Normal file
@@ -0,0 +1,120 @@
|
||||
{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="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{present name="data"}[ {$data['title']} ] 子{/present}菜单管理</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<!-- <div class="search-form pull-left">
|
||||
<div class="form-group">
|
||||
<input type="text" name="title" class="form-control" value="{:input('title')}"
|
||||
placeholder="请输入菜单名称">
|
||||
<span class="input-group-btn"><a class="btn btn-default" href="javascript:;" id="search" url="__SELF__"><i class="icon-search"></i></a></span>
|
||||
</div>
|
||||
</div> -->
|
||||
<a class="btn btn-primary" href="{:url('add',array('pid'=>input('get.pid',0)))}">新 增</a>
|
||||
<button class="btn btn-danger ajax-post confirm" url="{:url('del')}" target-form="ids">删 除</button>
|
||||
<a class="btn btn-success" href="{:url('import',array('pid'=>input('get.pid',0)))}">导 入</a>
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<form class="ids">
|
||||
<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>URL</th>
|
||||
<th>排序</th>
|
||||
<th>仅开发者模式显示</th>
|
||||
<th>隐藏</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{notempty name="list"}
|
||||
{volist name="list" id="menu"}
|
||||
<tr>
|
||||
<td><input class="ids row-selected" type="checkbox" name="id[]" value="{$menu.id}"></td>
|
||||
<td>{$menu.id}</td>
|
||||
<td>
|
||||
{$menu['level_show']}
|
||||
<a href="#" class="editable editable-click" data-id="{$menu['id']}" data-name="title" data-type="text" data-pk="{$menu['id']}" data-url="{:url('editable')}">{$menu['title']}</a>
|
||||
<a class="add-sub-cate" title="添加子分类" href="{:url('add?pid='.$menu['id'])}">
|
||||
<i class="fa fa-plus-square"></i>
|
||||
</a>
|
||||
</td>
|
||||
<td>{$menu.up_title|default='无'}</td>
|
||||
<td>{$menu.group}</td>
|
||||
<td>{$menu.url}</td>
|
||||
<td><a href="#" class="editable editable-click" data-id="{$menu['id']}" data-name="sort" data-type="text" data-pk="{$menu['id']}" data-url="{:url('editable')}">{$menu['sort']}</a></td>
|
||||
<td>
|
||||
<a href="{:url('toogleDev',array('id'=>$menu['id'],'value'=>abs($menu['is_dev']-1)))}"
|
||||
class="ajax-get">
|
||||
{$menu.is_dev_text}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{:url('toogleHide',array('id'=>$menu['id'],'value'=>abs($menu['hide']-1)))}"
|
||||
class="ajax-get">
|
||||
{$menu.hide_text}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a title="编辑" href="{:url('edit?id='.$menu['id'])}">编辑</a>
|
||||
<a class="confirm ajax-get" title="删除" href="{:url('del?id='.$menu['id'])}">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
{else/}
|
||||
<td colspan="10" class="text-center"> aOh! 暂时还没有内容!</td>
|
||||
{/notempty}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
</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();
|
||||
//搜索功能
|
||||
$("#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;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/block}
|
||||
111
view/admin/menu/sort.html
Normal file
111
view/admin/menu/sort.html
Normal file
@@ -0,0 +1,111 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="body"}
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>菜单排序 [ <a href="{:url('index',array('pid'=>I('pid')))}">返回列表</a> ]</h2>
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<form action="{:url('sort')}" method="post" class="form form-horizontal">
|
||||
<div class="form-group">
|
||||
<div class="col-lg-2">
|
||||
<select value="" size="8" class="form-control">
|
||||
{volist name="list" id="vo"}
|
||||
<option class="ids" title="{$vo.title}" value="{$vo.id}">{$vo.title}</option>
|
||||
{/volist}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
<button class="top btn btn-primary btn-block" type="button"><i class="fa fa-arrow-up"></i> 第 一</button>
|
||||
<button class="up btn btn-primary btn-block" type="button"><i class="fa fa-chevron-up"></i> 上 移</button>
|
||||
<button class="down btn btn-primary btn-block" type="button"><i class="fa fa-chevron-down"></i> 下 移</button>
|
||||
<button class="bottom btn btn-primary btn-block" type="button"><i class="fa fa-arrow-down"></i> 最 后</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sort_bottom form-group">
|
||||
<div class="col-lg-12">
|
||||
<input type="hidden" name="ids">
|
||||
<button class="sort_confirm btn btn-primary submit-btn" type="button">确 定</button>
|
||||
<button class="sort_cancel btn btn-dafault btn-return" type="button" url="{$Think.cookie.__forward__}">返 回</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name="script"}
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
sort();
|
||||
$(".top").click(function(){
|
||||
rest();
|
||||
$("option:selected").prependTo("select");
|
||||
sort();
|
||||
})
|
||||
$(".bottom").click(function(){
|
||||
rest();
|
||||
$("option:selected").appendTo("select");
|
||||
sort();
|
||||
})
|
||||
$(".up").click(function(){
|
||||
rest();
|
||||
$("option:selected").after($("option:selected").prev());
|
||||
sort();
|
||||
})
|
||||
$(".down").click(function(){
|
||||
rest();
|
||||
$("option:selected").before($("option:selected").next());
|
||||
sort();
|
||||
})
|
||||
$(".search").click(function(){
|
||||
var v = $("input").val();
|
||||
$("option:contains("+v+")").attr('selected','selected');
|
||||
})
|
||||
function sort(){
|
||||
$('option').text(function(){return ($(this).index()+1)+'.'+$(this).text()});
|
||||
}
|
||||
|
||||
//重置所有option文字。
|
||||
function rest(){
|
||||
$('option').text(function(){
|
||||
return $(this).text().split('.')[1]
|
||||
});
|
||||
}
|
||||
|
||||
//获取排序并提交
|
||||
$('.sort_confirm').click(function(){
|
||||
var arr = new Array();
|
||||
$('.ids').each(function(){
|
||||
arr.push($(this).val());
|
||||
});
|
||||
$('input[name=ids]').val(arr.join(','));
|
||||
$.post(
|
||||
$('form').attr('action'),
|
||||
{
|
||||
'ids' : arr.join(',')
|
||||
},
|
||||
function(data){
|
||||
if (data.status) {
|
||||
updateAlert(data.info + ' 页面即将自动跳转~','alert-success');
|
||||
}else{
|
||||
updateAlert(data.info,'alert-success');
|
||||
}
|
||||
setTimeout(function(){
|
||||
if (data.status) {
|
||||
$('.sort_cancel').click();
|
||||
}
|
||||
},1500);
|
||||
},
|
||||
'json'
|
||||
);
|
||||
});
|
||||
|
||||
//点击取消按钮
|
||||
$('.sort_cancel').click(function(){
|
||||
window.location.href = $(this).attr('url');
|
||||
});
|
||||
})
|
||||
</script>
|
||||
{/block}
|
||||
62
view/admin/model/add.html
Normal file
62
view/admin/model/add.html
Normal file
@@ -0,0 +1,62 @@
|
||||
{extend name="admin/base"/}
|
||||
|
||||
{block name="body"}
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>新增模型</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
|
||||
<!-- 表单 -->
|
||||
<form id="form" method="post" class="form-horizontal form">
|
||||
<!-- 基础 -->
|
||||
<div id="tab1" class="tab-pane in tab1">
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">模型标识</label>
|
||||
<div class="col-lg-6 col-sm-10">
|
||||
<input type="text" class="form-control " name="name" value="">
|
||||
<span class="help-block">(请输入文档模型标识)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">模型名称</label>
|
||||
<div class="col-lg-6 col-sm-10">
|
||||
<input type="text" class="form-control " name="title" value="">
|
||||
<span class="help-block">(请输入模型的名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">文档模型</label>
|
||||
<div class="col-lg-6 col-sm-10">
|
||||
<select class="form-control" name="is_doc">
|
||||
<option value="1">是</option>
|
||||
<option value="0">否</option>
|
||||
</select>
|
||||
<span class="help-block">(文档模型默认导入部分必要字段)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">模型图标</label>
|
||||
<div class="col-lg-6 col-sm-10">
|
||||
<input type="text" class="form-control " name="icon" value="">
|
||||
<span class="help-block">(模型图标)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 按钮 -->
|
||||
<div class="form-group">
|
||||
<div class="col-lg-offset-2 col-lg-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}
|
||||
156
view/admin/model/edit.html
Normal file
156
view/admin/model/edit.html
Normal file
@@ -0,0 +1,156 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="style"}
|
||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/plugs/board/board.min.css">
|
||||
{/block}
|
||||
{block name="body"}
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>编辑模型</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<form id="form" method="post" class="form form-horizontal">
|
||||
<div class="tabs-wrapper">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#tab1" data-toggle="tab">基 础</a></li>
|
||||
<li><a href="#tab2" data-toggle="tab">设 计</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade in active" id="tab1">
|
||||
<!-- 基础 -->
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">模型标识</label>
|
||||
<div class="col-lg-6 col-sm-10">
|
||||
<input type="text" class="form-control disabled" name="name" value="{$info['name']}" disabled>
|
||||
<span class="help-block">(请输入文档模型标识)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">模型名称</label>
|
||||
<div class="col-lg-6 col-sm-10">
|
||||
<input type="text" class="form-control " name="title" value="{$info['title']}">
|
||||
<span class="help-block">(请输入模型的名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">模型图标</label>
|
||||
<div class="col-lg-6 col-sm-10">
|
||||
<input type="text" class="form-control " name="icon" value="{$info['icon']}">
|
||||
<span class="help-block">(模型图标)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="tab2">
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">表单显示分组</label>
|
||||
<div class="col-lg-6 col-sm-10">
|
||||
<input type="text" class="form-control" name="attribute_group" value="{$info['attribute_group']}">
|
||||
<span class="help-block">(用于表单显示的分组,以及设置该模型表单排序的显示)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">表单显示排序</label>
|
||||
<div class="col-lg-10 boards" id="attribute_group_sort">
|
||||
{volist name="fields" id="field"}
|
||||
<div class="board panel panel-info">
|
||||
<div class="panel-heading">{$field_group[$key]}</div>
|
||||
<div class="panel-body">
|
||||
<div class="board-list" data-group="{$key}">
|
||||
{foreach name="field" item="item" key="k"}
|
||||
<div class="board-item">
|
||||
<span data="{$item['id']}">{$item['title']} [{$item['name']}]</span>
|
||||
<input type="hidden" name="attribute_sort[{$key}][]" value="{$item['id']}"/>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/volist}
|
||||
<span class="help-block">(直接拖动进行排序)</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">列表定义</label>
|
||||
<div class="col-lg-6 col-sm-10">
|
||||
<textarea name="list_grid" class="form-control">{$info['list_grid']}</textarea>
|
||||
<span class="help-block">(默认列表模板的展示规则)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">默认搜索字段</label>
|
||||
<div class="col-lg-6 col-sm-10">
|
||||
<input type="text" class="form-control" name="search_key" value="{$info['search_key']}">
|
||||
<span class="help-block">(默认列表模板的默认搜索项)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">高级搜索字段</label>
|
||||
<div class="col-lg-6 col-sm-10">
|
||||
<input type="text" class="form-control" name="search_list" value="{$info['search_list']}">
|
||||
<span class="help-block">(默认列表模板的高级搜索项)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">列表模板</label>
|
||||
<div class="col-lg-6 col-sm-10">
|
||||
<input type="text" class="form-control" name="template_list" value="{$info['template_list']|default=''}">
|
||||
<span class="help-block">(自定义的列表模板,放在application\admin\view\content下,不写则使用默认模板)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">新增模板</label>
|
||||
<div class="col-lg-6 col-sm-10">
|
||||
<input type="text" class="form-control" name="template_add" value="{$info['template_add']|default=''}">
|
||||
<span class="help-block">(自定义的新增模板,放在application\admin\view\content下,不写则使用默认模板)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">编辑模板</label>
|
||||
<div class="col-lg-6 col-sm-10">
|
||||
<input type="text" class="form-control" name="template_edit" value="{$info['template_edit']|default=''}">
|
||||
<span class="help-block">(自定义的编辑模板,放在application\admin\view\content下,不写则使用默认模板)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">列表数据大小</label>
|
||||
<div class="col-lg-6 col-sm-10">
|
||||
<input type="text" class="form-control" name="list_row" value="{$info['list_row']|default=''}">
|
||||
<span class="help-block">(默认列表模板的分页属性)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-lg-offset-2 col-lg-10">
|
||||
<input type="hidden" name="id" value="{$info['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>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script type="text/javascript" src="__PUBLIC__/js/droppable.js"></script>
|
||||
<script type="text/javascript" src="__PUBLIC__/plugs/board/board.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$('.form-group #attribute_sort').boards();
|
||||
$('.form-group #attribute_group_sort').boards({
|
||||
drop: function(e){
|
||||
var group = e.target.closest('.board').find('.board-list').attr('data-group');
|
||||
e.element.find('input').attr('name','attribute_sort[' + group + '][]')
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
{/block}
|
||||
|
||||
89
view/admin/model/index.html
Normal file
89
view/admin/model/index.html
Normal file
@@ -0,0 +1,89 @@
|
||||
{extend name="admin/base"/}
|
||||
|
||||
{block name="body"}
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title|default='新功能'}</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-success" href="{:url('Model/add')}">新 增</a>
|
||||
<button class="btn ajax-post" target-form="ids" url="{:url('Model/status',array('status'=>0))}">禁 用</button>
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<div class="table-responsive clearfix">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="row-selected row-selected">
|
||||
<input class="check-all" type="checkbox"/>
|
||||
</th>
|
||||
<th class="">编号</th>
|
||||
<th class="">标识</th>
|
||||
<th class="">名称</th>
|
||||
<th class="">创建时间</th>
|
||||
<th class="">状态</th>
|
||||
<th class="">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{notempty name="list"}
|
||||
{volist name="list" id="item"}
|
||||
<tr>
|
||||
<td>
|
||||
<input class="ids" type="checkbox" name="ids[]" value="{$item['id']}" />
|
||||
</td>
|
||||
<td>{$item['id']}</td>
|
||||
<td><i class="fa fa-{$item['icon']}"></i> {$item['name']}</td>
|
||||
<td>
|
||||
<a data-id="{$item.id}" href="{:url('model/edit?id='.$item['id'])}">{$item.title}</a>
|
||||
</td>
|
||||
<td>
|
||||
<span>{$item.create_time|time_format}</span>
|
||||
</td>
|
||||
<td>
|
||||
{if $item['status']}
|
||||
<span class="label label-primary">{$item['status_text']}</span>
|
||||
{else/}
|
||||
<span class="label label-danger">{$item['status_text']}</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{:url('admin/attribute/index?model_id='.$item['id'])}">字段</a>
|
||||
<a href="{:url('model/status?id='.$item['id'].'&status='.abs(1-$item['status']))}" class="ajax-get">{$item['status']|show_status_op}</a>
|
||||
<a href="{:url('model/edit?id='.$item['id'])}">编辑</a>
|
||||
<a href="{:url('model/del?id='.$item['id'])}" class="confirm ajax-get">删除</a>
|
||||
<a href="{:url('admin/content/index?model_id='.$item['id'])}">数据</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
{else/}
|
||||
<td colspan="7" class="text-center">aOh! 暂时还没有创建模型!</td>
|
||||
{/notempty}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
{$page|raw}
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#search").click(function(){
|
||||
var url = $(this).attr('url');
|
||||
var status = $('select[name=status]').val();
|
||||
var search = $('input[name=search]').val();
|
||||
if(status != ''){
|
||||
url += '/status/' + status;
|
||||
}
|
||||
if(search != ''){
|
||||
url += '/search/' + search;
|
||||
}
|
||||
window.location.href = url;
|
||||
});
|
||||
})
|
||||
</script>
|
||||
{/block}
|
||||
80
view/admin/seo/index.html
Normal file
80
view/admin/seo/index.html
Normal file
@@ -0,0 +1,80 @@
|
||||
{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="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title|default='新功能'}</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<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="main-box-body clearfix">
|
||||
<div class="table-responsive clearfix">
|
||||
<table class="table 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>SEO标题</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']}</td>
|
||||
<td>{$item['title']}</td>
|
||||
<td>{$item['rule_name']}</td>
|
||||
<td>{$item['sort']}</td>
|
||||
<td>{$item['seo_title']}</td>
|
||||
<td>
|
||||
<a href="{:url('edit?id='.$item['id'])}">编辑</a>
|
||||
<a href="{:url('del?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="__PUBLIC__/js/bootstrap-editable.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
//点击排序
|
||||
$('.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(',');
|
||||
}
|
||||
|
||||
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}
|
||||
49
view/admin/seo/rewrite.html
Normal file
49
view/admin/seo/rewrite.html
Normal file
@@ -0,0 +1,49 @@
|
||||
{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="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title|default='新功能'}</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-primary" href="{:url('addrewrite')}">新 增</a>
|
||||
<button class="btn btn-danger ajax-post confirm" url="{:url('delrewrite')}" target-form="ids">删 除</button>
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<div class="table-responsive clearfix">
|
||||
<table class="table 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>
|
||||
</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']}</td>
|
||||
<td>{$item['rule']}</td>
|
||||
<td>{$item['url']}</td>
|
||||
<td>
|
||||
<a href="{:url('editrewrite?id='.$item['id'])}">编辑</a>
|
||||
<a href="{:url('delrewrite?id='.$item['id'])}" class="confirm ajax-get">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name="script"}
|
||||
{/block}
|
||||
51
view/admin/setting.html
Normal file
51
view/admin/setting.html
Normal file
@@ -0,0 +1,51 @@
|
||||
<div id="config-tool" class="closed hidden-sm">
|
||||
<a id="config-tool-cog">
|
||||
<i class="fa fa-cog"></i>
|
||||
</a>
|
||||
<div id="config-tool-options">
|
||||
<h4>布局选项</h4>
|
||||
<ul>
|
||||
<li>
|
||||
<div class="checkbox-nice">
|
||||
<input type="checkbox" id="config-boxed-layout"/>
|
||||
<label for="config-boxed-layout">内嵌布局</label>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<div class="checkbox-nice">
|
||||
<input type="checkbox" id="config-sidebar-samll"/>
|
||||
<label for="config-sidebar-samll">小菜单</label>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<br/>
|
||||
<h4>皮肤颜色</h4>
|
||||
<ul id="skin-colors" class="clearfix">
|
||||
<li>
|
||||
<a class="skin-changer" data-skin="" data-toggle="tooltip" title="默认" style="background-color: #34495e;"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="skin-changer" data-skin="theme-white" data-toggle="tooltip" title="白/绿" style="background-color: #2ecc71;"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="skin-changer blue-gradient" data-skin="theme-blue-gradient" data-toggle="tooltip" title="渐变"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="skin-changer" data-skin="theme-turquoise" data-toggle="tooltip" title="绿色海洋" style="background-color: #1abc9c;"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="skin-changer" data-skin="theme-amethyst" data-toggle="tooltip" title="紫水晶" style="background-color: #9b59b6;"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="skin-changer" data-skin="theme-blue" data-toggle="tooltip" title="蓝色" style="background-color: #2980b9;"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="skin-changer" data-skin="theme-red" data-toggle="tooltip" title="红色" style="background-color: #e74c3c;"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="skin-changer" data-skin="theme-whbl" data-toggle="tooltip" title="白/蓝" style="background-color: #3498db;"></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<script src="__js__/skin-changer.js"></script>
|
||||
47
view/admin/user/auth.html
Normal file
47
view/admin/user/auth.html
Normal file
@@ -0,0 +1,47 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="body"}
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title|default='新功能'}</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<form method="post" class="form form-horizontal">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-lg-2 text-right">模块</th>
|
||||
<th>分组</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="list" id="group"}
|
||||
<tr>
|
||||
<td class="info col-lg-2 text-right">{:config('USER_GROUP_TYPE')[$key]}</td>
|
||||
<td class="col-lg-10 text-left">
|
||||
{volist name="group" id="item"}
|
||||
<div class="radio radio-nice radio-inline">
|
||||
<input type="radio" name="{$item['module']}" value="{$item['id']}" id="{$item['module']}-{$item['id']}" {if condition="in_array($item['id'],$auth_list)"}checked{/if} />
|
||||
<label for="{$item['module']}-{$item['id']}">{$item['title']}</label>
|
||||
</div>
|
||||
{/volist}
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="form-group">
|
||||
<div class="col-lg-offset-2 col-lg-10">
|
||||
<input type="hidden" name="uid" value="{$uid}">
|
||||
<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>
|
||||
{/block}
|
||||
44
view/admin/user/editpwd.html
Normal file
44
view/admin/user/editpwd.html
Normal file
@@ -0,0 +1,44 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="body"}
|
||||
<div class="main-box no-header clearfix">
|
||||
|
||||
<!-- 标题栏 -->
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>修改昵称</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="main-box-body clearfix">
|
||||
<!-- 修改密码表单 -->
|
||||
<form method="post" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">原密码:</label>
|
||||
<div class="col-lg-6 col-sm-10">
|
||||
<input type="password" name="oldpassword" class="form-control " autocomplete="off" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">新密码:</label>
|
||||
<div class="col-lg-6 col-sm-10">
|
||||
<input type="password" name="password" class="form-control " autocomplete="off" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">确认密码:</label>
|
||||
<div class="col-lg-6 col-sm-10">
|
||||
<input type="password" name="repassword" class="form-control " autocomplete="off" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-lg-offset-2 col-lg-10">
|
||||
<button type="submit" class="btn btn-primary submit-btn ajax-post" target-form="form-horizontal">确 认</button>
|
||||
<button class="btn btn-default btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
101
view/admin/user/index.html
Normal file
101
view/admin/user/index.html
Normal file
@@ -0,0 +1,101 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="body"}
|
||||
<div class="main-box no-header clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{$meta_title|default='新功能'}</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a href="{:url('add')}" class="btn btn-primary pull-right"> <i class="fa fa-plus-circle fa-lg"></i> 新增用户</a>
|
||||
</div>
|
||||
</header>
|
||||
<div class="main-box-body clearfix">
|
||||
<div class="navbar navbar-default">
|
||||
<form action="" class="navbar-form form-inline" method="get">
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-order-id">用户名</label>
|
||||
<div class="input-group">
|
||||
<input type="text" name="username" value="{$param['username']|default=''}" placeholder="用户名" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="input-order-id">昵称</label>
|
||||
<div class="input-group">
|
||||
<input type="text" name="nickname" value="{$param['nickname']|default=''}" placeholder="昵称" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-primary" type="submit"><i class="fa fa-search"></i> 筛选</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table user-list table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<span>用户</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>Email</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>手机号码</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>授权分组</span>
|
||||
</th>
|
||||
<th>
|
||||
<span>创建时间</span>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span>状态</span>
|
||||
</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="list" id="item"}
|
||||
<tr>
|
||||
<td>
|
||||
{if isset($item['avatar_url']) && $item['avatar_url']}
|
||||
<img src="{$item['avatar_url']}" alt="{$item['nickname']}"/>
|
||||
{else/}
|
||||
<img src="{:avatar($item['uid'])}" alt="{$item['nickname']}"/>
|
||||
{/if}
|
||||
<a href="#" class="user-link">{$item['nickname']}</a>
|
||||
<span class="user-subhead">{$item['username']}</span>
|
||||
</td>
|
||||
<td>
|
||||
<span >{$item['email']}</span>
|
||||
</td>
|
||||
<td>
|
||||
<span >{$item['mobile']}</span>
|
||||
</td>
|
||||
<td>{$item['group_list']|implode=',',###}</td>
|
||||
<td>{$item['reg_time']|date='Y-m-d',###}</td>
|
||||
<td class="text-center">
|
||||
{if condition="$item['status']"}
|
||||
<span class="label label-primary">启用</span>
|
||||
{else/}
|
||||
<span class="label label-danger">禁用</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{:url('User/edit',array('id'=>$item['uid']))}" class="table-link" title="">
|
||||
编辑
|
||||
</a>
|
||||
<a href="{:url('User/auth',array('id'=>$item['uid']))}" class="table-link">
|
||||
授权
|
||||
</a>
|
||||
<a href="{:url('User/del',array('id'=>$item['uid']))}" class="table-link confirm ajax-get">
|
||||
删除
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
{$page|raw}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
508
view/error.tpl
Normal file
508
view/error.tpl
Normal file
@@ -0,0 +1,508 @@
|
||||
<?php
|
||||
if(!function_exists('parse_padding')){
|
||||
function parse_padding($source)
|
||||
{
|
||||
$length = strlen(strval(count($source['source']) + $source['first']));
|
||||
return 40 + ($length - 1) * 8;
|
||||
}
|
||||
}
|
||||
|
||||
if(!function_exists('parse_class')){
|
||||
function parse_class($name)
|
||||
{
|
||||
$names = explode('\\', $name);
|
||||
return '<abbr title="'.$name.'">'.end($names).'</abbr>';
|
||||
}
|
||||
}
|
||||
|
||||
if(!function_exists('parse_file')){
|
||||
function parse_file($file, $line)
|
||||
{
|
||||
return '<a class="toggle" title="'."{$file} line {$line}".'">'.basename($file)." line {$line}".'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
if(!function_exists('parse_args')){
|
||||
function parse_args($args)
|
||||
{
|
||||
$result = [];
|
||||
|
||||
foreach ($args as $key => $item) {
|
||||
switch (true) {
|
||||
case is_object($item):
|
||||
$value = sprintf('<em>object</em>(%s)', parse_class(get_class($item)));
|
||||
break;
|
||||
case is_array($item):
|
||||
if(count($item) > 3){
|
||||
$value = sprintf('[%s, ...]', parse_args(array_slice($item, 0, 3)));
|
||||
} else {
|
||||
$value = sprintf('[%s]', parse_args($item));
|
||||
}
|
||||
break;
|
||||
case is_string($item):
|
||||
if(strlen($item) > 20){
|
||||
$value = sprintf(
|
||||
'\'<a class="toggle" title="%s">%s...</a>\'',
|
||||
htmlentities($item),
|
||||
htmlentities(substr($item, 0, 20))
|
||||
);
|
||||
} else {
|
||||
$value = sprintf("'%s'", htmlentities($item));
|
||||
}
|
||||
break;
|
||||
case is_int($item):
|
||||
case is_float($item):
|
||||
$value = $item;
|
||||
break;
|
||||
case is_null($item):
|
||||
$value = '<em>null</em>';
|
||||
break;
|
||||
case is_bool($item):
|
||||
$value = '<em>' . ($item ? 'true' : 'false') . '</em>';
|
||||
break;
|
||||
case is_resource($item):
|
||||
$value = '<em>resource</em>';
|
||||
break;
|
||||
default:
|
||||
$value = htmlentities(str_replace("\n", '', var_export(strval($item), true)));
|
||||
break;
|
||||
}
|
||||
|
||||
$result[] = is_int($key) ? $value : "'{$key}' => {$value}";
|
||||
}
|
||||
|
||||
return implode(', ', $result);
|
||||
}
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>系统发生错误</title>
|
||||
<meta name="robots" content="noindex,nofollow" />
|
||||
<style>
|
||||
/* Base */
|
||||
body {
|
||||
color: #333;
|
||||
font: 16px Verdana, "Helvetica Neue", helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||
margin: 0;
|
||||
padding: 0 20px 20px;
|
||||
}
|
||||
h1{
|
||||
margin: 10px 0 0;
|
||||
font-size: 28px;
|
||||
font-weight: 500;
|
||||
line-height: 32px;
|
||||
}
|
||||
h2{
|
||||
color: #4288ce;
|
||||
font-weight: 400;
|
||||
padding: 6px 0;
|
||||
margin: 6px 0 0;
|
||||
font-size: 18px;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
h3{
|
||||
margin: 12px;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
abbr{
|
||||
cursor: help;
|
||||
text-decoration: underline;
|
||||
text-decoration-style: dotted;
|
||||
}
|
||||
a{
|
||||
color: #868686;
|
||||
cursor: pointer;
|
||||
}
|
||||
a:hover{
|
||||
text-decoration: underline;
|
||||
}
|
||||
.line-error{
|
||||
background: #f8cbcb;
|
||||
}
|
||||
|
||||
.echo table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.echo pre {
|
||||
padding: 16px;
|
||||
overflow: auto;
|
||||
font-size: 85%;
|
||||
line-height: 1.45;
|
||||
background-color: #f7f7f7;
|
||||
border: 0;
|
||||
border-radius: 3px;
|
||||
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
||||
}
|
||||
|
||||
.echo pre > pre {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Exception Info */
|
||||
.exception {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.exception .message{
|
||||
padding: 12px;
|
||||
border: 1px solid #ddd;
|
||||
border-bottom: 0 none;
|
||||
line-height: 18px;
|
||||
font-size:16px;
|
||||
border-top-left-radius: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
font-family: Consolas,"Liberation Mono",Courier,Verdana,"微软雅黑";
|
||||
}
|
||||
|
||||
.exception .code{
|
||||
float: left;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
margin-right: 12px;
|
||||
padding: 16px;
|
||||
border-radius: 4px;
|
||||
background: #999;
|
||||
}
|
||||
.exception .source-code{
|
||||
padding: 6px;
|
||||
border: 1px solid #ddd;
|
||||
|
||||
background: #f9f9f9;
|
||||
overflow-x: auto;
|
||||
|
||||
}
|
||||
.exception .source-code pre{
|
||||
margin: 0;
|
||||
}
|
||||
.exception .source-code pre ol{
|
||||
margin: 0;
|
||||
color: #4288ce;
|
||||
display: inline-block;
|
||||
min-width: 100%;
|
||||
box-sizing: border-box;
|
||||
font-size:14px;
|
||||
font-family: "Century Gothic",Consolas,"Liberation Mono",Courier,Verdana;
|
||||
padding-left: <?php echo (isset($source) && !empty($source)) ? parse_padding($source) : 40; ?>px;
|
||||
}
|
||||
.exception .source-code pre li{
|
||||
border-left: 1px solid #ddd;
|
||||
height: 18px;
|
||||
line-height: 18px;
|
||||
}
|
||||
.exception .source-code pre code{
|
||||
color: #333;
|
||||
height: 100%;
|
||||
display: inline-block;
|
||||
border-left: 1px solid #fff;
|
||||
font-size:14px;
|
||||
font-family: Consolas,"Liberation Mono",Courier,Verdana,"微软雅黑";
|
||||
}
|
||||
.exception .trace{
|
||||
padding: 6px;
|
||||
border: 1px solid #ddd;
|
||||
border-top: 0 none;
|
||||
line-height: 16px;
|
||||
font-size:14px;
|
||||
font-family: Consolas,"Liberation Mono",Courier,Verdana,"微软雅黑";
|
||||
}
|
||||
.exception .trace ol{
|
||||
margin: 12px;
|
||||
}
|
||||
.exception .trace ol li{
|
||||
padding: 2px 4px;
|
||||
}
|
||||
.exception div:last-child{
|
||||
border-bottom-left-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
|
||||
/* Exception Variables */
|
||||
.exception-var table{
|
||||
width: 100%;
|
||||
margin: 12px 0;
|
||||
box-sizing: border-box;
|
||||
table-layout:fixed;
|
||||
word-wrap:break-word;
|
||||
}
|
||||
.exception-var table caption{
|
||||
text-align: left;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
padding: 6px 0;
|
||||
}
|
||||
.exception-var table caption small{
|
||||
font-weight: 300;
|
||||
display: inline-block;
|
||||
margin-left: 10px;
|
||||
color: #ccc;
|
||||
}
|
||||
.exception-var table tbody{
|
||||
font-size: 13px;
|
||||
font-family: Consolas,"Liberation Mono",Courier,"微软雅黑";
|
||||
}
|
||||
.exception-var table td{
|
||||
padding: 0 6px;
|
||||
vertical-align: top;
|
||||
word-break: break-all;
|
||||
}
|
||||
.exception-var table td:first-child{
|
||||
width: 28%;
|
||||
font-weight: bold;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.exception-var table td pre{
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Copyright Info */
|
||||
.copyright{
|
||||
margin-top: 24px;
|
||||
padding: 12px 0;
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
|
||||
/* SPAN elements with the classes below are added by prettyprint. */
|
||||
pre.prettyprint .pln { color: #000 } /* plain text */
|
||||
pre.prettyprint .str { color: #080 } /* string content */
|
||||
pre.prettyprint .kwd { color: #008 } /* a keyword */
|
||||
pre.prettyprint .com { color: #800 } /* a comment */
|
||||
pre.prettyprint .typ { color: #606 } /* a type name */
|
||||
pre.prettyprint .lit { color: #066 } /* a literal value */
|
||||
/* punctuation, lisp open bracket, lisp close bracket */
|
||||
pre.prettyprint .pun, pre.prettyprint .opn, pre.prettyprint .clo { color: #660 }
|
||||
pre.prettyprint .tag { color: #008 } /* a markup tag name */
|
||||
pre.prettyprint .atn { color: #606 } /* a markup attribute name */
|
||||
pre.prettyprint .atv { color: #080 } /* a markup attribute value */
|
||||
pre.prettyprint .dec, pre.prettyprint .var { color: #606 } /* a declaration; a variable name */
|
||||
pre.prettyprint .fun { color: red } /* a function name */
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="echo">
|
||||
<?php echo $echo;?>
|
||||
</div>
|
||||
<?php if(\think\facade\App::isDebug()) { ?>
|
||||
<div class="exception">
|
||||
<div class="message">
|
||||
|
||||
<div class="info">
|
||||
<div>
|
||||
<h2>[<?php echo $code; ?>] <?php echo sprintf('%s in %s', parse_class($name), parse_file($file, $line)); ?></h2>
|
||||
</div>
|
||||
<div><h1><?php echo nl2br(htmlentities($message)); ?></h1></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php if(!empty($source)){?>
|
||||
<div class="source-code">
|
||||
<pre class="prettyprint lang-php"><ol start="<?php echo $source['first']; ?>"><?php foreach ((array) $source['source'] as $key => $value) { ?><li class="line-<?php echo $key + $source['first']; ?>"><code><?php echo htmlentities($value); ?></code></li><?php } ?></ol></pre>
|
||||
</div>
|
||||
<?php }?>
|
||||
<div class="trace">
|
||||
<h2>Call Stack</h2>
|
||||
<ol>
|
||||
<li><?php echo sprintf('in %s', parse_file($file, $line)); ?></li>
|
||||
<?php foreach ((array) $trace as $value) { ?>
|
||||
<li>
|
||||
<?php
|
||||
// Show Function
|
||||
if($value['function']){
|
||||
echo sprintf(
|
||||
'at %s%s%s(%s)',
|
||||
isset($value['class']) ? parse_class($value['class']) : '',
|
||||
isset($value['type']) ? $value['type'] : '',
|
||||
$value['function'],
|
||||
isset($value['args'])?parse_args($value['args']):''
|
||||
);
|
||||
}
|
||||
|
||||
// Show line
|
||||
if (isset($value['file']) && isset($value['line'])) {
|
||||
echo sprintf(' in %s', parse_file($value['file'], $value['line']));
|
||||
}
|
||||
?>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
<?php } else { ?>
|
||||
<div class="exception">
|
||||
|
||||
<div class="info"><h1><?php echo htmlentities($message); ?></h1></div>
|
||||
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if(!empty($datas)){ ?>
|
||||
<div class="exception-var">
|
||||
<h2>Exception Datas</h2>
|
||||
<?php foreach ((array) $datas as $label => $value) { ?>
|
||||
<table>
|
||||
<?php if(empty($value)){ ?>
|
||||
<caption><?php echo $label; ?><small>empty</small></caption>
|
||||
<?php } else { ?>
|
||||
<caption><?php echo $label; ?></caption>
|
||||
<tbody>
|
||||
<?php foreach ((array) $value as $key => $val) { ?>
|
||||
<tr>
|
||||
<td><?php echo htmlentities($key); ?></td>
|
||||
<td>
|
||||
<?php
|
||||
if(is_array($val) || is_object($val)){
|
||||
echo htmlentities(json_encode($val, JSON_PRETTY_PRINT));
|
||||
} else if(is_bool($val)) {
|
||||
echo $val ? 'true' : 'false';
|
||||
} else if(is_scalar($val)) {
|
||||
echo htmlentities($val);
|
||||
} else {
|
||||
echo 'Resource';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
<?php } ?>
|
||||
</table>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if(!empty($tables)){ ?>
|
||||
<div class="exception-var">
|
||||
<h2>Environment Variables</h2>
|
||||
<?php foreach ((array) $tables as $label => $value) { ?>
|
||||
<table>
|
||||
<?php if(empty($value)){ ?>
|
||||
<caption><?php echo $label; ?><small>empty</small></caption>
|
||||
<?php } else { ?>
|
||||
<caption><?php echo $label; ?></caption>
|
||||
<tbody>
|
||||
<?php foreach ((array) $value as $key => $val) { ?>
|
||||
<tr>
|
||||
<td><?php echo htmlentities($key); ?></td>
|
||||
<td>
|
||||
<?php
|
||||
if(is_array($val) || is_object($val)){
|
||||
echo htmlentities(json_encode($val, JSON_PRETTY_PRINT));
|
||||
} else if(is_bool($val)) {
|
||||
echo $val ? 'true' : 'false';
|
||||
} else if(is_scalar($val)) {
|
||||
echo htmlentities($val);
|
||||
} else {
|
||||
echo 'Resource';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
<?php } ?>
|
||||
</table>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="copyright">
|
||||
<a title="官方网站" href="http://www.thinkphp.cn">ThinkPHP</a>
|
||||
<span>V<?php echo \think\facade\App::version(); ?></span>
|
||||
<span>{ 十年磨一剑-为API开发设计的高性能框架 }</span>
|
||||
<span>- <a title="官方手册" href="https://www.kancloud.cn/special/thinkphp5_quickstart">官方手册系列</a></span>
|
||||
</div>
|
||||
<?php if(\think\facade\App::isDebug()) { ?>
|
||||
<script>
|
||||
var LINE = <?php echo $line; ?>;
|
||||
|
||||
function $(selector, node){
|
||||
var elements;
|
||||
|
||||
node = node || document;
|
||||
if(document.querySelectorAll){
|
||||
elements = node.querySelectorAll(selector);
|
||||
} else {
|
||||
switch(selector.substr(0, 1)){
|
||||
case '#':
|
||||
elements = [node.getElementById(selector.substr(1))];
|
||||
break;
|
||||
case '.':
|
||||
if(document.getElementsByClassName){
|
||||
elements = node.getElementsByClassName(selector.substr(1));
|
||||
} else {
|
||||
elements = get_elements_by_class(selector.substr(1), node);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
elements = node.getElementsByTagName();
|
||||
}
|
||||
}
|
||||
return elements;
|
||||
|
||||
function get_elements_by_class(search_class, node, tag) {
|
||||
var elements = [], eles,
|
||||
pattern = new RegExp('(^|\\s)' + search_class + '(\\s|$)');
|
||||
|
||||
node = node || document;
|
||||
tag = tag || '*';
|
||||
|
||||
eles = node.getElementsByTagName(tag);
|
||||
for(var i = 0; i < eles.length; i++) {
|
||||
if(pattern.test(eles[i].className)) {
|
||||
elements.push(eles[i])
|
||||
}
|
||||
}
|
||||
|
||||
return elements;
|
||||
}
|
||||
}
|
||||
|
||||
$.getScript = function(src, func){
|
||||
var script = document.createElement('script');
|
||||
|
||||
script.async = 'async';
|
||||
script.src = src;
|
||||
script.onload = func || function(){};
|
||||
|
||||
$('head')[0].appendChild(script);
|
||||
}
|
||||
|
||||
;(function(){
|
||||
var files = $('.toggle');
|
||||
var ol = $('ol', $('.prettyprint')[0]);
|
||||
var li = $('li', ol[0]);
|
||||
|
||||
// 短路径和长路径变换
|
||||
for(var i = 0; i < files.length; i++){
|
||||
files[i].ondblclick = function(){
|
||||
var title = this.title;
|
||||
|
||||
this.title = this.innerHTML;
|
||||
this.innerHTML = title;
|
||||
}
|
||||
}
|
||||
|
||||
// 设置出错行
|
||||
var err_line = $('.line-' + LINE, ol[0])[0];
|
||||
err_line.className = err_line.className + ' line-error';
|
||||
|
||||
$.getScript('//cdn.bootcss.com/prettify/r298/prettify.min.js', function(){
|
||||
prettyPrint();
|
||||
|
||||
// 解决Firefox浏览器一个很诡异的问题
|
||||
// 当代码高亮后,ol的行号莫名其妙的错位
|
||||
// 但是只要刷新li里面的html重新渲染就没有问题了
|
||||
if(window.navigator.userAgent.indexOf('Firefox') >= 0){
|
||||
ol[0].innerHTML = ol[0].innerHTML;
|
||||
}
|
||||
});
|
||||
|
||||
})();
|
||||
</script>
|
||||
<?php } ?>
|
||||
</body>
|
||||
</html>
|
||||
37
view/exception.html
Normal file
37
view/exception.html
Normal file
@@ -0,0 +1,37 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>系统发生错误</title>
|
||||
<!-- Fonts -->
|
||||
<link href="https://fonts.googleapis.com/css?family=Raleway:100,600" rel="stylesheet" type="text/css">
|
||||
<!-- Styles -->
|
||||
<style>
|
||||
html, body {background-color: #fff; color: #636b6f; font-family: 'Raleway', sans-serif; font-weight: 100; height: 100vh; margin: 0;}
|
||||
.full-height {height: 100vh;}
|
||||
.flex-center {align-items: center;display: flex;justify-content: center;}
|
||||
.position-ref {position: relative;}
|
||||
.top-right {position: absolute;right: 10px;top: 18px;}
|
||||
.content {text-align: center;}
|
||||
.title {font-size: 84px;}
|
||||
.links > a {color: #636b6f;padding: 0 25px; font-size: 12px;font-weight: 600;letter-spacing: .1rem;text-decoration: none;text-transform: uppercase;}
|
||||
.m-b-md {margin-bottom: 30px;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="flex-center position-ref full-height">
|
||||
|
||||
<div class="content">
|
||||
<div class="title m-b-md">
|
||||
系统错误
|
||||
</div>
|
||||
|
||||
<div class="links">
|
||||
<?php echo nl2br(htmlentities($message)); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
40
view/index/index.html
Normal file
40
view/index/index.html
Normal file
@@ -0,0 +1,40 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>SentCMS网站管理系统</title>
|
||||
<!-- Fonts -->
|
||||
<link href="https://fonts.googleapis.com/css?family=Raleway:100,600" rel="stylesheet" type="text/css">
|
||||
<!-- Styles -->
|
||||
<style>
|
||||
html, body {background-color: #fff; color: #636b6f; font-family: 'Raleway', sans-serif; font-weight: 100; height: 100vh; margin: 0;}
|
||||
.full-height {height: 100vh;}
|
||||
.flex-center {align-items: center;display: flex;justify-content: center;}
|
||||
.position-ref {position: relative;}
|
||||
.top-right {position: absolute;right: 10px;top: 18px;}
|
||||
.content {text-align: center;}
|
||||
.title {font-size: 84px;}
|
||||
.links > a {color: #636b6f;padding: 0 25px; font-size: 12px;font-weight: 600;letter-spacing: .1rem;text-decoration: none;text-transform: uppercase;}
|
||||
.m-b-md {margin-bottom: 30px;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="flex-center position-ref full-height">
|
||||
|
||||
<div class="content">
|
||||
<div class="title m-b-md">
|
||||
SentCMS网站管理系统
|
||||
</div>
|
||||
|
||||
<div class="links">
|
||||
<a href="https://www.kancloud.cn/tensent/sentcms3/169624" target="_blank">文档</a>
|
||||
<a href="https://www.tensent.cn" target="_blank">资讯</a>
|
||||
<a href="https://gitee.com/sentcms/sentcms" target="_blank">Gitee</a>
|
||||
<a href="{:url('admin.index/index')}" target="_blank">后台管理</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
39
view/index/miss.html
Normal file
39
view/index/miss.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>SentCMS网站管理系统</title>
|
||||
<!-- Fonts -->
|
||||
<link href="https://fonts.googleapis.com/css?family=Raleway:100,600" rel="stylesheet" type="text/css">
|
||||
<!-- Styles -->
|
||||
<style>
|
||||
html, body {background-color: #fff; color: #636b6f; font-family: 'Raleway', sans-serif; font-weight: 100; height: 100vh; margin: 0;}
|
||||
.full-height {height: 100vh;}
|
||||
.flex-center {align-items: center;display: flex;justify-content: center;}
|
||||
.position-ref {position: relative;}
|
||||
.top-right {position: absolute;right: 10px;top: 18px;}
|
||||
.content {text-align: center;}
|
||||
.title {font-size: 84px;}
|
||||
.links > a {color: #636b6f;padding: 0 25px; font-size: 12px;font-weight: 600;letter-spacing: .1rem;text-decoration: none;text-transform: uppercase;}
|
||||
.m-b-md {margin-bottom: 30px;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="flex-center position-ref full-height">
|
||||
|
||||
<div class="content">
|
||||
<div class="title m-b-md">
|
||||
404 Not Found!
|
||||
</div>
|
||||
|
||||
<div class="links">
|
||||
<a href="https://www.kancloud.cn/tensent/sentcms3/169624" target="_blank">文档</a>
|
||||
<a href="https://www.tensent.cn" target="_blank">资讯</a>
|
||||
<a href="https://gitee.com/sentcms/sentcms" target="_blank">Gitee</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user