init
This commit is contained in:
173
app/admin/view/remark/lists.html
Executable file
173
app/admin/view/remark/lists.html
Executable file
@@ -0,0 +1,173 @@
|
||||
<!-- 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/remark/lists');?>"> 文章留言</a></li>
|
||||
<li class="active"> 文章留言列表</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="box box-solid collapsed-box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><i class="fa fa-fw fa-search"></i>...</h3>
|
||||
<div class="box-tools">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-search-plus"></i> 展开/关闭
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse">
|
||||
<i class="fa fa-fw fa-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/remark/lists');?>" method="get">
|
||||
<div class="col-sm-5">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">搜索</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" name="name" class="form-control" placeholder="评论人或内容" value="<?php echo $search['name']; ?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-7">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">评论时间</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="col-xs-12 col-sm-6 no-padding">
|
||||
<div class="input-group">
|
||||
<input type="text" name="timebegin" id="timebegin" class="form-control" value="<?php echo $search['timebegin']; ?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#timebegin');"><i class="fa fa-fw fa-calendar"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6 no-padding">
|
||||
<div class="input-group">
|
||||
<input type="text" name="timeend" id="timeend" class="form-control" value="<?php echo $search['timeend']; ?>">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-primary" type="button" onclick="laydate_datetime('#timeend');"><i class="fa fa-fw fa-calendar"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-primary btn-sm" ><i class="fa fa-fw fa-check"></i>搜索</button>
|
||||
<button type="button" class="btn btn-info btn-sm" id="doclear"><i class="fa fa-fw fa-remove"></i>清空</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- /.box-tools -->
|
||||
</div>
|
||||
<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">
|
||||
|
||||
<div class="table-responsive lists-table">
|
||||
<table class="table table-hover table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th width="35rem"> </th>
|
||||
<th width="60rem" class="text-center">留言人</th>
|
||||
<th width="60rem" class="text-center">联系邮箱</th>
|
||||
<th style="text-align: center">留言内容</th>
|
||||
<th width="200rem" class="text-center">原文章链接</th>
|
||||
<th width="200rem" class="text-center">提交时间</th>
|
||||
<th width="60rem" class="text-center">状态</th>
|
||||
<th width="135rem" class="text-center">操作</th>
|
||||
</tr>
|
||||
{volist name='list' id ='vv'}
|
||||
<?php
|
||||
if($country_code == 'US'){
|
||||
$link = url('/us/article/detail/'.$vv['article_id']);
|
||||
}
|
||||
else{
|
||||
$link = url('/article/detail/'.$vv['article_id']);
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td class="text-center"><input type="checkbox" name="ids[]" value="<?php echo $vv['id'];?>"></td>
|
||||
<th class="text-center">{$vv.name}</th>
|
||||
<th class="text-center">{$vv.email}</th>
|
||||
<td class="text-center"> {$vv.content}</td>
|
||||
<th class="text-center">
|
||||
<?php if($vv['c_stat']==-1){?>
|
||||
<span style="color:gray;"><?php echo $vv['title'];?></span>
|
||||
<?php }else{ ?>
|
||||
<a href="<?php echo $link;?>" target="_blank"><?php echo $vv['title'];?></a>
|
||||
<?php } ?>
|
||||
</th>
|
||||
<th class="text-center"><?php echo date("Y-m-d H:i",strtotime($vv['add_time']));?></th>
|
||||
<td class="text-center"><?php echo array_switch(array('-1' => '<span class="label label-danger">删除</span>', '0' => '<span class="label label-success">待审核</span>', '1' => '<span class="label label-info">已审核</span>'),$vv['stat']);?></td>
|
||||
<td class="text-center">
|
||||
<a class="btn btn-xs btn-info" href="<?php echo url('/admin/remark/view',['id'=>$vv['id']]);?>">查看</a>
|
||||
<a class="btn btn-xs btn-info" data-id="<?php echo $vv['id'];?>" data-url="<?php echo url('/admin/remark/delete');?>" data-cod="dowarn">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/volist}
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- /.table -->
|
||||
</div>
|
||||
|
||||
<!-- /.lists-table -->
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
<div class="box-footer no-padding">
|
||||
<div class="mailbox-controls row">
|
||||
<div class="col-sm-6">
|
||||
<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/remark/deletes');?>" data-cod="batch">删除</button>
|
||||
<button type="button" class="btn btn-default btn-sm" data-cod="refresh">刷新</button>
|
||||
</div>
|
||||
<!-- /.btn-group -->
|
||||
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="pull-right">
|
||||
{$page}
|
||||
</div>
|
||||
<!-- /.pull-right -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box -->
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<style>
|
||||
.table-responsive .table tbody > tr > th,.table-responsive .table thead > tr > td, .table-responsive .table tbody > tr > td {
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<!-- Page Script -->
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
});
|
||||
</script>
|
||||
135
app/admin/view/remark/view.html
Executable file
135
app/admin/view/remark/view.html
Executable file
@@ -0,0 +1,135 @@
|
||||
<!-- 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/remark/lists');?>"> 文章留言列表</a></li>
|
||||
<li class="active"> 查看文章留言</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabfirst"> 查看文章留言</a>
|
||||
</li>
|
||||
<li class="pull-right"><a href="" class="text-muted"><i class="fa fa-refresh"></i></a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane active" id="tabfirst">
|
||||
<form class="form-horizontal" action="<?php echo url('/admin/remark/updaate');?>" method="post">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">留言人<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5"style="margin-top:8px;">
|
||||
{$data.name}
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Name)</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email" class="col-sm-2 control-label">联系邮箱<em style="color:red;">*</em></label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">
|
||||
{$data.email}
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Email)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label for="content" class="col-sm-2 control-label">留言内容</label>
|
||||
<div class="col-sm-5" style="margin-top:8px;">
|
||||
{$data.content}
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<span class="help-block">(Comments)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if($data['stat']==0){?>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-6">
|
||||
<div class="col-sm-3">
|
||||
|
||||
<p><a class="btn btn-warning btn-block checkstat" data-id="<?php echo $data['id'];?>" data-url="<?php echo url('/admin/remark/update',['id'=>$data['id'],'stat'=>'-1']);?>" data-cod="-1">删除留言</a></p>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-3">
|
||||
<p><a class="btn btn-danger btn-block checkstat" data-id="<?php echo $data['id'];?>" data-url="<?php echo url('/admin/remark/update',['id'=>$data['id'],'stat'=>1]);?>" data-cod="1">审批通过</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<input type="hidden" name="id" value="<?php echo $data['id'];?>">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<!-- /.tab-content -->
|
||||
|
||||
</div>
|
||||
<!-- /.nav-tabs-custom -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<!-- /.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('title');
|
||||
if (isNull(nameObj.value)) {
|
||||
alert('名称必须填写');
|
||||
nameObj.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
var viewcountObj = document.getElementById('visit_count');
|
||||
if (isNaN(viewcountObj.value)) {
|
||||
alert('浏览数量值必须是数字');
|
||||
viewcountObj.focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$(".checkstat").click(function(){
|
||||
var stat = $(this).data('cod');
|
||||
var id = $(this).data('id');
|
||||
|
||||
$.ajax({
|
||||
url: "/admin/remark/update", // 提交到controller的url路径,在本页面就直接用?代替文件名即可,省略文件名,别的页面则需写全路径
|
||||
type: "post", // 提交方式
|
||||
data: {"id": id,"stat":stat}, // data为String类型,必须为 Key/Value 格式。
|
||||
dataType: "json", // 服务器端返回的数据类型
|
||||
success: function (data) { // 请求成功后的回调函数,其中的参数data为controller返回的map,也就是说,@ResponseBody将返回的map转化为JSON格式的数据,然后通过data这个参数取JSON数据中的值
|
||||
if(data.code == 1) {
|
||||
window.location.href = "/admin/remark/lists";
|
||||
}
|
||||
},
|
||||
});
|
||||
})
|
||||
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user