增加了元数据评审的首页
This commit is contained in:
parent
1c1c6dea61
commit
865e864f9e
|
@ -14,9 +14,59 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
}
|
||||
function indexAction()
|
||||
{
|
||||
$sql = "select m.id,md.title,u.username,u.realname,m.status from mdstatus m
|
||||
left join metadata md on md.uuid=m.uuid
|
||||
left join users u on u.id=m.userid
|
||||
order by m.id desc limit 10 ";
|
||||
$re = $this->db->query($sql);
|
||||
$queue = $re->fetchAll();
|
||||
|
||||
foreach ($queue as $k=>$v)
|
||||
{
|
||||
$queue[$k]['status']=$this->rewiterstatus($v['status']);
|
||||
}
|
||||
|
||||
$this->view->queue = $queue;
|
||||
|
||||
|
||||
$auth = Zend_Auth::getInstance();
|
||||
if($auth->hasIdentity())
|
||||
{
|
||||
$user = $auth->getIdentity();
|
||||
$userid = $user->id;
|
||||
}
|
||||
|
||||
$sql = "select m.id,md.title,u.username,u.realname,m.status from mdstatus m
|
||||
left join metadata md on md.uuid=m.uuid
|
||||
left join users u on u.id=m.userid
|
||||
where u.id='$userid'";
|
||||
|
||||
$re = $this->db->query($sql);
|
||||
$rows = $re->fetchAll();
|
||||
|
||||
$this->view->my = $rows;
|
||||
|
||||
|
||||
}//indexAction
|
||||
|
||||
function rewiterstatus($status){
|
||||
if($status==-1)
|
||||
{return "取消评审";}
|
||||
else if($status==0)
|
||||
{return "初始状态";}
|
||||
else if($status==1)
|
||||
{return "接受元数据评审";}
|
||||
else if($status==2)
|
||||
{return "开始邀请专家";}
|
||||
else if($status==3)
|
||||
{return "专家接受邀请";}
|
||||
else if($status==4)
|
||||
{return "专家反馈";}
|
||||
else if($status==5)
|
||||
{return "已发布";}
|
||||
else
|
||||
{return "";}
|
||||
}
|
||||
|
||||
/**
|
||||
*changestatus
|
||||
|
|
|
@ -24,6 +24,47 @@
|
|||
<?php endif; ?>
|
||||
|
||||
|
||||
<div id="rightPanel">
|
||||
|
||||
最近十条元数据
|
||||
<table>
|
||||
<tr style="color:#FFF;background:#0a3e68;line-height:30px;">
|
||||
<td width='500'>元数据标题</td>
|
||||
<td width='150'>管理员</td>
|
||||
<td width='150'>状态</td>
|
||||
</tr>
|
||||
<?php if (count($this->queue)): ?>
|
||||
<?php $autoindex=0;?>
|
||||
<?php foreach ($this->queue as $item): ?>
|
||||
<?php $autoindex++;?>
|
||||
<tr <?php if($autoindex%2 == 0) echo 'bgcolor="#CCCCCC"'; else echo 'bgcolor="#FFFFFF"'; ?>>
|
||||
<td><?= $item['title']?></td>
|
||||
<td><?php echo $item['realname'].'['.$item['username'].']';?></td>
|
||||
<td><?php echo $item['status'];?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<br />
|
||||
我管理的最近十条元数据
|
||||
<table>
|
||||
<tr style="color:#FFF;background:#0a3e68;line-height:30px;">
|
||||
<td width='500'>元数据标题</td>
|
||||
<td width='150'>状态</td>
|
||||
</tr>
|
||||
<?php if (count($this->queue)): ?>
|
||||
<?php $autoindex=0;?>
|
||||
<?php foreach ($this->queue as $item): ?>
|
||||
<?php $autoindex++;?>
|
||||
<tr <?php if($autoindex%2 == 0) echo 'bgcolor="#CCCCCC"'; else echo 'bgcolor="#FFFFFF"'; ?>>
|
||||
<td><?= $item['title']?></td>
|
||||
<td><?php echo $item['status'];?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in New Issue