修改了视图,调整页面结构,在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

@ -8,7 +8,7 @@ $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>

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>