数据评审中增加了等待我评审的和我评审过的元数据查看功能

This commit is contained in:
Li Jianxuan 2013-07-08 10:15:39 +00:00
parent ff27b69a51
commit 68d6f6a0bd
4 changed files with 172 additions and 16 deletions

View File

@ -123,6 +123,12 @@ class ReviewController extends Zend_Controller_Action
* mdstatus status 字段值为 2,3,4 的元数据为正在进行评审的元数据 * mdstatus status 字段值为 2,3,4 的元数据为正在进行评审的元数据
*/ */
function inreviewAction(){ function inreviewAction(){
include_once("helper/view.php");
$ac = $this->_getParam('ac');
if(empty($ac))
{
$this->view->pageID = "review-inreview"; $this->view->pageID = "review-inreview";
$page=@(int)$this->_request->getParam('page'); $page=@(int)$this->_request->getParam('page');
if (empty($page)) $page=1; if (empty($page)) $page=1;
@ -132,6 +138,46 @@ class ReviewController extends Zend_Controller_Action
$sql="select m.uuid,m.title,m.id,m.description,s.status,s.ts_accepted,g.id as gid,t.filename from mdstatus s right join normalmetadata m on s.uuid=m.uuid left join geonetworkmetadata g on g.uuid=m.uuid left join thumbnail t on t.id=m.id where s.status in (2,3,4) order by s.ts_created desc,m.title limit ? offset ?"; $sql="select m.uuid,m.title,m.id,m.description,s.status,s.ts_accepted,g.id as gid,t.filename from mdstatus s right join normalmetadata m on s.uuid=m.uuid left join geonetworkmetadata g on g.uuid=m.uuid left join thumbnail t on t.id=m.id where s.status in (2,3,4) order by s.ts_created desc,m.title limit ? offset ?";
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset)); $this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page = new Pagination($sum,$page,$this->limit); $this->view->page = new Pagination($sum,$page,$this->limit);
}
if($ac == "require")
{
$this->_helper->viewRenderer('inreview-require');
$this->view->pageID = "review-inreview-require";
$uid = view::User('id');
$sql = "select m.uuid,m.title,m.id,m.description,s.status,s.ts_accepted,g.id as gid,t.filename,r.ts_created,r.id,e.id as eid
from mdstatus s
right join normalmetadata m on s.uuid=m.uuid
left join geonetworkmetadata g on g.uuid=m.uuid
left join thumbnail t on t.id=m.id
left join mdreview r ON m.uuid=r.uuid
left join mdexpertreview e ON (e.id = s.userid AND e.uuid=m.uuid)
WHERE s.status in (2,3,4) AND s.userid=8018 AND r.id IS NULL
GROUP BY m.uuid,m.title,m.id,m.description,s.status,s.ts_accepted,g.id,t.filename,s.ts_created,r.ts_created,r.id,e.id
order by e.id DESC,s.ts_created desc,m.title";
$rs = $this->db->query($sql);
view::addPaginator($rs->fetchAll(),$this,NULL,$this->limit);
}
if($ac == "reviewed")
{
$this->_helper->viewRenderer('inreview-reviewed');
$this->view->pageID = "review-inreview-reviewed";
$uid = view::User('id');
$sql = "select m.uuid,m.title,m.id,m.description,s.status,s.ts_accepted,g.id as gid,t.filename,r.ts_created
from mdstatus s
right join normalmetadata m on s.uuid=m.uuid
left join geonetworkmetadata g on g.uuid=m.uuid
left join thumbnail t on t.id=m.id
left join mdreview r ON m.uuid=r.uuid
WHERE s.status in (2,3,4) AND s.userid=8018 AND r.userid=8018
GROUP BY m.uuid,m.title,m.id,m.description,s.status,s.ts_accepted,g.id,t.filename,s.ts_created,r.ts_created
order by s.ts_created desc,m.title";
$rs = $this->db->query($sql);
view::addPaginator($rs->fetchAll(),$this,NULL,$this->limit);
}
}//在审阶段的元数据 }//在审阶段的元数据

View File

