Ticket #267 修改了评审中元数据用户名显示

This commit is contained in:
Li Jianxuan 2011-12-01 02:24:37 +00:00
parent e9460be880
commit 74a7bbd2b0
2 changed files with 39 additions and 8 deletions

View File

@ -151,11 +151,12 @@ class ReviewController extends Zend_Controller_Action
$uuid = $this->_request->getParam('uuid'); $uuid = $this->_request->getParam('uuid');
$sql = "select r.id,r.uuid,r.userid,r.ts_created,u.realname,r.mdcomment,r.conclusion,ratt.reviewid from mdreview r $sql = "select r.id,r.uuid,r.userid,r.ts_created,u.username,r.mdcomment,r.conclusion,ratt.reviewid,exp.id as expid from mdreview r
left join users u on u.id=r.userid left join users u on u.id=r.userid
left join mdreviewattach ratt on r.id=ratt.reviewid left join mdreviewattach ratt on r.id=ratt.reviewid
left join mdexpertreview exp on r.uuid=exp.uuid
where r.uuid='$uuid' and r.status>-1 where r.uuid='$uuid' and r.status>-1
group by r.id,r.uuid,r.userid,r.ts_created,u.realname,r.mdcomment,r.conclusion,ratt.reviewid group by r.id,r.uuid,r.userid,r.ts_created,u.username,r.mdcomment,r.conclusion,ratt.reviewid,expid
order by r.id desc order by r.id desc
"; ";
@ -174,7 +175,15 @@ class ReviewController extends Zend_Controller_Action
$list.=' $list.='
<li> <li>
<div class="reviewitem"> <div class="reviewitem">
<div class="itemtitle">评审人:'.$v['realname'].'</div><div class="itemtime">'; <div class="itemtitle">评审人:';
if(empty($v['expid']))
{
$list .= $v['username'];
}else
{
$list.= '专家';
}
$list .= '</div><div class="itemtime">';
if($v['reviewid']!="") if($v['reviewid']!="")
{ {
$list.='[<a href="javascript:;" onclick="checkfiles(\''.$v['id'].'\')">查看评审附件</a>]&nbsp;&nbsp;'; $list.='[<a href="javascript:;" onclick="checkfiles(\''.$v['id'].'\')">查看评审附件</a>]&nbsp;&nbsp;';
@ -348,7 +357,7 @@ class ReviewController extends Zend_Controller_Action
@$mail=new WestdcMailer($this->view->config->smtp); @$mail=new WestdcMailer($this->view->config->smtp);
@$mail->setBodyText($body); @$mail->setBodyText($body);
@$mail->setFrom($this->view->config->service->email,'西部数据中心服务组'); @$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
if($data['is_expert']=='true') if(@$data['is_expert']=='true')
{ {
@$mail->addTo($email); //管理员邮箱 @$mail->addTo($email); //管理员邮箱
}else }else

View File

@ -243,6 +243,7 @@ endforeach;
<div id="gsearch"> <div id="gsearch">
<ul id="searchctrl"> <ul id="searchctrl">
<li><a href="javascript:;" class="googlesearch">Google搜索</a></li> <li><a href="javascript:;" class="googlesearch">Google搜索</a></li>
<li><a href="javascript:;" class="scholar">Google学术搜索</a></li>
<li><a href="javascript:;" class="bingsearch">BING搜索</a></li> <li><a href="javascript:;" class="bingsearch">BING搜索</a></li>
<li><a href="javascript:;" class="cnkiSearch">CNKI搜索</a></li> <li><a href="javascript:;" class="cnkiSearch">CNKI搜索</a></li>
</ul> </ul>
@ -434,6 +435,7 @@ function getSubFileList(uuid,id,depth){
$('.googlesearch').click(function(){googleSearch('<?php echo $ev;?>');}); $('.googlesearch').click(function(){googleSearch('<?php echo $ev;?>');});
$('.bingsearch').click(function(){bingSearch('<?php echo $ev;?>');}); $('.bingsearch').click(function(){bingSearch('<?php echo $ev;?>');});
$('.cnkiSearch').click(function(){cnkiSearch('<?php echo $ev;?>');}); $('.cnkiSearch').click(function(){cnkiSearch('<?php echo $ev;?>');});
$('.scholar')click(function(){});
function googleSearch(keyword){ function googleSearch(keyword){
$.ajax({type:"POST",url:"/service/googlesearch",data:'q='+keyword, $.ajax({type:"POST",url:"/service/googlesearch",data:'q='+keyword,
@ -455,6 +457,26 @@ function googleSearch(keyword){
}); });
} }
function scholarSearch(keyword){
$.ajax({type:"POST",url:"/service/scholarsearch",data:'q='+keyword,
success:function(html){
var items = [];
var obj = jQuery.parseJSON(html);
$.each(obj.responseData.results, function(key, val) {
var html = '<p><a href="' +val['unescapedUrl']+'">'+val['title']+'<a/></p><p><span>'
+val['url'].replace(/%(.*)/i,"") +'</span></p><p>'
+val['content']
+'</p>';
items.push('<li>' + html + '</li>');
});
items.push('<li class="more"><a href="'+obj.responseData.cursor.moreResultsUrl+'" target="_blank">查看更多搜索结果(约'+obj.responseData.cursor.estimatedResultCount+'条)</a></div>');
$('#searchlist').html(items.join(''));
$('html, body').animate({scrollTop:$('html').height()}, 'slow');
},
beforeSend:function(){$('#searchlist').html('<img src="/images/loading.gif" />结果加载中');}
});
}
function bingSearch(keyword){ function bingSearch(keyword){
$.ajax({type:"POST",url:"/service/bingsearch",data:'q='+keyword, $.ajax({type:"POST",url:"/service/bingsearch",data:'q='+keyword,
success:function(html){ success:function(html){