Ticket #183 增加了将元数据放入评审的功能

This commit is contained in:
Li Jianxuan 2011-09-29 09:31:10 +00:00
parent a97d92402b
commit d848f9cd72
3 changed files with 66 additions and 18 deletions

View File

@ -22,6 +22,43 @@ class Admin_ReviewController extends Zend_Controller_Action
}//acceptAction 待评审的元数据
function addonAction(){
$uuid=$this->_request->getParam('uuid');
$sql = "select * from mdstatus where uuid='$uuid'";
$re = $this->db->query($sql);
$row = $re->fetch();
if(empty($row['id']))
{
$auth = Zend_Auth::getInstance();
if($auth->hasIdentity())
{
$user = $auth->getIdentity();
$userid = $user->id;
$sql = "insert into mdstatus (uuid,userid,ts_scheduled) values ('$uuid','$userid','".date("Y-m-d H:i:s")."')";
try{
if($this->db->exec($sql)>0)
{
$this->messenger->addMessage('操作成功!该数据已放入评审');
$this->_redirect("/admin/review");
}
}catch( Exception $e){
$this->messenger->addMessage('操作失败:'.$e->getMessage());
$this->_redirect("/admin/review");
}
}
}
else
{
$this->messenger->addMessage('该数据已放入评审');
$this->_redirect("/admin/data/md");
}
}
function expertsAction()
{

View File

@ -44,7 +44,7 @@
,查看:<?= $item['viewed']; ?>次。 操作:
<a href="<?= $this->config->geonetwork->url; ?>srv/cn/metadata.edit?id=<?= $item['gid']; ?>" target="_blank">编辑</a>
<a href="/admin/data/md/delete/<?= $item['id']; ?>">删除</a>
<a href="/admin/data/sync/uuid/<?= $item['uuid']; ?>">同步</a> <a href="/admin/data/md/att/1/uuid/<?php echo $item['uuid'];?>">附件管理</a></li>
<a href="/admin/data/sync/uuid/<?= $item['uuid']; ?>">同步</a> <a href="/admin/data/md/att/1/uuid/<?php echo $item['uuid'];?>">附件管理</a> <a href="/admin/review/addon/uuid/<?php echo $item['uuid'];?>">放入元数据评审</a></li>
<li>数据贡献者:<?= $item['author']; ?></li>
<li><?= $item['description']; ?></li>
</ul>

View File

@ -13,6 +13,17 @@
<?= $this->partial('review/left.phtml'); ?>
</div>
<div id="rightPanel">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
<p><?php echo $msg; ?></p>
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
</div>
</div>