@ -0,0 +1,53 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->review);
$this->headTitle('在审元数据');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/mdreview.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/review">'.$this->config->title->review.'</a>');
$this->breadcrumb('在审元数据');
$this->breadcrumb()->setSeparator(' > ');
?>
<style>
table thead tr th {background:#EBF2F6;}
</style>
<div class="row">
<div class="span3">
<?= $this->partial('review/navi.phtml'); ?>
</div>
<div class="span9">
<?php if (count($this->paginator)): ?>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>名称</th>
<th>接收时间</th>
<th width="70">操作</th>
</tr>
</thead>
<tbody>
<?php $autoindex=0;
foreach ($this->paginator as $item):
$autoindex++;?>
<tr>
<td><a href="/review/review/uuid/<?= $item['uuid'] ?>"><?= $item['title'] ?></a><?= empty($item['eid']) ? "":"[受邀评审]"?></td>
<td><?= date("Y-m-d",strtotime($item['ts_accepted'])) ?></td>
<td>
<a href="/review/review/uuid/<?= $item['uuid']?>">评审</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php else: ?>
<?php if(!empty($this->md)) { ?>
暂无数据,点击标题右侧添加按钮为此数据添加项目
<?php }else{ ?>
暂无数据
<?php } ?>
<?php endif; ?>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>
</div>

View File

@ -0,0 +1,55 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->review);
$this->headTitle('在审元数据');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/mdreview.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/review">'.$this->config->title->review.'</a>');
$this->breadcrumb('在审元数据');
$this->breadcrumb()->setSeparator(' > ');
?>
<style>
table thead tr th {background:#EBF2F6;}
</style>
<div class="row">
<div class="span3">
<?= $this->partial('review/navi.phtml'); ?>
</div>
<div class="span9">
<?php if (count($this->paginator)): ?>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>名称</th>
<th>接收时间</th>
<th>评审时间</th>
<th width="70">操作</th>
</tr>
</thead>
<tbody>
<?php $autoindex=0;
foreach ($this->paginator as $item):
$autoindex++;?>
<tr>
<td><a href="/review/review/uuid/<?= $item['uuid'] ?>"><?= $item['title'] ?></a></td>
<td><?= date("Y-m-d",strtotime($item['ts_accepted'])) ?></td>
<td><?= date("Y-m-d",strtotime($item['ts_created'])) ?></td>
<td>
<a href="/review/review/uuid/<?= $item['uuid']?>">查看</a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php else: ?>
<?php if(!empty($this->md)) { ?>
暂无数据,点击标题右侧添加按钮为此数据添加项目
<?php }else{ ?>
暂无数据
<?php } ?>
<?php endif; ?>
<div class="pagenavi"><?= $this->paginator; ?></div>
</div>
</div>
</div>

View File

@ -3,7 +3,9 @@
<li id="Nav-review-myreview"><a href="/review/myreview"><i class="icon-chevron-right"></i>我参审的元数据</a></li> <li id="Nav-review-myreview"><a href="/review/myreview"><i class="icon-chevron-right"></i>我参审的元数据</a></li>
<li id="Nav-review-draft"><a href="/review/draft"><i class="icon-chevron-right"></i>投稿元数据</a></li> <li id="Nav-review-draft"><a href="/review/draft"><i class="icon-chevron-right"></i>投稿元数据</a></li>
<li id="Nav-review-accept"><a href="/review/accept"><i class="icon-chevron-right"></i>已接收元数据</a></li> <li id="Nav-review-accept"><a href="/review/accept"><i class="icon-chevron-right"></i>已接收元数据</a></li>
<li id="Nav-review-inreview"><a href="/review/inreview"><i class="icon-chevron-right"></i>评审中元数据</a></li> <li id="Nav-review-inreview-require"><a href="/review/inreview/ac/require"><i class="icon-chevron-right"></i>等待我评审的元数据</a></li>
<li id="Nav-review-inreview-reviewed"><a href="/review/inreview/ac/reviewed"><i class="icon-chevron-right"></i>我评审过的元数据</a></li>
<li id="Nav-review-inreview"><a href="/review/inreview"><i class="icon-chevron-right"></i>所有评审中元数据</a></li>
<li id="Nav-review-reviewed"><a href="/review/reviewed"><i class="icon-chevron-right"></i>已通过元数据</a></li> <li id="Nav-review-reviewed"><a href="/review/reviewed"><i class="icon-chevron-right"></i>已通过元数据</a></li>
<li id="Nav-review-help"><a href="/review/help"><i class="icon-chevron-right"></i>元数据评审说明</a></li> <li id="Nav-review-help"><a href="/review/help"><i class="icon-chevron-right"></i>元数据评审说明</a></li>
</ul> </ul>