tp6更新到最新版本
目录结构调整
This commit is contained in:
@@ -17,9 +17,9 @@ use think\facade\Cache;
|
||||
class Admin extends BaseController {
|
||||
|
||||
protected $middleware = [
|
||||
'\app\middleware\Validate',
|
||||
'\app\middleware\AdminAuth' => ['except' => ['login']],
|
||||
'\app\middleware\Admin'
|
||||
'\app\http\middleware\Validate',
|
||||
'\app\http\middleware\AdminAuth' => ['except' => ['login']],
|
||||
'\app\http\middleware\Admin'
|
||||
];
|
||||
|
||||
protected $data = ['data' => [], 'code' => 0, 'msg' => ''];
|
||||
@@ -33,17 +33,17 @@ class Admin extends BaseController {
|
||||
$this->data['config'] = $config;
|
||||
}
|
||||
|
||||
protected function success($msg, $url){
|
||||
protected function success($msg, $url = ''){
|
||||
$this->data['code'] = 0;
|
||||
$this->data['msg'] = $msg;
|
||||
$this->data['url'] = $url->__toString();
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
protected function error($msg, $url){
|
||||
protected function error($msg, $url = ''){
|
||||
$this->data['code'] = 1;
|
||||
$this->data['msg'] = $msg;
|
||||
$this->data['url'] = $url->__toString();
|
||||
$this->data['url'] = $url ? $url->__toString() : '';
|
||||
return $this->data;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ use app\BaseController;
|
||||
|
||||
class Index extends BaseController {
|
||||
|
||||
protected $middleware = ['\app\middleware\Front'];
|
||||
protected $middleware = ['\app\http\middleware\Front'];
|
||||
|
||||
/**
|
||||
* @title 网站首页
|
||||
|
||||
@@ -16,6 +16,17 @@ class Group extends Admin{
|
||||
* @title 系统首页
|
||||
*/
|
||||
public function index(){
|
||||
|
||||
if ($this->request->isAjax()) {
|
||||
# code...
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 权限列表
|
||||
*/
|
||||
public function access(){
|
||||
if ($this->request->isAjax()) {
|
||||
# code...
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -69,6 +69,7 @@ class Index extends Admin{
|
||||
public function logout(){
|
||||
Session::set('user', null);
|
||||
$this->data['code'] = 0;
|
||||
$this->data['msg'] = "成功退出!";
|
||||
return $this->data;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,8 +19,9 @@ class Menu extends Admin{
|
||||
public function index(){
|
||||
if($this->request->isAjax()){
|
||||
$menu = new MenuModel();
|
||||
$map = array();
|
||||
|
||||
$res = $menu->select();
|
||||
$res = $menu->where($map)->order('sort asc, id asc')->select();
|
||||
|
||||
$this->data['data'] = $res;
|
||||
return $this->data;
|
||||
@@ -31,14 +32,28 @@ class Menu extends Admin{
|
||||
* @title 编辑菜单
|
||||
*/
|
||||
public function edit(){
|
||||
$menu = new MenuModel();
|
||||
if($this->request->isAjax()){
|
||||
$menu = new MenuModel();
|
||||
$data = $this->request->post();
|
||||
|
||||
$res = $menu->select();
|
||||
|
||||
$this->data['data'] = $res;
|
||||
$result = $menu->where('id', $data['id'])->save($data);
|
||||
if (false !== $result) {
|
||||
$this->data['code'] = 0;
|
||||
$this->data['msg'] = '更新成功!';
|
||||
}else{
|
||||
$this->data['code'] = 1;
|
||||
$this->data['msg'] = '更新失败!';
|
||||
}
|
||||
return $this->data;
|
||||
}else{
|
||||
$id = $this->request->param('id', 0);
|
||||
|
||||
if (!$id) {
|
||||
return $this->error('非法操作!');
|
||||
}
|
||||
$info = $menu->where('id', $id)->find();
|
||||
|
||||
$this->data['data'] = array('info'=>$info);
|
||||
return $this->data;
|
||||
}
|
||||
}
|
||||
@@ -48,11 +63,6 @@ class Menu extends Admin{
|
||||
*/
|
||||
public function add(){
|
||||
if($this->request->isAjax()){
|
||||
$menu = new MenuModel();
|
||||
|
||||
$res = $menu->select();
|
||||
|
||||
$this->data['data'] = $res;
|
||||
return $this->data;
|
||||
}else{
|
||||
$this->data['template'] = 'edit';
|
||||
@@ -65,11 +75,6 @@ class Menu extends Admin{
|
||||
*/
|
||||
public function remove(){
|
||||
if($this->request->isAjax()){
|
||||
$menu = new MenuModel();
|
||||
|
||||
$res = $menu->select();
|
||||
|
||||
$this->data['data'] = $res;
|
||||
return $this->data;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\middleware;
|
||||
namespace app\http\middleware;
|
||||
|
||||
use think\facade\View;
|
||||
|
||||
@@ -19,6 +19,7 @@ class Admin {
|
||||
|
||||
public function handle($request, \Closure $next) {
|
||||
$response = $next($request);
|
||||
|
||||
if (is_array($response->getData())) {
|
||||
$this->data = array_merge($this->data, $response->getData());
|
||||
} else {
|
||||
@@ -52,10 +53,10 @@ class Admin {
|
||||
|
||||
$template = (isset($this->data['template']) && $this->data['template']) ? $this->data['template'] : $template;
|
||||
|
||||
return View::config($config)
|
||||
->assign('sent_version', sent_version)
|
||||
->assign('config', (isset($this->data['config']) ? $this->data['config'] : []))
|
||||
->assign((isset($this->data['data']) ? $this->data['data'] : []))
|
||||
->fetch($template);
|
||||
View::config($config);
|
||||
View::assign('sent_version', sent_version);
|
||||
View::assign('config', (isset($this->data['config']) ? $this->data['config'] : []));
|
||||
View::assign((isset($this->data['data']) ? $this->data['data'] : []));
|
||||
return View::fetch($template);
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\middleware;
|
||||
namespace app\http\middleware;
|
||||
|
||||
use think\facade\Cache;
|
||||
use think\facade\Session;
|
||||
@@ -6,7 +6,7 @@
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\middleware;
|
||||
namespace app\http\middleware;
|
||||
|
||||
use think\facade\View;
|
||||
|
||||
@@ -36,15 +36,17 @@ class Front {
|
||||
$config = array(
|
||||
'tpl_replace_string' => array(
|
||||
'__static__' => '/static',
|
||||
'__img__' => '/static/admin/images',
|
||||
'__css__' => '/static/admin/css',
|
||||
'__js__' => '/static/admin/js',
|
||||
'__public__' => '/static/admin',
|
||||
'__img__' => '/static/front/images',
|
||||
'__css__' => '/static/front/css',
|
||||
'__js__' => '/static/front/js',
|
||||
'__public__' => '/static/front',
|
||||
)
|
||||
);
|
||||
if (is_string($this->data)) {
|
||||
$this->data = array('data' => $this->data);
|
||||
}
|
||||
return View::config($config)->assign($this->data)->fetch($template);
|
||||
View::config($config);
|
||||
View::assign($this->data);
|
||||
return View::engine('Think')->fetch($template);
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@
|
||||
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\middleware;
|
||||
namespace app\http\middleware;
|
||||
use think\Response;
|
||||
|
||||
class Validate {
|
||||
@@ -24,7 +24,7 @@ class Validate {
|
||||
$controller = strtr(strtolower($request->controller()), '.', '\\');
|
||||
//获取操作名,用于验证场景scene
|
||||
$scene = $request->action();
|
||||
$validate = "app\\validate\\" . $controller;
|
||||
$validate = "app\\http\\validate\\" . $controller;
|
||||
//仅当验证器存在时 进行校验
|
||||
if (class_exists($validate) && $request->isPost()) {
|
||||
$v = new $validate;
|
||||
@@ -7,7 +7,7 @@
|
||||
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\validate\admin;
|
||||
namespace app\http\validate\admin;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
8
config/middleware.php
Normal file
8
config/middleware.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
//中间件配置
|
||||
return [
|
||||
//别名或分组
|
||||
'alias' => [],
|
||||
//优先级设置,此数组中的中间件会按照数组中的顺序优先执行
|
||||
'priority' => [],
|
||||
];
|
||||
@@ -5,13 +5,15 @@
|
||||
|
||||
return [
|
||||
// session name
|
||||
'name' => '',
|
||||
'name' => 'PHPSESSID',
|
||||
// SESSION_ID的提交变量,解决flash上传跨域
|
||||
'var_session_id' => '',
|
||||
// 驱动方式 支持file redis memcache memcached
|
||||
// 驱动方式 支持file cache
|
||||
'type' => 'file',
|
||||
// 存储连接标识 当type使用cache的时候有效
|
||||
'store' => null,
|
||||
// 过期时间
|
||||
'expire' => 0,
|
||||
'expire' => 1440,
|
||||
// 前缀
|
||||
'prefix' => '',
|
||||
];
|
||||
|
||||
@@ -5,23 +5,23 @@
|
||||
|
||||
return [
|
||||
// 模板引擎类型使用Think
|
||||
'type' => 'Think',
|
||||
'type' => 'Think',
|
||||
// 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 3 保持操作方法
|
||||
'auto_rule' => 1,
|
||||
// 模板基础路径
|
||||
'view_base' => '',
|
||||
'auto_rule' => 1,
|
||||
// 模板目录名
|
||||
'view_dir_name' => 'view',
|
||||
// 模板路径
|
||||
'view_path' => '',
|
||||
'view_path' => '',
|
||||
// 模板后缀
|
||||
'view_suffix' => 'html',
|
||||
'view_suffix' => 'html',
|
||||
// 模板文件名分隔符
|
||||
'view_depr' => DIRECTORY_SEPARATOR,
|
||||
'view_depr' => DIRECTORY_SEPARATOR,
|
||||
// 模板引擎普通标签开始标记
|
||||
'tpl_begin' => '{',
|
||||
'tpl_begin' => '{',
|
||||
// 模板引擎普通标签结束标记
|
||||
'tpl_end' => '}',
|
||||
'tpl_end' => '}',
|
||||
// 标签库标签开始标记
|
||||
'taglib_begin' => '{',
|
||||
'taglib_begin' => '{',
|
||||
// 标签库标签结束标记
|
||||
'taglib_end' => '}',
|
||||
'taglib_end' => '}',
|
||||
];
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 9.4 KiB |
@@ -0,0 +1,14 @@
|
||||
$(function(){
|
||||
|
||||
})
|
||||
|
||||
function submitHandler(index, layero){
|
||||
var url = '';
|
||||
var data = {};
|
||||
$.each($('form').serializeArray(), function(i, field) {
|
||||
data[field.name] = field.value;
|
||||
});
|
||||
$.operate.submit(url, 'post', 'json', data, function(){
|
||||
layer.close(index);
|
||||
});
|
||||
}
|
||||
@@ -220,7 +220,9 @@ $(function () {
|
||||
$.page.createMenuItem($(this).attr('href'), $(this).html());
|
||||
}else if(type == 'open'){
|
||||
$.model.open($(this).text(), $(this).attr('href'));
|
||||
}else if(type == 'msg'){}
|
||||
}else if(type == 'msg'){
|
||||
$.operate.get($(this).attr('href'))
|
||||
}
|
||||
})
|
||||
|
||||
$('span[data-action=scroll]').click(function(e){
|
||||
@@ -249,4 +251,8 @@ $(function () {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if (self != top) {
|
||||
parent.location.reload();
|
||||
}
|
||||
})
|
||||
@@ -566,7 +566,7 @@
|
||||
},
|
||||
// 成功提示
|
||||
alertSuccess: function(content) {
|
||||
$.model.alert(content, modal_status.SUCCESS);
|
||||
layer.msg(content);
|
||||
},
|
||||
// 警告提示
|
||||
alertWarning: function(content) {
|
||||
@@ -1484,6 +1484,20 @@ $(function() {
|
||||
}
|
||||
expandFlag = expandFlag ? false: true;
|
||||
})
|
||||
|
||||
$('button.ajax-post,.ajax-get').click(function(e){
|
||||
e.preventDefault();
|
||||
var type = 'post',url = '';
|
||||
if ($(this).hasClass('ajax-get')) {
|
||||
type = 'get'
|
||||
}
|
||||
var data = {};
|
||||
$.each($($(this).attr('target-form')).serializeArray(), function(i, field) {
|
||||
data[field.name] = field.value;
|
||||
});
|
||||
$.operate.submit(url, type, 'json', data);
|
||||
});
|
||||
|
||||
// 按下ESC按钮关闭弹层
|
||||
$('body', document).on('keyup', function(e) {
|
||||
if (e.which === 27) {
|
||||
@@ -1503,7 +1517,7 @@ table_type = {
|
||||
/** 消息状态码 */
|
||||
web_status = {
|
||||
SUCCESS: 0,
|
||||
FAIL: 500,
|
||||
FAIL: 1,
|
||||
WARNING: 301
|
||||
};
|
||||
|
||||
@@ -1544,10 +1558,10 @@ $.ajaxSetup({
|
||||
}
|
||||
}
|
||||
});
|
||||
layer.config({
|
||||
extend: 'moon/style.css',
|
||||
skin: 'layer-ext-moon'
|
||||
});
|
||||
// layer.config({
|
||||
// extend: 'moon/style.css',
|
||||
// skin: 'layer-ext-moon'
|
||||
// });
|
||||
|
||||
/**
|
||||
* Get a prestored setting
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 7.4 KiB |
@@ -1,138 +0,0 @@
|
||||
/**
|
||||
* layer皮肤
|
||||
* Copyright (c) 2019 ruoyi
|
||||
*/
|
||||
html #layui_layer_skinmoonstylecss {
|
||||
display: none;
|
||||
position: absolute;
|
||||
width: 1989px;
|
||||
}
|
||||
|
||||
body .layer-ext-moon[type="dialog"] {
|
||||
min-width: 320px;
|
||||
}
|
||||
body .layer-ext-moon-msg[type="dialog"]{min-width:200px;}
|
||||
body .layer-ext-moon .layui-layer-title {
|
||||
background: #F8F8F8;
|
||||
color: #333;
|
||||
font-size: 14px;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
body .layer-ext-moon .layui-layer-content .layui-layer-ico {
|
||||
height: 32px;
|
||||
width: 32px;
|
||||
top:18.5px;
|
||||
}
|
||||
body .layer-ext-moon .layui-layer-ico0 {
|
||||
background: url(default.png) no-repeat -96px 0;
|
||||
;
|
||||
}
|
||||
body .layer-ext-moon .layui-layer-ico1 {
|
||||
background: url(default.png) no-repeat -224px 0;
|
||||
;
|
||||
}
|
||||
body .layer-ext-moon .layui-layer-ico2 {
|
||||
background: url(default.png) no-repeat -192px 0;
|
||||
}
|
||||
body .layer-ext-moon .layui-layer-ico3 {
|
||||
background: url(default.png) no-repeat -160px 0;
|
||||
}
|
||||
body .layer-ext-moon .layui-layer-ico4 {
|
||||
background: url(default.png) no-repeat -320px 0;
|
||||
}
|
||||
body .layer-ext-moon .layui-layer-ico5 {
|
||||
background: url(default.png) no-repeat -288px 0;
|
||||
}
|
||||
body .layer-ext-moon .layui-layer-ico6 {
|
||||
background: url(default.png) -256px 0;
|
||||
}
|
||||
body .layer-ext-moon .layui-layer-ico7 {
|
||||
background: url(default.png) no-repeat -128px 0;
|
||||
}
|
||||
body .layer-ext-moon .layui-layer-setwin {
|
||||
top: 15px;
|
||||
right: 15px;
|
||||
}
|
||||
body .layer-ext-moon .layui-layer-setwin a {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
body .layer-ext-moon .layui-layer-setwin .layui-layer-min cite:hover {
|
||||
background-color: #56abe4;
|
||||
}
|
||||
body .layer-ext-moon .layui-layer-setwin .layui-layer-max {
|
||||
background: url(default.png) no-repeat -80px 0;
|
||||
}
|
||||
body .layer-ext-moon .layui-layer-setwin .layui-layer-max:hover {
|
||||
background: url(default.png) no-repeat -64px 0;
|
||||
}
|
||||
body .layer-ext-moon .layui-layer-setwin .layui-layer-maxmin {
|
||||
background: url(default.png) no-repeat -32px 0;
|
||||
}
|
||||
body .layer-ext-moon .layui-layer-setwin .layui-layer-maxmin:hover {
|
||||
background: url(default.png) no-repeat -16px 0;
|
||||
}
|
||||
body .layer-ext-moon .layui-layer-setwin .layui-layer-close1,body .layer-ext-moon .layui-layer-setwin .layui-layer-close2 {
|
||||
background: url(default.png) 0 0;
|
||||
}
|
||||
body .layer-ext-moon .layui-layer-setwin .layui-layer-close1:hover,body .layer-ext-moon .layui-layer-setwin .layui-layer-close2:hover {
|
||||
background: url(default.png) -48px 0;
|
||||
}
|
||||
body .layer-ext-moon .layui-layer-padding{padding-top: 24px;}
|
||||
body .layer-ext-moon .layui-layer-btn {
|
||||
text-align: right;
|
||||
padding: 10px 15px 12px;
|
||||
background: #f0f4f7;
|
||||
border-top: 1px #c7c7c7 solid;
|
||||
}
|
||||
body .layer-ext-moon .layui-layer-btn a {
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
margin: 0 3px;
|
||||
margin-right: 7px;
|
||||
margin-left: 7px;
|
||||
padding: 0 15px;
|
||||
color: #fff;
|
||||
border: 1px solid #0064b6;
|
||||
background: #0071ce;
|
||||
border-radius: 3px;
|
||||
display: inline-block;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
background-repeat: no-repeat;
|
||||
text-decoration: none;
|
||||
outline: none;
|
||||
-moz-box-sizing: content-box;
|
||||
-webkit-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
body .layer-ext-moon .layui-layer-btn .layui-layer-btn0 {
|
||||
background: #0071ce;
|
||||
}
|
||||
body .layer-ext-moon .layui-layer-btn .layui-layer-btn1 {
|
||||
background: #fff;
|
||||
color: #404a58;
|
||||
border: 1px solid #c0c4cd;
|
||||
border-radius: 3px;
|
||||
}
|
||||
body .layer-ext-moon .layui-layer-btn .layui-layer-btn2 {
|
||||
background: #f60;
|
||||
color: #fff;
|
||||
border: 1px solid #f60;
|
||||
border-radius: 3px;
|
||||
}
|
||||
body .layer-ext-moon .layui-layer-btn .layui-layer-btn3 {
|
||||
background: #f00;
|
||||
color: #fff;
|
||||
border: 1px solid #f00;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
body .layer-ext-moon .layui-layer-title span.layui-layer-tabnow{
|
||||
height:47px;
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
如果不使用模板,可以删除该目录
|
||||
@@ -1,78 +1,87 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="style"}
|
||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/libs/bootstrap-editable.css">
|
||||
{/block}
|
||||
{block name="body"}
|
||||
<div class="box box-primary">
|
||||
<header class="box-header with-border">
|
||||
<h3 class="box-title">{$meta_title|default='新功能'}</h3>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-primary" href="{:url('add')}">新 增</a>
|
||||
<button class="btn btn-danger ajax-post confirm" url="{:url('del')}" target-form="ids">删 除</button>
|
||||
</div>
|
||||
</header>
|
||||
<div class="box-body">
|
||||
<div class="table-responsive clearfix">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th 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 class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()">
|
||||
<i class="fa fa-plus"></i> 新增
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="table-striped">
|
||||
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script type="text/javascript" src="__PUBLIC__/js/bootstrap-editable.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
//点击排序
|
||||
$('.item_sort').click(function(){
|
||||
var url = $(this).attr('url');
|
||||
var ids = $('.ids:checked');
|
||||
var param = '';
|
||||
if(ids.length > 0){
|
||||
var str = new Array();
|
||||
ids.each(function(){
|
||||
str.push($(this).val());
|
||||
});
|
||||
param = str.join(',');
|
||||
}
|
||||
<!-- bootstrap-table 表格插件 -->
|
||||
<script src="__static__/plugins/bootstrap-table/bootstrap-table.min.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.min.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js"></script>
|
||||
|
||||
if(url != undefined && url != ''){
|
||||
window.location.href = url + '/ids/' + param;
|
||||
}
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
var editFlag = "";
|
||||
var removeFlag = "";
|
||||
var resetPwdFlag = "";
|
||||
|
||||
$.table.init({
|
||||
url: "/admin/client/index",
|
||||
createUrl: "/admin/client/add",
|
||||
updateUrl: "/admin/client/edit/id/{id}",
|
||||
removeUrl: "/admin/client/remove",
|
||||
sortName: "id",
|
||||
sortOrder: "desc",
|
||||
modalName: "客户端",
|
||||
columns: [
|
||||
{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'title',
|
||||
title: '客户端名称'
|
||||
},
|
||||
{
|
||||
field: 'appid',
|
||||
title: 'APPID'
|
||||
},
|
||||
{
|
||||
field: 'appsecret',
|
||||
title: 'APP秘钥'
|
||||
},
|
||||
{
|
||||
field: 'create_time',
|
||||
title: '创建时间',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
|
||||
return actions.join('');
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
$.fn.editable.defaults.mode = 'popup';
|
||||
$.fn.editableform.buttons = '<button type="submit" class="btn btn-success editable-submit btn-mini"><i class="fa fa-check-square-o fa-white"></i></button>' +
|
||||
'<button type="button" class="btn editable-cancel btn-mini"><i class="fa fa-times"></i></button>';
|
||||
$('.editable').editable();
|
||||
});
|
||||
})
|
||||
|
||||
</script>
|
||||
{/block}
|
||||
@@ -1,75 +1,87 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="style"}
|
||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/libs/bootstrap-editable.css">
|
||||
{/block}
|
||||
{block name="body"}
|
||||
<div class="box box-primary">
|
||||
<header class="box-header with-border">
|
||||
<h3 class="box-title">{$meta_title|default='新功能'}</h3>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-primary" href="{:url('addhook')}">新 增</a>
|
||||
<button class="btn btn-danger ajax-post confirm" url="{:url('delhook')}" target-form="ids">删 除</button>
|
||||
</div>
|
||||
</header>
|
||||
<div class="box-body">
|
||||
<div class="table-responsive clearfix">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input class="checkbox check-all" type="checkbox"></th>
|
||||
<th>ID</th>
|
||||
<th>名称</th>
|
||||
<th>描述</th>
|
||||
<th>类型</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="list" id="item"}
|
||||
<tr>
|
||||
<td><input class="ids row-selected" type="checkbox" name="ids[]" value="{$item['id']}"></td>
|
||||
<td>{$item['id']|default=0}</td>
|
||||
<td>{$item['name']}</td>
|
||||
<td>{$item['description']}</td>
|
||||
<td>{$item['type_text']}</td>
|
||||
<td>
|
||||
<a href="{:url('edithook?id='.$item['id'])}">编辑</a>
|
||||
<a href="{:url('delhook?id='.$item['id'])}" class="confirm ajax-get">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
{$page|raw}
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()">
|
||||
<i class="fa fa-plus"></i> 新增
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="table-striped">
|
||||
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script type="text/javascript" src="__PUBLIC__/js/bootstrap-editable.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
//点击排序
|
||||
$('.item_sort').click(function(){
|
||||
var url = $(this).attr('url');
|
||||
var ids = $('.ids:checked');
|
||||
var param = '';
|
||||
if(ids.length > 0){
|
||||
var str = new Array();
|
||||
ids.each(function(){
|
||||
str.push($(this).val());
|
||||
});
|
||||
param = str.join(',');
|
||||
}
|
||||
<!-- bootstrap-table 表格插件 -->
|
||||
<script src="__static__/plugins/bootstrap-table/bootstrap-table.min.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.min.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js"></script>
|
||||
|
||||
if(url != undefined && url != ''){
|
||||
window.location.href = url + '/ids/' + param;
|
||||
}
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
var editFlag = "";
|
||||
var removeFlag = "";
|
||||
var resetPwdFlag = "";
|
||||
|
||||
$.table.init({
|
||||
url: "/admin/client/index",
|
||||
createUrl: "/admin/client/add",
|
||||
updateUrl: "/admin/client/edit/id/{id}",
|
||||
removeUrl: "/admin/client/remove",
|
||||
sortName: "id",
|
||||
sortOrder: "desc",
|
||||
modalName: "客户端",
|
||||
columns: [
|
||||
{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'title',
|
||||
title: '客户端名称'
|
||||
},
|
||||
{
|
||||
field: 'appid',
|
||||
title: 'APPID'
|
||||
},
|
||||
{
|
||||
field: 'appsecret',
|
||||
title: 'APP秘钥'
|
||||
},
|
||||
{
|
||||
field: 'create_time',
|
||||
title: '创建时间',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
|
||||
return actions.join('');
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
$.fn.editable.defaults.mode = 'popup';
|
||||
$.fn.editableform.buttons = '<button type="submit" class="btn btn-success editable-submit btn-mini"><i class="fa fa-check-square-o fa-white"></i></button>' +
|
||||
'<button type="button" class="btn editable-cancel btn-mini"><i class="fa fa-times"></i></button>';
|
||||
$('.editable').editable();
|
||||
});
|
||||
})
|
||||
|
||||
</script>
|
||||
{/block}
|
||||
@@ -1,91 +1,87 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="style"}
|
||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/libs/bootstrap-editable.css">
|
||||
{/block}
|
||||
{block name="body"}
|
||||
<div class="box box-primary">
|
||||
<header class="box-header with-border">
|
||||
<h3 class="box-title">{$meta_title|default='新功能'}</h3>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-info" href="{:url('index?refresh=1')}">更 新</a>
|
||||
<a class="btn btn-primary" href="{:url('add')}">新 增</a>
|
||||
<button class="btn btn-danger ajax-post confirm" url="{:url('del')}" target-form="ids">删 除</button>
|
||||
</div>
|
||||
</header>
|
||||
<div class="box-body">
|
||||
<div class="table-responsive clearfix">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input class="checkbox check-all" type="checkbox"></th>
|
||||
<th>ID</th>
|
||||
<th>名称</th>
|
||||
<th>标识</th>
|
||||
<th>描述</th>
|
||||
<th>状态</th>
|
||||
<th>作者</th>
|
||||
<th>版本</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="list" id="item"}
|
||||
<tr>
|
||||
<td><input class="ids row-selected" type="checkbox" name="id[]" value="{$item['id']}"></td>
|
||||
<td>{$item['id']|default=0}</td>
|
||||
<td>{$item['title']}</td>
|
||||
<td>{$item['name']}</td>
|
||||
<td>{$item['description']}</td>
|
||||
<td>{$item['status_text']}</td>
|
||||
<td>{$item['author']}</td>
|
||||
<td>{$item['version']}</td>
|
||||
<td>
|
||||
{if !$item['isinstall']}
|
||||
<a href="{:url('install?addon_name='.$item['name'])}" class="ajax-get">安装</a>
|
||||
{else/}
|
||||
<a href="{:url('uninstall?id='.$item['id'])}" class="confirm ajax-get">卸载</a>
|
||||
{if $item['status']}
|
||||
<a href="{:url('disable?id='.$item['id'])}" class="confirm ajax-get">禁用</a>
|
||||
{else/}
|
||||
<a href="{:url('enable?id='.$item['id'])}" class="confirm ajax-get">启用</a>
|
||||
{/if}
|
||||
<a href="{:url('config?id='.$item['id'])}">设置</a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
{$page|raw}
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()">
|
||||
<i class="fa fa-plus"></i> 新增
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="table-striped">
|
||||
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script type="text/javascript" src="__PUBLIC__/js/bootstrap-editable.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
//点击排序
|
||||
$('.item_sort').click(function(){
|
||||
var url = $(this).attr('url');
|
||||
var ids = $('.ids:checked');
|
||||
var param = '';
|
||||
if(ids.length > 0){
|
||||
var str = new Array();
|
||||
ids.each(function(){
|
||||
str.push($(this).val());
|
||||
});
|
||||
param = str.join(',');
|
||||
}
|
||||
<!-- bootstrap-table 表格插件 -->
|
||||
<script src="__static__/plugins/bootstrap-table/bootstrap-table.min.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.min.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js"></script>
|
||||
|
||||
if(url != undefined && url != ''){
|
||||
window.location.href = url + '/ids/' + param;
|
||||
}
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
var editFlag = "";
|
||||
var removeFlag = "";
|
||||
var resetPwdFlag = "";
|
||||
|
||||
$.table.init({
|
||||
url: "/admin/client/index",
|
||||
createUrl: "/admin/client/add",
|
||||
updateUrl: "/admin/client/edit/id/{id}",
|
||||
removeUrl: "/admin/client/remove",
|
||||
sortName: "id",
|
||||
sortOrder: "desc",
|
||||
modalName: "客户端",
|
||||
columns: [
|
||||
{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'title',
|
||||
title: '客户端名称'
|
||||
},
|
||||
{
|
||||
field: 'appid',
|
||||
title: 'APPID'
|
||||
},
|
||||
{
|
||||
field: 'appsecret',
|
||||
title: 'APP秘钥'
|
||||
},
|
||||
{
|
||||
field: 'create_time',
|
||||
title: '创建时间',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
|
||||
return actions.join('');
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
$.fn.editable.defaults.mode = 'popup';
|
||||
$.fn.editableform.buttons = '<button type="submit" class="btn btn-success editable-submit btn-mini"><i class="fa fa-check-square-o fa-white"></i></button>' +
|
||||
'<button type="button" class="btn editable-cancel btn-mini"><i class="fa fa-times"></i></button>';
|
||||
$('.editable').editable();
|
||||
});
|
||||
})
|
||||
|
||||
</script>
|
||||
{/block}
|
||||
@@ -19,6 +19,7 @@ folder instead of downloading all of them to reduce the load. -->
|
||||
<link rel="stylesheet" href="__css__/themes.css">
|
||||
<!-- jQuery 3 -->
|
||||
<script src="__static__/plugins/jquery/dist/jquery.min.js"></script>
|
||||
<script src="__static__/plugins/blockUI/jquery.blockUI.js"></script>
|
||||
<!-- Bootstrap 3.3.7 -->
|
||||
<script src="__static__/plugins/bootstrap/dist/js/bootstrap.min.js"></script>
|
||||
<!-- Slimscroll -->
|
||||
@@ -56,10 +57,10 @@ folder instead of downloading all of them to reduce the load. -->
|
||||
</div>
|
||||
|
||||
<!-- AdminLTE App -->
|
||||
<script src="__static__/common/js/core.js?v={$sent_version}"></script>
|
||||
<script src="__js__/sentcms.js?v={$sent_version}"></script>
|
||||
<script src="__static__/common/js/core.js?v={:time()}{$sent_version}"></script>
|
||||
<script src="__js__/sentcms.js?v={:time()}{$sent_version}"></script>
|
||||
<!-- AdminLTE for demo purposes -->
|
||||
<script src="__js__/app.js?v={$sent_version}"></script>
|
||||
<script src="__js__/app.js?v={:time()}{$sent_version}"></script>
|
||||
{block name="script"}{/block}
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,67 +1,87 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="style"}
|
||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/libs/bootstrap-editable.css">
|
||||
{/block}
|
||||
{block name="body"}
|
||||
<div class="box box-primary">
|
||||
<header class="box-header with-border">
|
||||
<h3 class="box-title">{$meta_title|default='新功能'}</h3>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-primary" href="{:url('add')}">新 增</a>
|
||||
<button class="btn btn-danger ajax-post confirm" url="{:url('del')}" target-form="ids">删 除</button>
|
||||
</div>
|
||||
</header>
|
||||
<div class="box-body">
|
||||
<div class="table-responsive clearfix">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th 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 class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()">
|
||||
<i class="fa fa-plus"></i> 新增
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="table-striped">
|
||||
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<!-- bootstrap-table 表格插件 -->
|
||||
<script src="__static__/plugins/bootstrap-table/bootstrap-table.min.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.min.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
var editFlag = "";
|
||||
var removeFlag = "";
|
||||
var resetPwdFlag = "";
|
||||
|
||||
$.table.init({
|
||||
url: "/admin/client/index",
|
||||
createUrl: "/admin/client/add",
|
||||
updateUrl: "/admin/client/edit/id/{id}",
|
||||
removeUrl: "/admin/client/remove",
|
||||
sortName: "id",
|
||||
sortOrder: "desc",
|
||||
modalName: "客户端",
|
||||
columns: [
|
||||
{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'title',
|
||||
title: '客户端名称'
|
||||
},
|
||||
{
|
||||
field: 'appid',
|
||||
title: 'APPID'
|
||||
},
|
||||
{
|
||||
field: 'appsecret',
|
||||
title: 'APP秘钥'
|
||||
},
|
||||
{
|
||||
field: 'create_time',
|
||||
title: '创建时间',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
|
||||
return actions.join('');
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
})
|
||||
|
||||
</script>
|
||||
{/block}
|
||||
@@ -4,72 +4,84 @@
|
||||
<header class="box-header with-border">
|
||||
<h3 class="box-title">{$meta_title|default='新功能'}</h3>
|
||||
<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="box-body">
|
||||
<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 class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()">
|
||||
<i class="fa fa-plus"></i> 新增
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="table-striped">
|
||||
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<!-- bootstrap-table 表格插件 -->
|
||||
<script src="__static__/plugins/bootstrap-table/bootstrap-table.min.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.min.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
var editFlag = "";
|
||||
var removeFlag = "";
|
||||
var resetPwdFlag = "";
|
||||
|
||||
$.table.init({
|
||||
url: "/admin/client/index",
|
||||
createUrl: "/admin/client/add",
|
||||
updateUrl: "/admin/client/edit/id/{id}",
|
||||
removeUrl: "/admin/client/remove",
|
||||
sortName: "id",
|
||||
sortOrder: "desc",
|
||||
modalName: "客户端",
|
||||
columns: [
|
||||
{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'title',
|
||||
title: '客户端名称'
|
||||
},
|
||||
{
|
||||
field: 'appid',
|
||||
title: 'APPID'
|
||||
},
|
||||
{
|
||||
field: 'appsecret',
|
||||
title: 'APP秘钥'
|
||||
},
|
||||
{
|
||||
field: 'create_time',
|
||||
title: '创建时间',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
|
||||
return actions.join('');
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
})
|
||||
|
||||
</script>
|
||||
{/block}
|
||||
@@ -1,81 +1,87 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="style"}
|
||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/libs/bootstrap-editable.css">
|
||||
{/block}
|
||||
{block name="body"}
|
||||
<div class="box box-primary">
|
||||
<header class="box-header with-border">
|
||||
<h3 class="box-title">{$meta_title|default='新功能'}</h3>
|
||||
<div class="pull-right">
|
||||
<a href="{:url('Group/add',array('type'=>$type))}" class="btn btn-danger"><i class="fa fa-plus"></i> 添加用户组</a>
|
||||
</div>
|
||||
</header>
|
||||
<div class="box-body">
|
||||
<div class="tabs-wrapper">
|
||||
<ul class="nav nav-tabs">
|
||||
{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 class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()">
|
||||
<i class="fa fa-plus"></i> 新增
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="table-striped">
|
||||
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script type="text/javascript" src="__PUBLIC__/js/bootstrap-editable.min.js"></script>
|
||||
<!-- bootstrap-table 表格插件 -->
|
||||
<script src="__static__/plugins/bootstrap-table/bootstrap-table.min.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.min.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$.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();
|
||||
var editFlag = "";
|
||||
var removeFlag = "";
|
||||
var resetPwdFlag = "";
|
||||
|
||||
$.table.init({
|
||||
url: "/admin/client/index",
|
||||
createUrl: "/admin/client/add",
|
||||
updateUrl: "/admin/client/edit/id/{id}",
|
||||
removeUrl: "/admin/client/remove",
|
||||
sortName: "id",
|
||||
sortOrder: "desc",
|
||||
modalName: "客户端",
|
||||
columns: [
|
||||
{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'title',
|
||||
title: '客户端名称'
|
||||
},
|
||||
{
|
||||
field: 'appid',
|
||||
title: 'APPID'
|
||||
},
|
||||
{
|
||||
field: 'appsecret',
|
||||
title: 'APP秘钥'
|
||||
},
|
||||
{
|
||||
field: 'create_time',
|
||||
title: '创建时间',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
|
||||
return actions.join('');
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
})
|
||||
|
||||
</script>
|
||||
{/block}
|
||||
@@ -13,7 +13,7 @@
|
||||
<link rel="stylesheet" href="__static__/plugins/Ionicons/css/ionicons.min.css">
|
||||
<!-- Theme style -->
|
||||
<link rel="stylesheet" href="__css__/sentcms.min.css">
|
||||
<link rel="stylesheet" href="__css__/style.css?v={$sent_version}">
|
||||
<link rel="stylesheet" href="__css__/style.css?v={sent_version}">
|
||||
<!-- AdminLTE Skins. Choose a skin from the css/skins
|
||||
folder instead of downloading all of them to reduce the load. -->
|
||||
<link rel="stylesheet" href="__css__/themes.css">
|
||||
@@ -87,7 +87,7 @@ folder instead of downloading all of them to reduce the load. -->
|
||||
<a href="/admin/user/profile.html" class="btn btn-default btn-flat" data-action="url" data-type="tab">个人资料</a>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a href="/admin/user/logout.html" class="btn btn-default btn-flat" data-action="url" data-type="msg">退出</a>
|
||||
<a href="/admin/index/logout.html" class="btn btn-default btn-flat" data-action="url" data-type="msg">退出</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -169,7 +169,7 @@ folder instead of downloading all of them to reduce the load. -->
|
||||
<span class="button" data-action="scroll" data-type="left"><i class="fa fa-backward"></i></span>
|
||||
<div class="tab-list">
|
||||
<div class="page-tabs-content">
|
||||
<a href="javascript:;" class="home active menuTab" data-id="/admin/system/dashboard"><span>首页</span></a>
|
||||
<a href="javascript:;" class="home active menuTab" data-id="/admin/system/dashboard"><span><i class="fa fa-home"></i> 系统首页</span></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dropdown" data-tab-action="nav">
|
||||
|
||||
@@ -1,47 +1,87 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="style"}
|
||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/libs/bootstrap-editable.css">
|
||||
{/block}
|
||||
{block name="body"}
|
||||
<div class="box box-primary">
|
||||
<header class="box-header with-border">
|
||||
<h3 class="box-title">{$meta_title|default='新功能'}</h3>
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-primary" href="{:url('add')}">新 增</a>
|
||||
<button class="btn btn-danger ajax-post confirm" url="{:url('delete')}" target-form="ids">删 除</button>
|
||||
</div>
|
||||
</header>
|
||||
<div class="box-body">
|
||||
<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 class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()">
|
||||
<i class="fa fa-plus"></i> 新增
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="table-striped">
|
||||
<table id="bootstrap-table" data-mobile-responsive="true"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<!-- bootstrap-table 表格插件 -->
|
||||
<script src="__static__/plugins/bootstrap-table/bootstrap-table.min.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/extensions/mobile/bootstrap-table-mobile.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.min.js"></script>
|
||||
<script src="__static__/plugins/bootstrap-table/extensions/columns/bootstrap-table-fixed-columns.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
var editFlag = "";
|
||||
var removeFlag = "";
|
||||
var resetPwdFlag = "";
|
||||
|
||||
$.table.init({
|
||||
url: "/admin/client/index",
|
||||
createUrl: "/admin/client/add",
|
||||
updateUrl: "/admin/client/edit/id/{id}",
|
||||
removeUrl: "/admin/client/remove",
|
||||
sortName: "id",
|
||||
sortOrder: "desc",
|
||||
modalName: "客户端",
|
||||
columns: [
|
||||
{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'title',
|
||||
title: '客户端名称'
|
||||
},
|
||||
{
|
||||
field: 'appid',
|
||||
title: 'APPID'
|
||||
},
|
||||
{
|
||||
field: 'appsecret',
|
||||
title: 'APP秘钥'
|
||||
},
|
||||
{
|
||||
field: 'create_time',
|
||||
title: '创建时间',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
|
||||
return actions.join('');
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
})
|
||||
|
||||
</script>
|
||||
{/block}
|
||||
@@ -8,51 +8,51 @@
|
||||
<div class="box-body">
|
||||
<form method="post" class="form form-horizontal">
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">标题</label>
|
||||
<div class="col-lg-10">
|
||||
<label class="col-sm-2 control-label">标题</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" 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">
|
||||
<label class="col-sm-2 control-label">小图标</label>
|
||||
<div class="col-sm-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">
|
||||
<label class="col-sm-2 control-label">排序</label>
|
||||
<div class="col-sm-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">
|
||||
<label class="col-sm-2 control-label">链接</label>
|
||||
<div class="col-sm-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">
|
||||
<label class="col-sm-2 control-label">上级菜单</label>
|
||||
<div class="col-sm-10">
|
||||
<select name="pid" class="form-control" style="width: 50%">
|
||||
</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">
|
||||
<label class="col-sm-2 control-label">分组</label>
|
||||
<div class="col-sm-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">
|
||||
<label class="col-sm-2 control-label">是否隐藏</label>
|
||||
<div class="col-sm-2">
|
||||
<select name="hide" class="form-control">
|
||||
<option value="0" >否</option>
|
||||
<option value="1" {if isset($info['hide']) && $info['hide']==1}selected{/if}>是
|
||||
@@ -61,8 +61,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">仅开发者模式可见</label>
|
||||
<div class="col-lg-1">
|
||||
<label class="col-sm-2 control-label">仅开发者模式可见</label>
|
||||
<div class="col-sm-2">
|
||||
<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}>是
|
||||
@@ -71,20 +71,20 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">说明</label>
|
||||
<div class="col-lg-10">
|
||||
<label class="col-sm-2 control-label">说明</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" 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=''}">
|
||||
<!-- <div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button class="btn btn-success submit-btn ajax-post" type="submit" target-form="form-horizontal">确 定</button>
|
||||
<button class="btn btn-danger btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<input type="hidden" name="id" value="{$info['id']|default=''}">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -42,9 +42,9 @@ $(function(){
|
||||
expandAll: false,
|
||||
expandFirst: false,
|
||||
url: "/admin/menu/index",
|
||||
createUrl: "/admin/menu/add/{id}",
|
||||
updateUrl: "/admin/menu/edit/{id}",
|
||||
removeUrl: "/admin/menu/remove/{id}",
|
||||
createUrl: "/admin/menu/add?id={id}",
|
||||
updateUrl: "/admin/menu/edit?id={id}",
|
||||
removeUrl: "/admin/menu/remove?id={id}",
|
||||
modalName: "菜单",
|
||||
columns:[
|
||||
{field: 'selectItem', radio: true},
|
||||
@@ -78,9 +78,9 @@ $(function(){
|
||||
align: "left",
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.menuId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-info btn-xs ' + addFlag + '" href="javascript:void(0)" onclick="$.operate.add(\'' + row.menuId + '\')"><i class="fa fa-plus"></i>新增</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.menuId + '\')"><i class="fa fa-trash"></i>删除</a>');
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-info btn-xs ' + addFlag + '" href="javascript:void(0)" onclick="$.operate.add(\'' + row.id + '\')"><i class="fa fa-plus"></i>新增</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user