2012-03-21 04:00:00 +00:00
|
|
|
|
<?php
|
|
|
|
|
$this->headTitle($this->config->title->site);
|
|
|
|
|
$this->headTitle($this->config->title->author);
|
|
|
|
|
$this->headTitle()->setSeparator(' - ');
|
|
|
|
|
$this->headLink()->appendStylesheet('/css/author.css');
|
2013-03-27 09:06:23 +00:00
|
|
|
|
$this->theme->AppendPlus($this,'colorbox');
|
2012-03-21 04:00:00 +00:00
|
|
|
|
$this->breadcrumb('<a href="/">首页</a>');
|
|
|
|
|
$this->breadcrumb('<a href="/author">数据作者</a>');
|
|
|
|
|
$this->breadcrumb('数据反馈管理');
|
|
|
|
|
$this->breadcrumb()->setSeparator(' > ');
|
|
|
|
|
?>
|
2013-03-27 09:06:23 +00:00
|
|
|
|
<div class="row">
|
|
|
|
|
<div class="span3">
|
|
|
|
|
<?= $this->partial('author/navi.phtml'); ?>
|
2012-03-21 04:00:00 +00:00
|
|
|
|
</div>
|
2013-03-27 09:06:23 +00:00
|
|
|
|
<div class="span9">
|
|
|
|
|
<div>
|
|
|
|
|
<ul class="nav nav-pills">
|
|
|
|
|
<li class="active"><a href="/author/comment">元数据反馈概况</a></li>
|
|
|
|
|
<li class=""><a href="/author/comment/ac/listall">所有元数据反馈</a></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<?php
|
|
|
|
|
if (count($this->paginator)):
|
|
|
|
|
echo "<h3>数据标题:".$this->mdtitle."</h3>";
|
|
|
|
|
echo '<ul class="unstyled">';
|
|
|
|
|
$autoindex=0;
|
|
|
|
|
foreach ($this->paginator as $item):
|
|
|
|
|
$autoindex++;?>
|
|
|
|
|
<li class="well">
|
|
|
|
|
<p>评论者:<?php echo $item['author'] ?> (<?php echo $item['email'];?>) 评论时间:<?php echo date("Y-m-d H:i",strtotime($item['ts_created']));?> <a href="javascript:;" onclick="showreply(<?= $item['id']; ?>)">回复</a></p>
|
|
|
|
|
<p style="display:none;vertical-align:bottom" id="comment_reply_<?= $item['id']; ?>">
|
|
|
|
|
<textarea id="reply_<?= $item['id']; ?>" class="span7"></textarea>
|
|
|
|
|
<button type="button" onclick="reply(<?= $item['id']; ?>,'<?= $item['uuid']; ?>')" class="btn" style="vertical-align:bottom">提交</button>
|
|
|
|
|
<div style="width:90%; margin:0 auto;">
|
|
|
|
|
<ul id="replyList_<?= $item['id']; ?>">
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</p>
|
|
|
|
|
<p> <?php echo $item['content'] ?></p>
|
|
|
|
|
</li>
|
|
|
|
|
<?php endforeach;
|
|
|
|
|
echo "</ul>";
|
|
|
|
|
endif; ?>
|
|
|
|
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
|
|
|
|
</div>
|
2012-03-21 04:00:00 +00:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- //页面内容 -->
|
|
|
|
|
<script>
|
2012-09-19 07:39:04 +00:00
|
|
|
|
function reply(id,uuid)
|
|
|
|
|
{
|
|
|
|
|
$.ajax({
|
|
|
|
|
'type':"POST",
|
|
|
|
|
'url':'/author/comment/reply/'+id,
|
|
|
|
|
'data':'content='+$('#reply_'+id).val()+'&uuid='+uuid,
|
|
|
|
|
'success':function(data){
|
|
|
|
|
if (typeof(data)=='object')
|
|
|
|
|
{
|
|
|
|
|
if(typeof(data.error)!='undefined')
|
|
|
|
|
{Alert(data.error);return false;}
|
|
|
|
|
if(typeof(data.msg)!='undefined')
|
|
|
|
|
{Alert(data.msg);}
|
|
|
|
|
if(typeof(data.status)!='undefined')
|
|
|
|
|
{$('#comment_reply_'+id).slideToggle();}
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
Alert('服务器响应出错,请重试');
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
'timeout': 30000,
|
|
|
|
|
'error': function(){
|
|
|
|
|
Alert('出现错误,请稍后再试');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
function showreply(id){
|
|
|
|
|
$('#comment_reply_'+id).slideToggle("slow", function () {
|
|
|
|
|
if($('#comment_reply_'+id).css('display')!='none')
|
|
|
|
|
{
|
|
|
|
|
$.ajax({
|
|
|
|
|
'type':"POST",
|
|
|
|
|
'url':'/author/comment/replylist/'+id,
|
|
|
|
|
'data':'',
|
|
|
|
|
'success':function(data){
|
|
|
|
|
if (typeof(data)=='object')
|
|
|
|
|
{
|
|
|
|
|
var html=new Array();
|
|
|
|
|
for(i in data)
|
|
|
|
|
{
|
|
|
|
|
html.push('<li id="subReplyList_'+data[i].id+'">'+data[i].body+ '</li>');
|
|
|
|
|
}
|
|
|
|
|
html = html.join('');
|
|
|
|
|
$('#replyList_'+id).html(html);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
'timeout': 30000,
|
|
|
|
|
});
|
|
|
|
|
}else{
|
|
|
|
|
$('#replyList_'+id).html('');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
function Alert(html){
|
|
|
|
|
$.colorbox({'innerWidth':'50%','html':'<h4 style="font-size:16px;font-weight:bold;">'+html+'</h4>'});
|
|
|
|
|
}
|
2012-03-21 04:00:00 +00:00
|
|
|
|
</script>
|