更新页面文件
This commit is contained in:
@@ -8,8 +8,8 @@
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
// SentCMS常量定义
|
||||
define('SENTCMS_VERSION', '3.6.201803');
|
||||
define('SENT_ADDON_PATH', __DIR__ . '/../addons' . DS);
|
||||
define('sent_version', '4.0.0');
|
||||
define('sent_path_addons', __DIR__ . '/../addons' . DS);
|
||||
|
||||
//字符串解密加密
|
||||
function authcode($string, $operation = 'DECODE', $key = '', $expiry = 0) {
|
||||
|
||||
@@ -16,6 +16,9 @@ class Channel extends Admin{
|
||||
* @title 系统首页
|
||||
*/
|
||||
public function index(){
|
||||
|
||||
$this->data['data'] = array(
|
||||
'tree' => array()
|
||||
);
|
||||
return $this->data;
|
||||
}
|
||||
}
|
||||
@@ -10,35 +10,221 @@ namespace app\controller\admin;
|
||||
|
||||
use app\controller\Admin;
|
||||
use app\model\Config as ConfigModel;
|
||||
use think\facade\Cache;
|
||||
|
||||
class Config extends Admin {
|
||||
|
||||
class Config extends Admin{
|
||||
|
||||
/**
|
||||
* @title 系统首页
|
||||
*/
|
||||
public function index(){
|
||||
public function index(ConfigModel $config) {
|
||||
$group = input('group', 0, 'trim');
|
||||
$name = input('name', '', 'trim');
|
||||
$system_config = Cache::get('system_config');
|
||||
|
||||
/* 查询条件初始化 */
|
||||
$map = array('status' => 1);
|
||||
if ($group) {
|
||||
$map['group'] = $group;
|
||||
}
|
||||
|
||||
if ($name) {
|
||||
$map['name'] = array('like', '%' . $name . '%');
|
||||
}
|
||||
|
||||
$list = $config->where($map)->order('id desc')->paginate(25, false, array(
|
||||
'query' => $this->request->param(),
|
||||
));
|
||||
// 记录当前列表页的cookie
|
||||
Cookie('__forward__', $_SERVER['REQUEST_URI']);
|
||||
|
||||
$data = array(
|
||||
'page' => $list->render(),
|
||||
'group_id' => $group,
|
||||
'list' => $list,
|
||||
);
|
||||
$this->data['data'] = $data;
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @title 系统首页
|
||||
*/
|
||||
public function group(ConfigModel $config){
|
||||
public function group(ConfigModel $config) {
|
||||
if ($this->request->isAjax()) {
|
||||
$this->data['code'] = 1;
|
||||
return $this->data;
|
||||
}else{
|
||||
$this->data['id'] = $this->request->param('id', 1);
|
||||
$res = $config->where(array('status' => 1, 'group' => $this->data['id']))->field('id,name,title,extra,value,remark,type')->order('sort')->select();
|
||||
} else {
|
||||
$id = $this->request->param('id', 1);
|
||||
$res = $config->where(array('status' => 1, 'group' => $id))->field('id,name,title,extra,value,remark,type')->order('sort')->select();
|
||||
|
||||
$this->data['list'] = $res->toArray();
|
||||
$list = $res->toArray();
|
||||
$this->data['data'] = array('list' => $list, 'id' => $id);
|
||||
return $this->data;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 主题设置
|
||||
* @title 新增配置
|
||||
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
|
||||
*/
|
||||
public function themes(){
|
||||
public function add(ConfigModel $config) {
|
||||
if ($this->request->isPost()) {
|
||||
$config = model('Config');
|
||||
$data = $this->request->post();
|
||||
if ($data) {
|
||||
$id = $config->validate(true)->save($data);
|
||||
if ($id) {
|
||||
cache('db_config_data', null);
|
||||
//记录行为
|
||||
action_log('update_config', 'config', $id, session('user_auth.uid'));
|
||||
return $this->success('新增成功', url('index'));
|
||||
} else {
|
||||
return $this->error('新增失败');
|
||||
}
|
||||
} else {
|
||||
return $this->error($config->getError());
|
||||
}
|
||||
} else {
|
||||
$this->data['data'] = array('info' => array());
|
||||
$this->data['template'] = "edit";
|
||||
return $this->data;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 编辑配置
|
||||
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
|
||||
*/
|
||||
public function edit(ConfigModel $config) {
|
||||
if ($this->request->isPost()) {
|
||||
$config = model('Config');
|
||||
$data = $this->request->post();
|
||||
if ($data) {
|
||||
$result = $config->validate('Config.edit')->save($data, array('id' => $data['id']));
|
||||
if (false !== $result) {
|
||||
cache('db_config_data', null);
|
||||
//记录行为
|
||||
action_log('update_config', 'config', $data['id'], session('user_auth.uid'));
|
||||
return $this->success('更新成功', Cookie('__forward__'));
|
||||
} else {
|
||||
return $this->error($config->getError(), '');
|
||||
}
|
||||
} else {
|
||||
return $this->error($config->getError());
|
||||
}
|
||||
} else {
|
||||
$id = $this->request->param('id', 0);
|
||||
if (!$id) {
|
||||
$this->data['msg'] = "非法操作!";
|
||||
return $this->data;
|
||||
}
|
||||
$info = array();
|
||||
/* 获取数据 */
|
||||
$info = $config->field(true)->find($id);
|
||||
|
||||
if (false === $info) {
|
||||
return $this->error('获取配置信息错误');
|
||||
}
|
||||
$this->data['data'] = array(
|
||||
'info' => $info,
|
||||
);
|
||||
return $this->data;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @title 批量保存配置
|
||||
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
|
||||
*/
|
||||
public function save($config) {
|
||||
if ($config && is_array($config)) {
|
||||
$Config = db('Config');
|
||||
foreach ($config as $name => $value) {
|
||||
$map = array('name' => $name);
|
||||
$Config->where($map)->setField('value', $value);
|
||||
}
|
||||
}
|
||||
cache('db_config_data', null);
|
||||
return $this->success('保存成功!');
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 删除配置
|
||||
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
|
||||
*/
|
||||
public function del() {
|
||||
$id = array_unique((array) input('id', 0));
|
||||
|
||||
if (empty($id)) {
|
||||
return $this->error('请选择要操作的数据!');
|
||||
}
|
||||
|
||||
$map = array('id' => array('in', $id));
|
||||
if (db('Config')->where($map)->delete()) {
|
||||
cache('DB_CONFIG_DATA', null);
|
||||
//记录行为
|
||||
action_log('update_config', 'config', $id, session('user_auth.uid'));
|
||||
return $this->success('删除成功');
|
||||
} else {
|
||||
return $this->error('删除失败!');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 配置排序
|
||||
* @author huajie <banhuajie@163.com>
|
||||
*/
|
||||
public function sort() {
|
||||
if ($this->request->isGet()) {
|
||||
$ids = input('ids');
|
||||
//获取排序的数据
|
||||
$map = array('status' => array('gt', -1));
|
||||
if (!empty($ids)) {
|
||||
$map['id'] = array('in', $ids);
|
||||
} elseif (input('group')) {
|
||||
$map['group'] = input('group');
|
||||
}
|
||||
$list = db('Config')->where($map)->field('id,title')->order('sort asc,id asc')->select();
|
||||
|
||||
$this->assign('list', $list);
|
||||
$this->setMeta('配置排序');
|
||||
return $this->fetch();
|
||||
} elseif ($this->request->isPost()) {
|
||||
$ids = input('post.ids');
|
||||
$ids = explode(',', $ids);
|
||||
foreach ($ids as $key => $value) {
|
||||
$res = db('Config')->where(array('id' => $value))->setField('sort', $key + 1);
|
||||
}
|
||||
if ($res !== false) {
|
||||
return $this->success('排序成功!', Cookie('__forward__'));
|
||||
} else {
|
||||
return $this->error('排序失败!');
|
||||
}
|
||||
} else {
|
||||
return $this->error('非法请求!');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @title 主题选择
|
||||
*/
|
||||
public function themes(ConfigModel $config) {
|
||||
if ($this->request->isPost()) {
|
||||
$result = $config->where('name', $name . '_themes')->setField('value', $id);
|
||||
if (false !== $result) {
|
||||
\think\Cache::clear();
|
||||
return $this->success('设置成功!');
|
||||
}else{
|
||||
return $this->error('设置失败!');
|
||||
}
|
||||
}else{
|
||||
$list = $config->getThemesList();
|
||||
$this->data['data'] = array(
|
||||
'pc' => $this->data['config']['pc_themes'],
|
||||
'mobile' => $this->data['config']['mobile_themes'],
|
||||
'list' => $list,
|
||||
);
|
||||
return $this->data;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -42,14 +42,19 @@ class Admin {
|
||||
// 使用内置PHP模板引擎渲染模板输出
|
||||
$config = array(
|
||||
'tpl_replace_string' => array(
|
||||
'__static__' => '/static',
|
||||
'__img__' => '/static/admin/images',
|
||||
'__css__' => '/static/admin/css',
|
||||
'__js__' => '/static/admin/js',
|
||||
'__public__' => '/static/admin',
|
||||
'__static__' => '/static',
|
||||
'__img__' => '/static/admin/images',
|
||||
'__css__' => '/static/admin/css',
|
||||
'__js__' => '/static/admin/js',
|
||||
'__public__' => '/static/admin',
|
||||
),
|
||||
);
|
||||
|
||||
return View::config($config)->assign($this->data)->fetch($template);
|
||||
|
||||
$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);
|
||||
}
|
||||
}
|
||||
@@ -39,6 +39,7 @@ class AdminAuth {
|
||||
* @title 显示菜单
|
||||
*/
|
||||
protected function getMenu($request) {
|
||||
$list = [];
|
||||
$current_controller = '/' . str_replace('.', '/', strtolower($request->controller()));
|
||||
$current_url = $current_controller . '/' . strtolower($request->action());
|
||||
$menu = Cache::get('menu');
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
namespace app\model;
|
||||
|
||||
use think\Model;
|
||||
use think\facade\Cache;
|
||||
|
||||
/**
|
||||
* 设置模型
|
||||
@@ -28,7 +29,8 @@ class Config extends Model{
|
||||
}
|
||||
|
||||
protected function getTypeTextAttr($value, $data){
|
||||
$type = config('config_type_list');
|
||||
$config = Cache::get('system_config');
|
||||
$type = $config['config_type_list'];
|
||||
$type_text = explode(',', $type[$data['type']]);
|
||||
return $type_text[0];
|
||||
}
|
||||
|
||||
32
app/view/admin/action/detail.html
Normal file
32
app/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}
|
||||
@@ -1 +1,67 @@
|
||||
{extend name="admin/base"/}
|
||||
{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
app/view/admin/action/log.html
Normal file
49
app/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}
|
||||
@@ -1 +1,80 @@
|
||||
{extend name="admin/base"/}
|
||||
{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
app/view/admin/ad/lists.html
Normal file
50
app/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
app/view/admin/addons/add.html
Normal file
78
app/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
app/view/admin/addons/addons.tpl
Normal file
38
app/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]
|
||||
}
|
||||
@@ -1 +1,77 @@
|
||||
{extend name="admin/base"/}
|
||||
{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}
|
||||
@@ -1 +1,93 @@
|
||||
{extend name="admin/base"/}
|
||||
{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
app/view/admin/attribute/index.html
Normal file
64
app/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}
|
||||
@@ -116,7 +116,7 @@
|
||||
</ul>
|
||||
</li>
|
||||
<li class="visible-lg">
|
||||
<a href="#" class="btn hopscotch">
|
||||
<a href="#" class="btn" onclick="helpIntro();">
|
||||
<i class="fa fa-question-circle"></i>
|
||||
操作指南
|
||||
</a>
|
||||
|
||||
192
app/view/admin/category/edit.html
Normal file
192
app/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
app/view/admin/category/edit_channel.html
Normal file
114
app/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}
|
||||
@@ -1 +1,103 @@
|
||||
{extend name="admin/base"/}
|
||||
{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
app/view/admin/category/operate.html
Normal file
37
app/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
app/view/admin/channel/edit.html
Normal file
114
app/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}
|
||||
@@ -1 +1,106 @@
|
||||
{extend name="admin/base"/}
|
||||
{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
app/view/admin/channel/sort.html
Normal file
112
app/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
app/view/admin/client/add.html
Normal file
44
app/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">
|
||||
<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}
|
||||
@@ -1,37 +1,48 @@
|
||||
{extend name="admin/base"/}
|
||||
{block name="body"}
|
||||
|
||||
<div class="table-responsive clearfix">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>名称</th>
|
||||
<th>APPID</th>
|
||||
<th>APPSECRET</th>
|
||||
<th>创建时间</th>
|
||||
<th>更新时间</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{volist name="data" id="item"}
|
||||
<tr>
|
||||
<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?id='.$item['id'])}">编辑</a>
|
||||
<a href="{:url('/admin/client/del?id='.$item['id'])}" class="ajax-post confirm">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
{$page}
|
||||
<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>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>{$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('client/edit?id='.$item['id'])}">编辑</a>
|
||||
<a href="{:url('client/del?id='.$item['id'])}" class="ajax-post confirm">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
{$page|raw}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{/block}
|
||||
88
app/view/admin/config/edit.html
Normal file
88
app/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">
|
||||
<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}
|
||||
@@ -4,14 +4,14 @@
|
||||
<div class="main-box clearfix">
|
||||
<header class="main-box-header clearfix">
|
||||
<div class="pull-left">
|
||||
<h2>{$meta|default='新功能'}</h2>
|
||||
<h2>配置管理</h2>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a href="{:url('Config/index')}" class="btn btn-primary">
|
||||
<a href="{:url('/admin/config/index')}" class="btn btn-primary">
|
||||
<i class="fa fa-list"></i>
|
||||
配置列表
|
||||
</a>
|
||||
<a href="{:url('Config/add')}" class="btn btn-danger">
|
||||
<a href="{:url('/admin/config/add')}" class="btn btn-danger">
|
||||
<i class="fa fa-list"></i>
|
||||
添加配置
|
||||
</a>
|
||||
@@ -21,8 +21,8 @@
|
||||
<div class="tabs-wrapper">
|
||||
<ul class="nav nav-tabs">
|
||||
{volist name="config['config_group_list']" id="item"}
|
||||
<li {if isset($id) && $id == $key}class="active"{/if}>
|
||||
<a href="/admin/config/group.html?id={$key}">{$item}</a>
|
||||
<li {if condition="$key eq $id"}class="active"{/if}>
|
||||
<a href="{:url('/admin/config/group',array('id'=>$key))}">{$item}</a>
|
||||
</li>
|
||||
{/volist}
|
||||
</ul>
|
||||
@@ -82,9 +82,5 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="script"}
|
||||
<script type="text/javascript">
|
||||
var isLoadModule = true;
|
||||
</script>
|
||||
|
||||
{/block}
|
||||
118
app/view/admin/config/index.html
Normal file
118
app/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>网站设置</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}
|
||||
@@ -1 +1,67 @@
|
||||
{extend name="admin/base"/}
|
||||
{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">
|
||||
<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}
|
||||
@@ -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}
|
||||
@@ -1 +1,136 @@
|
||||
{extend name="admin/base"/}
|
||||
{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}
|
||||
@@ -1 +1,87 @@
|
||||
{extend name="admin/base"/}
|
||||
{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="data"}
|
||||
<tr>
|
||||
<td>{$data.time|date='Ymd-His',###}</td>
|
||||
<td>{$data.part}</td>
|
||||
<td>{$data.compress}</td>
|
||||
<td>{$data.size|format_bytes}</td>
|
||||
<td>{$key}</td>
|
||||
<td>-</td>
|
||||
<td class="action">
|
||||
<a class="db-import" href="{:url('import?time='.$data['time'])}">还原</a>
|
||||
|
||||
<a class="ajax-get confirm" href="{:url('del?time='.$data['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
app/view/admin/form/attr.html
Normal file
64
app/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
app/view/admin/form/detail_alumn.html
Normal file
62
app/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}
|
||||
@@ -1 +1,69 @@
|
||||
{extend name="admin/base"/}
|
||||
{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
app/view/admin/form/list_alumn.html
Normal file
62
app/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
app/view/admin/group/access.html
Normal file
77
app/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
app/view/admin/group/auth.html
Normal file
63
app/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}
|
||||
@@ -1 +1,83 @@
|
||||
{extend name="admin/base"/}
|
||||
{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}
|
||||
@@ -1 +1,49 @@
|
||||
{extend name="admin/base"/}
|
||||
{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
app/view/admin/menu/edit.html
Normal file
96
app/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
app/view/admin/menu/import.html
Normal file
29
app/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}
|
||||
@@ -1 +1,120 @@
|
||||
{extend name="admin/base"/}
|
||||
{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
app/view/admin/menu/sort.html
Normal file
111
app/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
app/view/admin/model/add.html
Normal file
62
app/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
app/view/admin/model/edit.html
Normal file
156
app/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}
|
||||
|
||||
@@ -1 +1,89 @@
|
||||
{extend name="admin/base"/}
|
||||
{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}
|
||||
|
||||
@@ -1 +1,80 @@
|
||||
{extend name="admin/base"/}
|
||||
{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}
|
||||
@@ -1 +1,49 @@
|
||||
{extend name="admin/base"/}
|
||||
{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}
|
||||
47
app/view/admin/user/auth.html
Normal file
47
app/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
app/view/admin/user/editpwd.html
Normal file
44
app/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}
|
||||
@@ -1 +1,101 @@
|
||||
{extend name="admin/base"/}
|
||||
{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}
|
||||
Reference in New Issue
Block a user