修改了视图,调整页面结构,在myreview中增加了status字段调用

This commit is contained in:
Li Jianxuan 2011-10-25 04:00:40 +00:00
parent 961d6fab1b
commit c58ed107b9
3 changed files with 92 additions and 77 deletions

View File

@ -63,6 +63,11 @@ class ReviewController extends Zend_Controller_Action
$rs = $this->db->query($sql); $rs = $this->db->query($sql);
$rows = $rs->fetchAll(); $rows = $rs->fetchAll();
foreach($rows as $k=>$v)
{
$rows[$k]['status']=$this->rewiterstatus($v['status']);
}
$paginator = Zend_Paginator::factory($rows); $paginator = Zend_Paginator::factory($rows);
$paginator->setCurrentPageNumber($this->_getParam('page')); $paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage($this->view->config->page->max); $paginator->setItemCountPerPage($this->view->config->page->max);

View File

@ -1,54 +1,54 @@
<?php <?php
$config = Zend_Registry::get('config'); $config = Zend_Registry::get('config');
$this->headTitle($config->title->site); $this->headTitle($config->title->site);
$this->headTitle($config->title->mdreview); $this->headTitle($config->title->mdreview);
$this->headTitle()->setSeparator(' - '); $this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/mdreview.css'); $this->headLink()->appendStylesheet('/css/mdreview.css');
$this->breadcrumb('<a href="/">首页</a>'); $this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/review">元数据评审</a>'); $this->breadcrumb('<a href="/review">元数据评审</a>');
$this->breadcrumb()->setSeparator(' > '); $this->breadcrumb()->setSeparator(' > ');
?> ?>
<div id='rightPanel'> <div id='indexbody'>
<h3>目前系统中专家库为<?php echo $this->stat['experts']; ?>人,新投稿元数据<?php echo $this->stat['draft']; ?>条,已接收元数据<?php echo $this->stat['accept']; ?>条,有<?php echo $this->stat['inreview']; ?>条元数据正在评审中,已完成评审元数据<?php echo $this->stat['reviewed']; ?>条,有<?php echo $this->stat['openreviewuser']; ?>个用户参与了<?php echo $this->stat['openreview']; ?>次评审。 <a href="/review/myreview">我参审的元数据</a></h3> <h3>目前系统中专家库为<?php echo $this->stat['experts']; ?>人,新投稿元数据<?php echo $this->stat['draft']; ?>条,已接收元数据<?php echo $this->stat['accept']; ?>条,有<?php echo $this->stat['inreview']; ?>条元数据正在评审中,已完成评审元数据<?php echo $this->stat['reviewed']; ?>条,有<?php echo $this->stat['openreviewuser']; ?>个用户参与了<?php echo $this->stat['openreview']; ?>次评审。 <a href="/review/myreview">我参审的元数据</a></h3>
<?php if ($this->mdreceived) : ?> <?php if ($this->mdreceived) : ?>
<ul> <ul>
<div class="title"><a href="/review/draft">元数据:最新收稿</a></div> <div class="title"><a href="/review/draft">元数据:最新收稿</a></div>
<?php foreach($this->mdreceived as $md) : ?> <?php foreach($this->mdreceived as $md) : ?>
<div class="mditem"> <div class="mditem">
<li> <img src="/images/westdc_20w.gif" /> <?php echo $this->escape($md['title']);?>(收稿时间:<?php echo $md['ts_created'];?></li> <li> <img src="/images/westdc_20w.gif" /> <?php echo $this->escape($md['title']);?>(收稿时间:<?php echo $md['ts_created'];?></li>
</div> </div>
<?php endforeach; ?> <?php endforeach; ?>
<li class="more"><a href="/review/draft">更多>></a></li> <li class="more"><a href="/review/draft">更多>></a></li>
</ul> </ul>
<?php endif; if ($this->mdaccepted) : ?> <?php endif; if ($this->mdaccepted) : ?>
<ul> <ul>
<div class="title"><a href="/review/accept">元数据:已接收</a></div> <div class="title"><a href="/review/accept">元数据:已接收</a></div>
<?php foreach($this->mdaccepted as $md) : ?> <?php foreach($this->mdaccepted as $md) : ?>
<div class="mditem"> <div class="mditem">
<li> <img src="/images/westdc_20w.gif" /> <?php echo $this->escape($md['title']);?> [<a href="/review/review/uuid/<?php echo $md['uuid'];?>">评审</a> <a href="/data/<?php echo $md['uuid'];?>">查看</a>]</li> <li> <img src="/images/westdc_20w.gif" /> <?php echo $this->escape($md['title']);?> [<a href="/review/review/uuid/<?php echo $md['uuid'];?>">评审</a> <a href="/data/<?php echo $md['uuid'];?>">查看</a>]</li>
</div> </div>
<?php endforeach; ?> <?php endforeach; ?>
<li class="more"><a href="/review/accept">更多>></a></li> <li class="more"><a href="/review/accept">更多>></a></li>
</ul> </ul>
<?php endif; if ($this->mdinreview) : ?> <?php endif; if ($this->mdinreview) : ?>
<ul> <ul>
<div class="title"><a href="/review/inreview">元数据:送审中</a></div> <div class="title"><a href="/review/inreview">元数据:送审中</a></div>
<?php foreach($this->mdinreview as $md) : ?> <?php foreach($this->mdinreview as $md) : ?>
<div class="mditem"> <div class="mditem">
<li> <img src="/images/westdc_20w.gif" /> <?php echo $this->escape($md['title']);?> [<a href="/review/review/uuid/<?php echo $md['uuid'];?>">评审</a> <a href="/data/<?php echo $md['uuid'];?>">查看</a>]</li> <li> <img src="/images/westdc_20w.gif" /> <?php echo $this->escape($md['title']);?> [<a href="/review/review/uuid/<?php echo $md['uuid'];?>">评审</a> <a href="/data/<?php echo $md['uuid'];?>">查看</a>]</li>
</div> </div>
<?php endforeach; ?> <?php endforeach; ?>
<li class="more"><a href="/review/inreview">更多>></a></li> <li class="more"><a href="/review/inreview">更多>></a></li>
</ul> </ul>
<?php endif; if ($this->mdreviewed) : ?> <?php endif; if ($this->mdreviewed) : ?>
<ul> <ul>
<div class="title"><a href="/review/reviewed">元数据:最新完成评审</a></div> <div class="title"><a href="/review/reviewed">元数据:最新完成评审</a></div>
<?php foreach($this->mdreviewed as $md) : ?> <?php foreach($this->mdreviewed as $md) : ?>
<div class="mditem"> <div class="mditem">
<li> <img src="/images/westdc_20w.gif" /> <a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a> </li> <li> <img src="/images/westdc_20w.gif" /> <a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a> </li>
</div> </div>
<?php endforeach; ?> <?php endforeach; ?>
<li class="more"><a href="/review/reviewed">更多>></a></li> <li class="more"><a href="/review/reviewed">更多>></a></li>
</ul> </ul>
<?php endif; ?> <?php endif; ?>
</div> </div>

View File

@ -4,11 +4,13 @@ $this->headTitle($config->title->site);
$this->headTitle($config->title->mdreview); $this->headTitle($config->title->mdreview);
$this->headTitle()->setSeparator(' - '); $this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/mdreview.css'); $this->headLink()->appendStylesheet('/css/mdreview.css');
$this->headScript()->appendFile('/js/jquery-1.6.4.min.js');
$this->headScript()->appendFile('/js/jquery.masonry.min.js');
$this->breadcrumb('<a href="/">首页</a>'); $this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/review">元数据评审</a>'); $this->breadcrumb('<a href="/review">元数据评审</a>');
$this->breadcrumb()->setSeparator(' > '); $this->breadcrumb()->setSeparator(' > ');
?> ?>
<div id='rightPanel'> <div id='myreview'>
<?php if ($this->msg or $this->messages) :?> <?php if ($this->msg or $this->messages) :?>
<div class="box box-info"> <div class="box box-info">
@ -30,28 +32,36 @@ setTimeout("document.getElementsByClassName('box-info').remove(0)",5000);
<input type="hidden" name="search" value="1" /> <input type="hidden" name="search" value="1" />
<input type="submit" class="btn" value="搜索" /></form> <input type="submit" class="btn" value="搜索" /></form>
<table class="stylized"> <div class="wapper">
<thead> <?php if (count($this->paginator)): ?>
<tr> <ul id="container" style="width:100%">
<th>元数据标题</th> <?php foreach ($this->paginator as $item): ?>
<th>操作</th> <li class="items">
</tr> <img class="thumb" src="/data/thumb/id/<?php echo $item['id'];?>" width="180" />
</thead> <a href="<?php echo $item['uuid'];?>"><?php echo $item['title'];?></a>
<tbody> <br />状态:<?php echo $item['status'];?>
<?php <br /><a href="/review/review/uuid/<?php echo $item['uuid'];?>">查看评审页</a>
if (count($this->paginator)): </li>
$autoindex=0; <?php endforeach;?>
foreach ($this->paginator as $item): </ul>
$autoindex++;?> <?php endif; ?>
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>"> </div>
<td> <img src="/images/westdc_20w.gif" /> <a href="<?php echo $item['uuid'];?>"><?php echo $item['title'];?></a></td>
<td>
<a href="/review/review/uuid/<?php echo $item['uuid'];?>">查看评审页</a>
</td>
</tr>
<?php endforeach; endif; ?>
</tbody>
</table>
<div class="pagenavi"><?= $this->paginator; ?></div> <div class="pagenavi"><?= $this->paginator; ?></div>
</div> </div>
<script>
function loadmasonry(){
em = document.getElementsByClassName('thumb');
for(var i=em.length-1;i>=0;i--){
var p = em[i];
if(p.width < 1)
{
var timer = setTimeout("loadmasonry()",100);
return false;
}
}
$('#container').masonry({itemSelector: '.items',columnWidth : 210 });
}
loadmasonry();
$(".items").mouseover(function(){$(this).addClass("hover")}).mouseout(function(){$(this).removeClass("hover")})
</script>