init
This commit is contained in:
269
app/admin/view/singlepage/add.html
Executable file
269
app/admin/view/singlepage/add.html
Executable file
@@ -0,0 +1,269 @@
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
新增单页
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo url('/admin/index/index');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
|
||||
<li><a href="<?php echo url('/admin/singlepage/lists');?>"> 单页列表</a></li>
|
||||
<li class="active"> 单页</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/singlepage/create');?>" method="post">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#navfirst" data-toggle="tab"><i class="fa fa-edit text-green"></i> 基本信息</a></li>
|
||||
<li><a href="#navsecond" data-toggle="tab">详细内容</a></li>
|
||||
<li><a href="#navthird" data-toggle="tab">图片信息</a></li>
|
||||
<li><a href="#navfourth" data-toggle="tab">SEO设置</a></li>
|
||||
|
||||
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="active tab-pane" id="navfirst">
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">单页名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" required>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(单页名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pid" class="col-sm-2 control-label">所属单页</label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="pid" id="pid">
|
||||
<option value="0" selected="">默认值</option>
|
||||
<?php echo $singlepageOptions;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(所属单页)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">单页排序<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="sort" id="sort" value="9999">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(单页排序)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="isshow" class="col-sm-2 control-label">是否显示</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isshow" value="1" checked> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isshow" value="0"> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(是否显示)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="recommend" class="col-sm-2 control-label">是否推荐</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="recommend" value="1"> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="recommend" value="0" checked> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(是否推荐)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="col-sm-2 control-label">单页描述</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="description" name="description"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-10 col-sm-offset-2">
|
||||
<span class="help-block">(单页描述)</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">
|
||||
<label for="url" class="col-sm-2 control-label">其他链接</label>
|
||||
<div class="col-sm-5 has-feedback">
|
||||
<input type="text" class="form-control" name="url">
|
||||
<span class="fa fa-globe form-control-feedback"></span>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(其他链接)</span>
|
||||
</div>
|
||||
</div>-->
|
||||
<!-- <div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<div class="checkbox">
|
||||
<label><input type="checkbox" name="agree"> 确认</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
|
||||
<div class="tab-pane" id="navsecond">
|
||||
<div class="box box-info">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">内容详情
|
||||
<small>放置主要内容</small>
|
||||
</h3>
|
||||
<!-- tools box -->
|
||||
<div class="pull-right box-tools">
|
||||
<button type="button" class="btn btn-info" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||
<i class="fa fa-minus"></i></button>
|
||||
<button type="button" class="btn btn-info" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||
<i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
<!-- /.tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<textarea id="content" style="width: 100%;height:500px;" name="content" rows="10" cols="80" placeholder="请输入内容..."></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navthird">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">单页图片</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<a href="javascript:void(0);" id="thumb-image" data-toggle="image" class="img-thumbnail"><img class="img-responsive" src="/uploads/nopic.jpg"/></a>
|
||||
<input type="hidden" name="picture" value="/uploads/nopic.jpg" id="input-image" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-sm-5">
|
||||
<span class="help-block">(主要图片)</span>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navfourth">
|
||||
<div class="form-group">
|
||||
<label for="seo_title" class="col-sm-2 control-label">SEO标题</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="seo_title">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(SEO标题)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="seo_keyword" class="col-sm-2 control-label">SEO关键词</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="seo_keyword">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(SEO关键词)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="seo_description" class="col-sm-2 control-label">SEO描述</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="seo_description" name="seo_description"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-10 col-sm-offset-2">
|
||||
<span class="help-block">(SEO描述)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<div class="nav-footer row">
|
||||
<div class="col-sm-2 col-sm-offset-2">
|
||||
<p><button id="reset-btn" type="button" class="btn btn-warning btn-block">重置</button></p>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<p><button id="submit-btn" type="submit" class="btn btn-danger btn-block">提交</button></p>
|
||||
</div>
|
||||
<!-- /. row -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">快捷入口</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<a href="<?php echo url('/admin/singlepage/lists');?>" class="btn btn-block btn-primary">单页列表</a>
|
||||
<a href="<?php echo url('/admin/singlepage/add');?>" class="btn btn-block btn-primary">添加单页</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<style>
|
||||
.table thead > tr > td, .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<!-- /.content-wrapper -->
|
||||
<?php echo editor('#content');?>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#reset-btn").click(function(e) {
|
||||
if (confirm('确认重置所有表单项吗?')) {
|
||||
this.form.reset();
|
||||
}
|
||||
});
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var nameObj = document.getElementById('name');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
nameObj.focus();
|
||||
return false;
|
||||
}
|
||||
var pidObj = document.getElementById('pid');
|
||||
if (isNaN(pidObj.value)) {
|
||||
alert('所属上级值无效');
|
||||
pidObj.focus();
|
||||
return false;
|
||||
}
|
||||
var sortObj = document.getElementById('sort');
|
||||
if (isNaN(sortObj.value)) {
|
||||
alert('排序值必须是数字');
|
||||
sortObj.focus();
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// alert("Submitted");
|
||||
// e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("请勾选确认");
|
||||
// }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
50
app/admin/view/singlepage/childcat.html
Executable file
50
app/admin/view/singlepage/childcat.html
Executable file
@@ -0,0 +1,50 @@
|
||||
<?php if(!empty($list)):?>
|
||||
<table class="table table-hover table-bordered margin-bottom-none">
|
||||
<tbody>
|
||||
<?php foreach($list as $k=>$singlepage):?>
|
||||
<tr>
|
||||
<td class="tcell1"><input type="checkbox" name="ids[]" value="<?php echo $singlepage['id'];?>"></td>
|
||||
<td class="tcell2"><?php echo $singlepage['id'];?></td>
|
||||
<td class="tcell3">
|
||||
<?php echo str_repeat('|---', $level); ?> <span class="fa fa-fw fa-plus-square" data-id="<?php echo $singlepage['id'];?>" data-level="<?php echo $level;?>" data-cod="getchild"></span> <a href="<?php echo url('/admin/singlepage/lists',['pid'=>$singlepage['id']]);?>"><?php echo $singlepage['name'];?></a>
|
||||
</td>
|
||||
<td class="tcell4"><input size="3" maxlength="7" value="<?php echo $singlepage['sort'];?>" type="text" data-id="<?php echo $singlepage['id'];?>" data-url="<?php echo url('/admin/singlepage/updatesort');?>" data-cod="sort"></td>
|
||||
<td class="tcell5">
|
||||
<span class="fa <?php if($singlepage['isshow']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $singlepage['id'];?>" data-url="<?php echo url('/admin/singlepage/toggleisshow');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td class="tcell6">
|
||||
<span class="fa <?php if($singlepage['recommend']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $singlepage['id'];?>" data-url="<?php echo url('/admin/singlepage/togglerecommend');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td class="tcell7"><img src="<?php echo getImage($singlepage['picture'],110,110,1,'smallimg');?>" class="img-thumbnail" data-image="<?php echo $singlepage['picture'];?>" data-toggle="preview-image"></td>
|
||||
<td class="tcell8">
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/singlepage/add',['pid'=>$singlepage['id']]);?>">添加子单页</a>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/singlepage/edit',['id'=>$singlepage['id']]);?>">编辑</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $singlepage['id'];?>" data-url="<?php echo url('/admin/singlepage/delete');?>" data-cod="dowarn">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td id="catsun<?php echo $singlepage['id'];?>" colspan="8" class="table-responsive no-padding" style="display: none;"></td></tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("[data-cod='sort']", "#catsun<?php echo $pid;?>").keyup(ajaxsort);
|
||||
$("[data-cod='dowarn']", "#catsun<?php echo $pid;?>").click(ajaxdowarn);
|
||||
$("[data-cod='state']", "#catsun<?php echo $pid;?>").click(togglestate);
|
||||
$("[data-cod='getchild']", "#catsun<?php echo $pid;?>").click(ajaxgetchild);
|
||||
$("[data-toggle='preview-image']", "#catsun<?php echo $pid;?>").each(function() {
|
||||
var element = $(this);
|
||||
element.popover({
|
||||
content: function() {
|
||||
return '<img src="' + element.attr('data-image') + '" style="max-width:200px;"/>';
|
||||
},
|
||||
placement: 'auto',
|
||||
trigger: 'click',
|
||||
html: true,
|
||||
container: 'body',
|
||||
delay: {show: 5, hide: 10}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php endif;?>
|
||||
271
app/admin/view/singlepage/copy.html
Executable file
271
app/admin/view/singlepage/copy.html
Executable file
@@ -0,0 +1,271 @@
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
复制单页
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo url('/admin/index/index');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
|
||||
<li><a href="<?php echo url('/admin/singlepage/lists');?>"> 单页列表</a></li>
|
||||
<li class="active"> 单页</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/singlepage/create');?>" method="post">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#navfirst" data-toggle="tab"><i class="fa fa-edit text-green"></i> 基本信息</a></li>
|
||||
<li><a href="#navsecond" data-toggle="tab">详细内容</a></li>
|
||||
<li><a href="#navthird" data-toggle="tab">图片信息</a></li>
|
||||
<li><a href="#navfourth" data-toggle="tab">SEO设置</a></li>
|
||||
|
||||
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
|
||||
<div class="active tab-pane" id="navfirst">
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">单页名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" required value="<?php echo $singlepage['name'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(单页名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pid" class="col-sm-2 control-label">所属单页</label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="pid" id="pid">
|
||||
<option value="0">默认值</option>
|
||||
<?php echo $singlepageOptions;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(所属单页)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">单页排序<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="sort" id="sort" value="<?php echo $singlepage['sort'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(单页排序)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="isshow" class="col-sm-2 control-label">是否显示</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isshow" value="1" <?php if($singlepage['isshow']):?>checked=""<?php endif;?>/> 显示
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isshow" value="0" <?php if(!$singlepage['isshow']):?>checked=""<?php endif;?>/> 隐藏
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(是否显示)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="recommend" class="col-sm-2 control-label">是否推荐</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input name="recommend" type="radio" value="1" <?php if($singlepage['recommend']):?>checked=""<?php endif;?>/> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input name="recommend" type="radio" value="0" <?php if(!$singlepage['recommend']):?>checked=""<?php endif;?>/> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(是否推荐)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="col-sm-2 control-label">单页描述</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="description" name="description"><?php echo $singlepage['description'];?></textarea>
|
||||
</div>
|
||||
<div class="col-sm-10 col-sm-offset-2">
|
||||
<span class="help-block">(单页描述)</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">
|
||||
<label for="url" class="col-sm-2 control-label">其他链接</label>
|
||||
<div class="col-sm-5 has-feedback">
|
||||
<input type="text" class="form-control" name="url" value="<?php echo $singlepage['url'];?>">
|
||||
<span class="fa fa-globe form-control-feedback"></span>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(其他链接)</span>
|
||||
</div>
|
||||
</div>-->
|
||||
<!-- <div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<div class="checkbox">
|
||||
<label><input type="checkbox" name="agree"> 确认</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
|
||||
<div class="tab-pane" id="navsecond">
|
||||
<div class="box box-info">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">内容详情
|
||||
<small>放置主要内容</small>
|
||||
</h3>
|
||||
<!-- tools box -->
|
||||
<div class="pull-right box-tools">
|
||||
<button type="button" class="btn btn-info" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||
<i class="fa fa-minus"></i></button>
|
||||
<button type="button" class="btn btn-info" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||
<i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
<!-- /.tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<textarea id="content" style="width: 100%;height:500px;" name="content" rows="10" cols="80"><?php echo $singlepage['content'];?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navthird">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">单页图片</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<a href="javascript:void(0);" id="thumb-image" data-toggle="image" class="img-thumbnail"><img class="img-responsive" src="<?php echo empty($singlepage['picture'])?'/uploads/nopic.jpg':$singlepage['picture'];?>" /></a>
|
||||
<input type="hidden" name="picture" value="<?php echo $singlepage['picture'];?>" id="input-image" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-sm-5">
|
||||
<span class="help-block">(主要图片)</span>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navfourth">
|
||||
<div class="form-group">
|
||||
<label for="seo_title" class="col-sm-2 control-label">SEO标题</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="seo_title" value="<?php echo $singlepage['seo_title'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(SEO标题)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="seo_keyword" class="col-sm-2 control-label">SEO关键词</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="seo_keyword" value="<?php echo $singlepage['seo_keyword'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(SEO关键词)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="seo_description" class="col-sm-2 control-label">SEO描述</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="seo_description" name="seo_description" ><?php echo $singlepage['seo_description'];?></textarea>
|
||||
</div>
|
||||
<div class="col-sm-10 col-sm-offset-2">
|
||||
<span class="help-block">(SEO描述)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<div class="nav-footer row">
|
||||
<input name="id" value="<?php echo $singlepage['id'];?>" type="hidden">
|
||||
<div class="col-sm-2 col-sm-offset-2">
|
||||
<p><button id="reset-btn" type="button" class="btn btn-warning btn-block">重置</button></p>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<p><button id="submit-btn" type="submit" class="btn btn-danger btn-block">提交</button></p>
|
||||
</div>
|
||||
<!-- /. row -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">快捷入口</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<a href="<?php echo url('/admin/singlepage/lists');?>" class="btn btn-block btn-primary">单页列表</a>
|
||||
<a href="<?php echo url('/admin/singlepage/add');?>" class="btn btn-block btn-primary">添加单页</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<style>
|
||||
.table thead > tr > td, .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<!-- /.content-wrapper -->
|
||||
<?php echo editor('#content');?>
|
||||
<script>
|
||||
$(function() {
|
||||
$("#reset-btn").click(function(e) {
|
||||
if (confirm('确认重置所有表单项吗?')) {
|
||||
this.form.reset();
|
||||
}
|
||||
});
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var nameObj = document.getElementById('name');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
nameObj.focus();
|
||||
return false;
|
||||
}
|
||||
var pidObj = document.getElementById('pid');
|
||||
if (isNaN(pidObj.value)) {
|
||||
alert('所属上级值无效');
|
||||
pidObj.focus();
|
||||
return false;
|
||||
}
|
||||
var sortObj = document.getElementById('sort');
|
||||
if (isNaN(sortObj.value)) {
|
||||
alert('排序值必须是数字');
|
||||
sortObj.focus();
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// alert("Submitted");
|
||||
// e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("请勾选确认");
|
||||
// }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
271
app/admin/view/singlepage/edit.html
Executable file
271
app/admin/view/singlepage/edit.html
Executable file
@@ -0,0 +1,271 @@
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
编辑单页
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo url('/admin/index/index');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
|
||||
<li><a href="<?php echo url('/admin/singlepage/lists');?>"> 单页列表</a></li>
|
||||
<li class="active"> 单页</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/singlepage/update');?>" method="post">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#navfirst" data-toggle="tab"><i class="fa fa-edit text-green"></i> 基本信息</a></li>
|
||||
<li><a href="#navsecond" data-toggle="tab">详细内容</a></li>
|
||||
<li><a href="#navthird" data-toggle="tab">图片信息</a></li>
|
||||
<li><a href="#navfourth" data-toggle="tab">SEO设置</a></li>
|
||||
|
||||
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
|
||||
<div class="active tab-pane" id="navfirst">
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">单页名称<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="name" id="name" required value="<?php echo $singlepage['name'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(单页名称)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pid" class="col-sm-2 control-label">所属单页</label>
|
||||
<div class="col-sm-5">
|
||||
<select class="form-control" name="pid" id="pid">
|
||||
<option value="0">默认值</option>
|
||||
<?php echo $singlepageOptions;?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(所属单页)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sort" class="col-sm-2 control-label">单页排序<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="sort" id="sort" value="<?php echo $singlepage['sort'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(单页排序)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="isshow" class="col-sm-2 control-label">是否显示</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isshow" value="1" <?php if($singlepage['isshow']):?>checked=""<?php endif;?>/> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isshow" value="0" <?php if(!$singlepage['isshow']):?>checked=""<?php endif;?>/> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(是否显示)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="recommend" class="col-sm-2 control-label">是否推荐</label>
|
||||
<div class="col-sm-5">
|
||||
<label class="radio-inline">
|
||||
<input name="recommend" type="radio" value="1" <?php if($singlepage['recommend']):?>checked=""<?php endif;?>/> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input name="recommend" type="radio" value="0" <?php if(!$singlepage['recommend']):?>checked=""<?php endif;?>/> 否
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(是否推荐)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="col-sm-2 control-label">单页描述</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="description" name="description"><?php echo $singlepage['description'];?></textarea>
|
||||
</div>
|
||||
<div class="col-sm-10 col-sm-offset-2">
|
||||
<span class="help-block">(单页描述)</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">
|
||||
<label for="url" class="col-sm-2 control-label">其他链接</label>
|
||||
<div class="col-sm-5 has-feedback">
|
||||
<input type="text" class="form-control" name="url" value="<?php echo $singlepage['url'];?>">
|
||||
<span class="fa fa-globe form-control-feedback"></span>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(其他链接)</span>
|
||||
</div>
|
||||
</div>-->
|
||||
<!-- <div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<div class="checkbox">
|
||||
<label><input type="checkbox" name="agree"> 确认</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
|
||||
<div class="tab-pane" id="navsecond">
|
||||
<div class="box box-info">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">内容详情
|
||||
<small>放置主要内容</small>
|
||||
</h3>
|
||||
<!-- tools box -->
|
||||
<div class="pull-right box-tools">
|
||||
<button type="button" class="btn btn-info" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||
<i class="fa fa-minus"></i></button>
|
||||
<button type="button" class="btn btn-info" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||
<i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
<!-- /.tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
<textarea id="content" style="width: 100%;height:500px;" name="content" rows="10" cols="80"><?php echo $singlepage['content'];?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</div>
|
||||
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navthird">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">单页图片</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="table-responsive">
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left">
|
||||
<a href="javascript:void(0);" id="thumb-image" data-toggle="image" class="img-thumbnail"><img class="img-responsive" src="<?php echo empty($singlepage['picture'])?'/uploads/nopic.jpg':$singlepage['picture'];?>" /></a>
|
||||
<input type="hidden" name="picture" value="<?php echo $singlepage['picture'];?>" id="input-image" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-sm-5">
|
||||
<span class="help-block">(主要图片)</span>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="navfourth">
|
||||
<div class="form-group">
|
||||
<label for="seo_title" class="col-sm-2 control-label">SEO标题</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="seo_title" value="<?php echo $singlepage['seo_title'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(SEO标题)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="seo_keyword" class="col-sm-2 control-label">SEO关键词</label>
|
||||
<div class="col-sm-5">
|
||||
<input type="text" class="form-control" name="seo_keyword" value="<?php echo $singlepage['seo_keyword'];?>">
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(SEO关键词)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="seo_description" class="col-sm-2 control-label">SEO描述</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="seo_description" name="seo_description" ><?php echo $singlepage['seo_description'];?></textarea>
|
||||
</div>
|
||||
<div class="col-sm-10 col-sm-offset-2">
|
||||
<span class="help-block">(SEO描述)</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<div class="nav-footer row">
|
||||
<input name="id" value="<?php echo $singlepage['id'];?>" type="hidden">
|
||||
<div class="col-sm-2 col-sm-offset-2">
|
||||
<p><button id="reset-btn" type="button" class="btn btn-warning btn-block">重置</button></p>
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<p><button id="submit-btn" type="submit" class="btn btn-danger btn-block">提交</button></p>
|
||||
</div>
|
||||
<!-- /. row -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">快捷入口</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<a href="<?php echo url('/admin/singlepage/lists');?>" class="btn btn-block btn-primary">单页列表</a>
|
||||
<a href="<?php echo url('/admin/singlepage/add');?>" class="btn btn-block btn-primary">添加单页</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<style>
|
||||
.table thead > tr > td, .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<!-- /.content-wrapper -->
|
||||
<?php echo editor('#content');?>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#reset-btn").click(function(e) {
|
||||
if (confirm('确认重置所有表单项吗?')) {
|
||||
this.form.reset();
|
||||
}
|
||||
});
|
||||
$("form.form-horizontal").submit(function(e) {
|
||||
var nameObj = document.getElementById('name');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
nameObj.focus();
|
||||
return false;
|
||||
}
|
||||
var pidObj = document.getElementById('pid');
|
||||
if (isNaN(pidObj.value)) {
|
||||
alert('所属上级值无效');
|
||||
pidObj.focus();
|
||||
return false;
|
||||
}
|
||||
var sortObj = document.getElementById('sort');
|
||||
if (isNaN(sortObj.value)) {
|
||||
alert('排序值必须是数字');
|
||||
sortObj.focus();
|
||||
return false;
|
||||
}
|
||||
// var agree = $("input[name='agree']", this).prop('checked');
|
||||
// if (agree) {
|
||||
// alert("Submitted");
|
||||
// e.preventDefault();
|
||||
// } else {
|
||||
// e.preventDefault();
|
||||
// alert("请勾选确认");
|
||||
// }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
149
app/admin/view/singlepage/listcategory.html
Executable file
149
app/admin/view/singlepage/listcategory.html
Executable file
@@ -0,0 +1,149 @@
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
单页管理
|
||||
<small>单页列表</small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo url('/admin/index/index');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
|
||||
<li><a href="<?php echo url('/admin/singlepage/lists');?>"> 单页</a></li>
|
||||
<?php if($breadcrumb):foreach($breadcrumb as $k=>$bc):?>
|
||||
<?php if($pid==$bc['id']):?>
|
||||
<li class="active"> <?php echo $bc['name'];?></li>
|
||||
<?php else:?>
|
||||
<li><a href="<?php echo url('/admin/singlepage/lists',['pid'=>$bc['id']]);?>"> <?php echo $bc['name'];?></a></li>
|
||||
<?php endif;?>
|
||||
<?php endforeach;endif;?>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">单页列表</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-minus"></i>
|
||||
</button>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
<?php if(!empty($list)):?>
|
||||
<div class="table-responsive lists-table">
|
||||
<table class="table table-hover table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th class="tcell1"> </th>
|
||||
<th class="tcell2">ID</th>
|
||||
<th class="tcell3">单页名称</th>
|
||||
<th class="tcell4">单页排序</th>
|
||||
<th class="tcell5">是否显示</th>
|
||||
<th class="tcell6">是否推荐</th>
|
||||
<th class="tcell7">图片</th>
|
||||
<th class="tcell8">操作</th>
|
||||
</tr>
|
||||
<?php foreach($list as $k=>$singlepage):?>
|
||||
<tr>
|
||||
<td class="tcell1"><input type="checkbox" name="ids[]" value="<?php echo $singlepage['id'];?>"></td>
|
||||
<td class="tcell2"><?php echo $singlepage['id'];?></td>
|
||||
<td class="tcell3">
|
||||
<span class="fa fa-fw fa-plus-square" data-id="<?php echo $singlepage['id'];?>" data-level="<?php echo $level;?>" data-cod="getchild"></span>
|
||||
<a href="<?php echo url('/admin/singlepage/lists',['pid'=>$singlepage['id']]);?>"><?php echo $singlepage['name'];?></a>
|
||||
</td>
|
||||
<td class="tcell4"><input size="3" maxlength="7" value="<?php echo $singlepage['sort'];?>" type="text" data-id="<?php echo $singlepage['id'];?>" data-url="<?php echo url('/admin/singlepage/updatesort');?>" data-cod="sort"></td>
|
||||
<td class="tcell5">
|
||||
<span class="fa <?php if($singlepage['isshow']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $singlepage['id'];?>" data-url="<?php echo url('/admin/singlepage/toggleisshow');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td class="tcell6">
|
||||
<span class="fa <?php if($singlepage['recommend']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $singlepage['id'];?>" data-url="<?php echo url('/admin/singlepage/togglerecommend');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td class="tcell7"><img src="<?php echo getImage($singlepage['picture'],110,110,1,'smallimg');?>" class="img-thumbnail" data-image="<?php echo $singlepage['picture'];?>" data-toggle="preview-image"></td>
|
||||
<td class="tcell8">
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/singlepage/add',['pid'=>$singlepage['id']]);?>">添加子单页</a>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/singlepage/edit',['id'=>$singlepage['id']]);?>">编辑</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $singlepage['id'];?>" data-url="<?php echo url('/admin/singlepage/delete');?>" data-cod="dowarn">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td id="catsun<?php echo $singlepage['id'];?>" colspan="8" class="table-responsive no-padding" style="display: none;"></td></tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- /.table -->
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<!-- /.lists-table -->
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer no-padding">
|
||||
<div class="mailbox-controls">
|
||||
<!-- Check all button -->
|
||||
<button type="button" class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></button>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default btn-sm" data-cod="refresh">刷新</button>
|
||||
</div>
|
||||
<!-- /.btn-group -->
|
||||
<a href="<?php echo url('/admin/singlepage/add');?>" class="btn btn-default btn-sm"><i class="fa fa-plus"></i></a>
|
||||
<div class="pull-right">
|
||||
<?php if(0):?>
|
||||
<?php echo $page;?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<!-- /.pull-right -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<style>
|
||||
.table-responsive .table .tcell1{width:3.5rem;text-align:center;vertical-align: middle;}
|
||||
.table-responsive .table .tcell2{width:7.5rem;text-align:center;vertical-align: middle;}
|
||||
.table-responsive .table .tcell3{text-align: left;vertical-align: middle;}
|
||||
.table-responsive .table .tcell4{width:7.5rem;text-align:center;vertical-align: middle;}
|
||||
.table-responsive .table .tcell5{width:7.5rem;text-align:center;vertical-align: middle;}
|
||||
.table-responsive .table .tcell6{width:7.5rem;text-align:center;vertical-align: middle;}
|
||||
.table-responsive .table .tcell7{width:6rem;text-align:center;vertical-align: middle;}
|
||||
.table-responsive .table .tcell8{width:16.5rem;text-align:center;vertical-align: middle;}
|
||||
.table thead > tr > td, .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<!-- Page Script -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("[data-cod='getchild']").click(ajaxgetchild);
|
||||
});
|
||||
function ajaxgetchild(event) {
|
||||
event = event ? event : window.event;
|
||||
var obj = event.srcElement ? event.srcElement : event.target;
|
||||
var val = (obj.className.match(/fa-plus-square/i)) ? 1 : 0;
|
||||
//var method = obj.getAttribute('data-method');
|
||||
//var url = obj.getAttribute('data-url');
|
||||
var id = obj.getAttribute('data-id');
|
||||
obj.className = val ? 'fa fa-fw fa-minus-square' : 'fa fa-fw fa-plus-square';
|
||||
var childcat = $('#catsun' + id);
|
||||
if (childcat.html().length < 10) {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
data: {'pid': id, level: obj.getAttribute("data-level")},
|
||||
url: "<?php echo url('/admin/singlepage/childcat');?>",
|
||||
dataType: 'html',
|
||||
success: function(data, status, xhr) {
|
||||
childcat.html(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (val) {
|
||||
childcat.css('display', 'table-cell');
|
||||
} else {
|
||||
childcat.css('display', 'none');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
111
app/admin/view/singlepage/lists.html
Executable file
111
app/admin/view/singlepage/lists.html
Executable file
@@ -0,0 +1,111 @@
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
单页管理
|
||||
<small>单页列表</small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo url('/admin/index/index');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
|
||||
<li><a href="<?php echo url('/admin/singlepage/lists');?>"> 单页</a></li>
|
||||
<li class="active"> 单页列表</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">单页列表</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="text" class="form-control pull-right" id="list-search-in" placeholder="Search Name" value="<?php echo $search['skeyword'];?>">
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-default" id="list-search-btn"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
<?php if(!empty($list)):?>
|
||||
<div class="table-responsive lists-table">
|
||||
<table class="table table-hover table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="35rem"> </th>
|
||||
<th width="70rem" class="text-center">ID</th>
|
||||
<th>单页名称</th>
|
||||
<th width="75rem" class="text-center">单页排序</th>
|
||||
<th width="75rem" class="text-center">是否显示</th>
|
||||
<th width="75rem" class="text-center">是否推荐</th>
|
||||
<th width="60rem" class="text-center">图片</th>
|
||||
<th width="165rem">操作</th>
|
||||
</tr>
|
||||
<?php foreach($list as $k=>$singlepage):?>
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="ids[]" value="<?php echo $singlepage['id'];?>"></td>
|
||||
<td class="text-center"><?php echo $singlepage['id'];?></td>
|
||||
<td>
|
||||
<?php if ($singlepage['level']) echo str_repeat('|---', $singlepage['level']); ?><a href="<?php echo url('/admin/singlepage/edit',['id'=>$singlepage['id']]);?>"><?php echo $singlepage['name'];?></a>
|
||||
</td>
|
||||
<td class="text-center"><input size="3" maxlength="7" value="<?php echo $singlepage['sort'];?>" type="text" data-id="<?php echo $singlepage['id'];?>" data-url="<?php echo url('/admin/singlepage/updatesort');?>" data-cod="sort"></td>
|
||||
<td class="text-center">
|
||||
<span class="fa <?php if($singlepage['isshow']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $singlepage['id'];?>" data-url="<?php echo url('/admin/singlepage/toggleisshow');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span class="fa <?php if($singlepage['recommend']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $singlepage['id'];?>" data-url="<?php echo url('/admin/singlepage/togglerecommend');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td><img src="<?php echo getImage($singlepage['picture'],110,110,1,'smallimg');?>" class="img-thumbnail" data-image="<?php echo $singlepage['picture'];?>" data-toggle="preview-image"></td>
|
||||
<td>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/singlepage/add',['pid'=>$singlepage['id']]);?>">添加子单页</a>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/singlepage/edit',['id'=>$singlepage['id']]);?>">编辑</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $singlepage['id'];?>" data-url="<?php echo url('/admin/singlepage/delete');?>" data-cod="dowarn">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- /.table -->
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<!-- /.lists-table -->
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer no-padding">
|
||||
<div class="mailbox-controls">
|
||||
<!-- Check all button -->
|
||||
<button type="button" class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></button>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default btn-sm" data-url="<?php echo url('/admin/singlepage/deletes');?>" data-cod="batch">删除</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-cod="refresh">刷新</button>
|
||||
</div>
|
||||
<!-- /.btn-group -->
|
||||
<a href="<?php echo url('/admin/singlepage/add');?>" class="btn btn-default btn-sm">添加</a>
|
||||
<div class="pull-right">
|
||||
<?php if(0):?>
|
||||
<?php echo $page;?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<!-- /.pull-right -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<style>
|
||||
.table thead > tr > td, .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<!-- Page Script -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
});
|
||||
</script>
|
||||
111
app/admin/view/singlepage/recycle.html
Executable file
111
app/admin/view/singlepage/recycle.html
Executable file
@@ -0,0 +1,111 @@
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
单页管理
|
||||
<small>单页列表</small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="<?php echo url('/admin/index/index');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
|
||||
<li><a href="<?php echo url('/admin/singlepage/lists');?>"> 单页</a></li>
|
||||
<li class="active"> 单页列表</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">单页列表</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<div class="input-group input-group-sm">
|
||||
<input type="text" class="form-control pull-right" id="list-search-in" placeholder="Search Name" value="<?php echo $search['skeyword'];?>">
|
||||
<div class="input-group-btn">
|
||||
<button type="button" class="btn btn-default" id="list-search-btn"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
<?php if(!empty($list)):?>
|
||||
<div class="table-responsive lists-table">
|
||||
<table class="table table-hover table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="35rem"> </th>
|
||||
<th width="70rem" class="text-center">ID</th>
|
||||
<th>单页名称</th>
|
||||
<th width="75rem" class="text-center">单页排序</th>
|
||||
<th width="75rem" class="text-center">是否显示</th>
|
||||
<th width="75rem" class="text-center">是否推荐</th>
|
||||
<th width="60rem" class="text-center">图片</th>
|
||||
<th width="165rem">操作</th>
|
||||
</tr>
|
||||
<?php foreach($list as $k=>$singlepage):?>
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="ids[]" value="<?php echo $singlepage['id'];?>"></td>
|
||||
<td class="text-center"><?php echo $singlepage['id'];?></td>
|
||||
<td>
|
||||
<a href="<?php echo url('/admin/singlepage/edit',['id'=>$singlepage['id']]);?>"><?php echo $singlepage['name'];?></a>
|
||||
</td>
|
||||
<td class="text-center"><input size="3" maxlength="7" value="<?php echo $singlepage['sort'];?>" type="text" data-id="<?php echo $singlepage['id'];?>" data-url="<?php echo url('/admin/singlepage/updatesort');?>" data-cod="sort"></td>
|
||||
<td class="text-center">
|
||||
<span class="fa <?php if($singlepage['isshow']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $singlepage['id'];?>" data-url="<?php echo url('/admin/singlepage/toggleisshow');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span class="fa <?php if($singlepage['recommend']):?>fa-check<?php else:?>fa-remove<?php endif;?>" data-id="<?php echo $singlepage['id'];?>" data-url="<?php echo url('/admin/singlepage/togglerecommend');?>" data-cod="state"></span>
|
||||
</td>
|
||||
<td><img src="<?php echo getImage($singlepage['picture'],110,110,1,'smallimg');?>" class="img-thumbnail" data-image="<?php echo $singlepage['picture'];?>" data-toggle="preview-image"></td>
|
||||
<td>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/singlepage/edit',['id'=>$singlepage['id']]);?>">编辑</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $singlepage['id'];?>" data-url="<?php echo url('/admin/singlepage/destroy');?>" data-cod="dowarn">删除</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $singlepage['id'];?>" data-url="<?php echo url('/admin/singlepage/recovery');?>" data-cod="dowarn">恢复</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- /.table -->
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<!-- /.lists-table -->
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer no-padding">
|
||||
<div class="mailbox-controls">
|
||||
<!-- Check all button -->
|
||||
<button type="button" class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></button>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default btn-sm" data-url="<?php echo url('/admin/singlepage/destroys');?>" data-cod="batch">删除</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-cod="refresh">刷新</button>
|
||||
</div>
|
||||
<!-- /.btn-group -->
|
||||
<a href="" class="btn btn-default btn-sm">添加</a>
|
||||
<div class="pull-right">
|
||||
<?php if(0):?>
|
||||
<?php echo $page;?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<!-- /.pull-right -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<style>
|
||||
.table thead > tr > td, .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<!-- Page Script -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user