westdc-zf1/application/admin/views/scripts/review/reply.phtml

79 lines
2.2 KiB
PHTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->headLink()->appendStylesheet('/css/author.css');
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('评审意见反馈');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id="leftPanel">
<?= $this->partial('review/left.phtml'); ?>
</div>
<div id="rightPanel">
<?php
if(!empty($this->msg))
{
?>
<div class="box box-error"><?= $this->msg;?></div>
<?php if(!empty($this->jump_url)) {?>
<script language="javascript">setTimeout("history.go(-1)",3000);</script>
<?php } ?>
<?php } else{?>
<?php if(empty($this->review))
{ echo "此数据尚无反馈信息";
}else{?>
<div id="datalist">
<ul>
<?php foreach($this->review as $v)
{?>
<li><?= empty($v['realname']) ? $v['username'] : $v['realname']?> <?= $v['mdcomment']?></li>
<?php }?>
</ul>
</div>
<button type="button" onclick="send()" id="submit" class="btn btn-green">反馈给元数据作者</button>
<script>
function send(){
var dom = "#submit";
var html = $(dom).html();
$.ajax({
'type':"POST",
'url':'/admin/review/reply/',
'data':'uuid=<?= $this->uuid?>&send=1',
'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.invited)!='undefined')
{$('#expert_name_'+id).val('');$('#expert_email_'+id).val('');}
}
else{
Alert('出现错误,请稍后再试');
}
},
'timeout': 30000,
'error': function(){
Alert('处理中出现错误,请刷新页面后重试');
},
'beforeSend':function(){
$(dom).html('<img src="/images/ajax-load-small.gif" />处理中...');
$(dom).attr("disabled","disabled")
},
'complete':function(){
$(dom).html(html);$(dom).removeAttr("disabled");dom = null;
}
});
}
</script>
<?php }?>
<?php } ?>
</div>