添加了已通过评审的逻辑判断

This commit is contained in:
Li Jianxuan 2011-10-18 08:15:32 +00:00
parent c61d177d18
commit 1f706e39b8
3 changed files with 16 additions and 3 deletions

View File

@ -313,8 +313,10 @@ class ReviewController extends Zend_Controller_Action
function reviewAction() {
$uuid = $this->_request->getParam('uuid');
$sql=$this->db->quoteInto("select m.id,m.uuid,m.title,m.description,m.title_en from metadata m where m.uuid=?",$uuid);
$this->view->metadata=$this->db->fetchRow($sql);
$sql=$this->db->quoteInto("select m.id,m.uuid,m.title,m.description,m.title_en,r.status from metadata m
left join mdstatus r on r.uuid=m.uuid
where m.uuid=?",$uuid);
$this->view->metadata = $md = $this->db->fetchRow($sql);
$auth = Zend_Auth::getInstance();
if($auth->hasIdentity())
{
@ -337,6 +339,12 @@ class ReviewController extends Zend_Controller_Action
$redirectlink='/review/review/uuid/'.$uuid.'/';
if($md['status']==5)
{
$this->messenger->addMessage('该数据已经通过评审,不能再发表评审意见,如需提交问题,请联系数据管理员');
$this->_redirect($redirectlink);
}
$auth = Zend_Auth::getInstance();
if($auth->hasIdentity())
{

View File

@ -35,6 +35,10 @@
{
if(empty($this->pms))
{
if($md['status']==5)
{
echo "该数据已经通过评审";
}else{
?>
<a href="javascript:void(0)" onclick="$('.form').slideToggle(1000)">我要发布评审意见</a>
<div class="form" style="display:none;">
@ -71,6 +75,7 @@
</form>
</div>
<?php
}
}else
{
echo "您已经对此数据作出过评审";

View File

@ -44,7 +44,7 @@ setTimeout("document.getElementsByClassName('box-info').remove(0)",5000);
foreach ($this->paginator as $item):
$autoindex++;?>
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
<td> <img src="/images/westdc_20w.gif" /> <a href="<?php echo $item['uuid'];?>"><?php echo $item['title'];?></a></td>
<td> <img src="/images/westdc_20w.gif" /> <a href="/review/review/uuid/<?php echo $item['uuid'];?>"><?php echo $item['title'];?></a></td>
<td>
<?php echo date("Y-m-d",strtotime($item['ts_created']));?>
</td>