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

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

View File

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

View File

@ -44,7 +44,7 @@ setTimeout("document.getElementsByClassName('box-info').remove(0)",5000);
foreach ($this->paginator as $item): foreach ($this->paginator as $item):
$autoindex++;?> $autoindex++;?>
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>"> <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> <td>
<?php echo date("Y-m-d",strtotime($item['ts_created']));?> <?php echo date("Y-m-d",strtotime($item['ts_created']));?>
</td> </td>