init
This commit is contained in:
88
app/admin/view/product_special/add.html
Executable file
88
app/admin/view/product_special/add.html
Executable file
@@ -0,0 +1,88 @@
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<meta charset="utf-8" />
|
||||
<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/product_special/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/product_special/create');?>" method="post">
|
||||
<div class="nav-tabs-custom">
|
||||
<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="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>
|
||||
<!-- /.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>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- 模态框(Modal) -->
|
||||
<div class="modal fade" id="modal-url" tabindex="0">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h5 class="modal-title blue">外部链接内容</h5>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<iframe id="urliframe" style="width:100%;height:400px;" frameborder="0"></iframe>
|
||||
</div>
|
||||
<div class="modal-footer"></div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
<style>
|
||||
.table thead > tr > td, .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
123
app/admin/view/product_special/add_product.html
Executable file
123
app/admin/view/product_special/add_product.html
Executable file
@@ -0,0 +1,123 @@
|
||||
<!-- Select2 -->
|
||||
<link rel="stylesheet" href="__PUBLIC__/adminlte/bower_components/select2/dist/css/select2.min.css">
|
||||
<style>
|
||||
.select2-container--default .select2-selection--single {
|
||||
background-color: #fff;
|
||||
border: 1px solid #d2d6de;
|
||||
border-radius: 0;
|
||||
}
|
||||
.select2-container .select2-selection--single{height:34px;}
|
||||
ul, li{list-style: none;}
|
||||
</style>
|
||||
<!-- Select2 -->
|
||||
<script src="__PUBLIC__/adminlte/bower_components/select2/dist/js/select2.full.min.js"></script>
|
||||
<!-- 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');?>"><i class="fa fa-dashboard"></i> 首页</a></li>
|
||||
<li><a href="<?php echo url('/admin/product_special/lists');?>"> 产品专题列表</a></li>
|
||||
<li class="active"> 产品专题</li>
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<?php $i = 0; ?>
|
||||
<section class="content" style="background-color:#FFF; overflow: hidden; margin:15px;">
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/product_special/update_product');?>" method="post" name="productform">
|
||||
<div class="tab-content">
|
||||
<ul class="col-sm-12" style="text-align: center; font-size: 12px; font-weight: 600">
|
||||
<li class="col-sm-2">产品id</li>
|
||||
<!-- <li class="col-sm-2">图片</li> -->
|
||||
<li class="col-sm-2">排列方式</li>
|
||||
<li class="col-sm-1"></li>
|
||||
</ul>
|
||||
<?php if (!empty($list)): ?>
|
||||
<div class="active tab-pane table" id="navfirst">
|
||||
<?php foreach($list as $key => $value): ?>
|
||||
|
||||
<ul class="form-group col-sm-12">
|
||||
<li class="col-sm-2">
|
||||
<input type="text" class="form-control" name="product_id[]" class="product_id" value="<?php echo $value['product_id']; ?>">
|
||||
</li>
|
||||
<!-- <li class="col-sm-2">
|
||||
<a href="javascript:void(0);" id="thumb-special-img<?php echo $i; ?>" data-toggle="image" data-folder="product" class="img-thumbnail"><img class="img-responsive" style="height: 160px" src="<?php echo $value['img'] == '' ? 'uploads/image/nopic.jpg' : $value['img']; ?>"/></a>
|
||||
<input type="hidden" name="picture[]" value="<?php echo $value['img']; ?>" id="input-special-img<?php echo $i; ?>" />
|
||||
</li> -->
|
||||
<li class="col-sm-2">
|
||||
<select name="type[]" style="width:100%; height: 30px; line-height: 30px;">
|
||||
<option value="0" <?php if ($value['type'] == 0): ?> selected <?php endif; ?>>正常</option>
|
||||
<option value="1" <?php if ($value['type'] == 1): ?> selected <?php endif; ?>>特殊</option>
|
||||
</select>
|
||||
</li>
|
||||
<?php if ($key == 0): ?>
|
||||
<li class="col-sm-1" ><input type="button" class="add_item" value="+" style="background-color: #00B2EE;width: 30px;"></li>
|
||||
<?php else: ?>
|
||||
<li class="col-sm-1" ><input type="button" class="del_item" value="-" style="background-color: #EE0000;width: 30px;"></li>
|
||||
<?php endif; ?>
|
||||
|
||||
</ul>
|
||||
|
||||
<?php $i++; endforeach; ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="active tab-pane table" id="navfirst">
|
||||
<ul class="form-group col-sm-12">
|
||||
<li class="col-sm-2">
|
||||
<input type="text" class="form-control" name="product_id[]" class="product_id">
|
||||
</li>
|
||||
<li class="col-sm-2">
|
||||
<select name="type[]" style="width:100%; height: 30px; line-height: 30px;">
|
||||
<option value="0">正常</option>
|
||||
<option value="1">特殊</option>
|
||||
</select>
|
||||
</li>
|
||||
<li class="col-sm-1" ><input type="button" class="add_item" value="+" style="background-color: #00B2EE;width: 30px;"></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<?php $i++; endif; ?>
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
<div class="nav-footer row">
|
||||
<input name="id" value="<?php echo $special_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>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var i = <?php echo $i; ?>;
|
||||
$(document).on('click', '.add_item', function () {
|
||||
var html = '';
|
||||
|
||||
html += '<ul class="form-group col-sm-12"><li class="col-sm-2"> <input type="text" class="form-control" name="product_id[]" class="product_id"></li><li class="col-sm-2"><select name="type[]" style="width:100%; height: 30px; line-height: 30px;"><option value="0">正常</option><option value="1">特殊</option></select></li><li class="col-sm-1" ><input type="button" class="del_item" value="-" style="background-color: #EE0000;width: 30px;"></li></ul>';
|
||||
|
||||
i++;
|
||||
// var html = '<div class="active tab-pane"><label class="col-sm-2 control-label"></label><div class="form-group" ><div class="col-sm-3" style="display: flex;"><input type="text" class="form-control" name="product_id[]" class="product_id"><input type="button" class="del_item" value="-" style="background-color: #EE0000;width: 30px;"></div></div></div>';
|
||||
|
||||
$(".table").append(html);
|
||||
});
|
||||
|
||||
$(document).on('click', '.del_item', function () {
|
||||
$(this).parents('ul').remove();
|
||||
});
|
||||
</script>
|
||||
89
app/admin/view/product_special/edit.html
Executable file
89
app/admin/view/product_special/edit.html
Executable file
@@ -0,0 +1,89 @@
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<meta charset="utf-8" />
|
||||
<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/product_special/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/product_special/update');?>" method="post">
|
||||
<div class="nav-tabs-custom">
|
||||
<div class="tab-content">
|
||||
<div class="active tab-pane" id="navfirst">
|
||||
<input type="hidden" name="id" value="<?php echo $product_special['id']; ?>">
|
||||
<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" value="<?php echo $product_special['name']; ?>" required>
|
||||
</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 $product_special['sort']; ?>"">
|
||||
</div>
|
||||
<div class="col-sm-5 col-sm-offset-3">
|
||||
<span class="help-block">(排序)</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>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- 模态框(Modal) -->
|
||||
<div class="modal fade" id="modal-url" tabindex="0">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h5 class="modal-title blue">外部链接内容</h5>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<iframe id="urliframe" style="width:100%;height:400px;" frameborder="0"></iframe>
|
||||
</div>
|
||||
<div class="modal-footer"></div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
<style>
|
||||
.table thead > tr > td, .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
101
app/admin/view/product_special/lists.html
Executable file
101
app/admin/view/product_special/lists.html
Executable file
@@ -0,0 +1,101 @@
|
||||
<!-- 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/product_special/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">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
|
||||
<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 class="text-center">专题名称</th>
|
||||
<th width="75rem" class="text-center">排序</th>
|
||||
<th width="300rem" class="text-center">创建时间</th>
|
||||
<th width="165rem" class="text-center">操作</th>
|
||||
</tr>
|
||||
<?php if(!empty($list)):?>
|
||||
<?php foreach($list as $key => $value):?>
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="ids[]" value="<?php echo $value['id'];?>"></td>
|
||||
<td class="text-center"><?php echo $value['id'];?></td>
|
||||
<td class="text-center"><?php echo $value['name']; ?></td>
|
||||
|
||||
<td class="text-center"><input size="3" maxlength="7" value="<?php echo $value['sort'];?>" type="text" data-id="<?php echo $value['id'];?>" data-url="<?php echo url('/admin/product_special/updatesort');?>" data-cod="sort"></td>
|
||||
|
||||
<td class="text-center"><?php echo $value['create_time']; ?></td>
|
||||
<td class="text-center">
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/product_special/add_product', ['id'=>$value['id']]);?>">管理产品</a>
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/product_special/edit',['id'=>$value['id']]);?>">编辑</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $value['id'];?>" data-url="<?php echo url('/admin/value/delete');?>" data-cod="dowarn">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- /.table -->
|
||||
</div>
|
||||
|
||||
<!-- /.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" id="pagerefresh">刷新</button>
|
||||
</div>
|
||||
<!-- /.btn-group -->
|
||||
<a href="<?php echo url('/admin/product_special/add');?>" class="btn btn-default btn-sm">添加</a>
|
||||
<div class="pull-right">
|
||||
|
||||
</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