修改了后台元数据评审中发出反馈的的方式
This commit is contained in:
parent
f1ea306649
commit
326572d7c2
|
@ -2568,9 +2568,9 @@ class Admin_DataController extends Zend_Controller_Action
|
|||
|
||||
if(!empty($keywords))
|
||||
{
|
||||
$search=new Search($keywords);
|
||||
$search=new SimpleSearch($keywords);
|
||||
$where=$search->sql_expr(array("md.title"));
|
||||
$sql.=' and '.$where;
|
||||
$sql.=' and ('.$where.")";
|
||||
}
|
||||
|
||||
$sql .= "GROUP by md.id,md.title,md.uuid,md.ts_created
|
||||
|
@ -2816,7 +2816,7 @@ class Admin_DataController extends Zend_Controller_Action
|
|||
|
||||
if(!empty($keywords))
|
||||
{
|
||||
$search=new Search($keywords);
|
||||
$search=new SimpleSearch($keywords);
|
||||
$where=$search->sql_expr(array("md.title"));
|
||||
$sql.=' WHERE '.$where;
|
||||
}
|
||||
|
|
|
@ -5,13 +5,9 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
{
|
||||
$this->db=Zend_Registry::get('db');
|
||||
$this->view->config = Zend_Registry::get('config');
|
||||
$this->messenger=$this->_helper->getHelper('FlashMessenger');
|
||||
$this->view->messages = $this->messenger->getMessages();
|
||||
}
|
||||
|
||||
function postDispatch()
|
||||
{
|
||||
//$this->view->messages = $this->messenger->getMessages();
|
||||
$this->view->theme = new Theme();
|
||||
$this->_helper->layout->setLayout('administry');
|
||||
$this->view->pageID = "review-".$this->_request->getActionName();
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -148,7 +144,7 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
if($cancel>0)
|
||||
{
|
||||
if($this->changestatus($cancel,-1))
|
||||
{
|
||||
{
|
||||
//update search document
|
||||
$search=new Search();
|
||||
//create search view in xunsearch
|
||||
|
@ -283,7 +279,7 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
}
|
||||
|
||||
$sql = "select m.id,md.title,m.status,m.uuid,u.username,u.realname from mdstatus m
|
||||
right join metadata md on md.uuid=m.uuid
|
||||
right join metadata md on md.uuid=m.uuid
|
||||
left join users u on u.id=m.userid
|
||||
where m.status in (2,3,4) $searchjoin order by m.ts_accepted desc";
|
||||
$rs = $this->db->query($sql);
|
||||
|
@ -752,17 +748,17 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
else $ids=$update;
|
||||
|
||||
if($this->changestatus($ids,1))
|
||||
{
|
||||
{
|
||||
//update search document
|
||||
$search=new Search();
|
||||
//create search view in xunsearch
|
||||
$sql="select * from xunsearch where uuid in (select uuid from mdstatus where id in (".$ids."))";
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute();
|
||||
while ($data = $sth->fetch())
|
||||
$sth->execute();
|
||||
while ($data = $sth->fetch())
|
||||
{
|
||||
$search->update($data);
|
||||
}
|
||||
$search->update($data);
|
||||
}
|
||||
|
||||
//仅对单条数据发送email信息,并且注册为数据作者
|
||||
if (is_numeric($ids))
|
||||
|
@ -1497,74 +1493,86 @@ class Admin_ReviewController extends Zend_Controller_Action
|
|||
function replyAction(){
|
||||
|
||||
$uuid = $this->_getParam('uuid');
|
||||
$send = $this->_getParam('send');
|
||||
$submit = $this->_getParam('submit');
|
||||
|
||||
include_once("helper/view.php");
|
||||
include_once("data/Review.php");
|
||||
include_once("data/Metadata.php");
|
||||
include_once("data/Author.php");
|
||||
|
||||
if(empty($uuid))
|
||||
{
|
||||
$jump_url = $this->view->jump_url = 'javascript:history.go(-1);';
|
||||
$this->view->msg = "参数错误,<a href='$jump_url'>如果页面没有跳转请点击这里</a>";
|
||||
view::Post($this,array('content'=>'参数错误','url' => -1));
|
||||
return true;
|
||||
}
|
||||
|
||||
$review = new Review($this->db);
|
||||
|
||||
$this->view->uuid = $uuid;
|
||||
|
||||
$sql = "SELECT mr.*,u.username,u.realname FROM mdreview mr
|
||||
LEFT JOIN users u ON mr.userid = u.id
|
||||
WHERE mr.uuid = '$uuid'";
|
||||
|
||||
$sth = $this->db->query($sql);
|
||||
$reviews = $sth->fetchAll();
|
||||
|
||||
$reviews = $review->getReviews($uuid);
|
||||
$this->view->review = $reviews;
|
||||
|
||||
if(!empty($send))
|
||||
$metadata = new Metadata($this->db);
|
||||
$this->view->md = $metadata->View($uuid);
|
||||
|
||||
$body = "元数据《".$this->view->md['title']."》的作者,您好:\r\n
|
||||
以下是您的元数据《".$this->view->md['title']."》的反馈信息。\r\n";
|
||||
|
||||
$body .= "--------------------------------------\r\n";
|
||||
if(!empty($reviews))
|
||||
foreach($reviews as $k=>$v)
|
||||
{
|
||||
$sql = "SELECT md.title,u.email FROM metadata md
|
||||
LEFT JOIN mdauthor a ON md.uuid=a.uuid
|
||||
WHERE md.uuid='$uuid'";
|
||||
$sth = $this->db->query($sql);
|
||||
$rows = $sth->fetchAll();
|
||||
$body .= $v['username'].":".$v['mdcomment']."\r\n";
|
||||
}
|
||||
else
|
||||
$body .= "\r\n\r\n\r\n";
|
||||
$body .= "--------------------------------------";
|
||||
$body .= "\r\n 西部数据中心服务组";
|
||||
|
||||
$emails = array();
|
||||
foreach($rows as $v);
|
||||
{
|
||||
if(!empty($v['email']))
|
||||
{
|
||||
$emails[] = $v['email'];
|
||||
}
|
||||
}
|
||||
$author = new Author($this->db);
|
||||
$emails = $author->getAuthor($uuid,'email');
|
||||
|
||||
if(count($emails)<1)
|
||||
{
|
||||
$email = "";
|
||||
}else{
|
||||
$email = join(";",$emails);
|
||||
}
|
||||
|
||||
if(count($emails)<1)
|
||||
{
|
||||
$jump_url = $this->view->jump_url = 'javascript:history.go(-1);';
|
||||
$this->view->msg = "该元数据未指派作者,<a href='$jump_url'>如果页面没有跳转请点击这里</a>";
|
||||
return true;
|
||||
}
|
||||
$data = array(
|
||||
'title'=>"您的元数据《".$this->view->md['title']."》有新的反馈",
|
||||
'content'=>$body,
|
||||
'email'=>$email
|
||||
|
||||
$title = $rows[0]['title'];
|
||||
|
||||
$this->_helper->layout->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender();
|
||||
|
||||
$body = "元数据《$title》的作者,您好:\r\n
|
||||
您的元数据《$title》有反馈信息。\r\n";
|
||||
|
||||
foreach($reviews as $k=>$v)
|
||||
{
|
||||
$body .= $v['username'].":".$v['mdcomment']."\r\n";
|
||||
}
|
||||
|
||||
$body .= "\r\n 西部数据中心服务组";
|
||||
);
|
||||
$this->view->data = $data;
|
||||
|
||||
if(!empty($submit))
|
||||
{
|
||||
$this->view->data['title'] = $title = $this->_getParam('title');
|
||||
$this->view->data['email'] = $email = $this->_getParam('email');
|
||||
$this->view->data['content'] = $cotent = $this->_getParam('content');
|
||||
|
||||
$emails = explode(";",$email);
|
||||
|
||||
$mail=new WestdcMailer($this->view->config->smtp);
|
||||
$mail->setBodyText($body);
|
||||
$mail->setBodyText($cotent);
|
||||
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
||||
foreach($emails as $v)
|
||||
{
|
||||
$mail->addTo($v);
|
||||
}
|
||||
$mail->setSubject("您的元数据《$title》有新的反馈");
|
||||
$mail->send();
|
||||
$mail->setSubject($title);
|
||||
|
||||
if($mail->send())
|
||||
{
|
||||
view::Post($this,array('content'=>'发送成功!','url'=>'/admin/review/reply/uuid/'.$uuid));
|
||||
return true;
|
||||
}else{
|
||||
$this->view->error = view::Error('邮件发送失败');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}//replyAction()
|
||||
|
|
|
@ -2,46 +2,44 @@
|
|||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle($this->config->title->author);
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->headScript()->appendFile('/js/jquery.colorbox-min.js');
|
||||
$this->headLink()->appendStylesheet('/css/author.css');
|
||||
$this->headLink()->appendStylesheet('/css/colorbox.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||
$this->breadcrumb('数据作者管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->theme->AppendPlus($this,"colorbox");
|
||||
?>
|
||||
<!-- 左侧导航 -->
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
<div class="row-fluid">
|
||||
<div class="span3">
|
||||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div class="span9">
|
||||
<div id="loading" class="info info-box"></div>
|
||||
<div id="datalist">
|
||||
<?php if(!empty($this->authors)) { ?>
|
||||
<h2><?php echo $this->authors[0]['title']; ?></h2>
|
||||
<span id="addauthor_<?php echo $this->authors[0]['id'];?>"><a href="javascript:;" onclick="AddAuthor(<?php echo $this->authors[0]['id']; ?>,'<?php echo $this->authors[0]['uuid']; ?>')">添加作者</a></span>
|
||||
<?php } else {?>
|
||||
<span id="addauthor_0"><a href="javascript:;" onclick="AddAuthor(0,'<?php echo $this->uuid; ?>')">添加作者</a></span>
|
||||
<?php } ?>
|
||||
<ul>
|
||||
<?php
|
||||
if(isset($this->authors))
|
||||
{
|
||||
foreach($this->authors as $v)
|
||||
{
|
||||
?>
|
||||
<li id="author_<?php echo $v['id'] ;?>">
|
||||
<p><?php echo $v['realname']; ?> [ <?php echo $v['username']; ?> ]</p>
|
||||
<p><span id="status_<?php echo $v['id'] ;?>"><?php if($v['status']==1) {echo "已认证";} if($v['status']==0) {echo "已申请";} if($v['status']==-1) {echo "已拒绝";} ?></span> |
|
||||
<a href="javascript:;" onclick="remove(<?php echo $v['id'] ;?>)">移除该作者</a>
|
||||
<span id="statusChange_<?php echo $v['id'] ;?>"><?php if($v['status']<1) {?> <a href="javascript:;" onclick="update(<?php echo $v['id'] ;?>)">认证该用户</a> <?php }?></span>
|
||||
</p>
|
||||
</li>
|
||||
<?php } } ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //左侧导航 -->
|
||||
|
||||
<!-- 页面内容 -->
|
||||
<div id="rightPanel">
|
||||
<div id="loading" class="info info-box"></div>
|
||||
<div id="datalist">
|
||||
<h2><?php echo $this->authors[0]['title']; ?></h2>
|
||||
<span id="addauthor_<?php echo $this->authors[0]['id'];?>"><a href="javascript:;" onclick="AddAuthor(<?php echo $this->authors[0]['id']; ?>,'<?php echo $this->authors[0]['uuid']; ?>')">添加作者</a></span>
|
||||
<ul>
|
||||
<?php
|
||||
if(isset($this->authors))
|
||||
{
|
||||
foreach($this->authors as $v)
|
||||
{
|
||||
?>
|
||||
<li id="author_<?php echo $v['id'] ;?>">
|
||||
<p><?php echo $v['realname']; ?> [ <?php echo $v['username']; ?> ]</p>
|
||||
<p><span id="status_<?php echo $v['id'] ;?>"><?php if($v['status']==1) {echo "已认证";} if($v['status']==0) {echo "已申请";} if($v['status']==-1) {echo "已拒绝";} ?></span> |
|
||||
<a href="javascript:;" onclick="remove(<?php echo $v['id'] ;?>)">移除该作者</a>
|
||||
<span id="statusChange_<?php echo $v['id'] ;?>"><?php if($v['status']<1) {?> <a href="javascript:;" onclick="update(<?php echo $v['id'] ;?>)">认证该用户</a> <?php }?></span>
|
||||
</p>
|
||||
</li>
|
||||
<?php } } ?>
|
||||
</ul></div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
||||
<script>
|
||||
function update(id){
|
||||
$.ajax({
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
<?php if(!empty($this->pageID)) {?>
|
||||
<script>$('#Nav-<?= $this->pageID?>').addClass("active");</script>
|
||||
<?php } ?>
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
$this->headTitle('寒区旱区科学数据中心');
|
||||
if(!empty($this->pageTitle))
|
||||
{
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headTitle($this->pageTitle);
|
||||
}
|
||||
?>
|
||||
<div class="row-fluit">
|
||||
<div class="hero-unit">
|
||||
<h2><?= $this->content ?><?php if(!empty($this->url)) echo ",系统正在为您跳转..."?></h2>
|
||||
<?php if(!empty($this->url)) {?>
|
||||
<?php if($this->url == -1) { ?>
|
||||
<a href="javascript:history.go(-1);">如果没有跳转请点击这样</a>
|
||||
<script language="javascript">setTimeout("history.go(-1)",3000);</script>
|
||||
<?php }else {?>
|
||||
<a href="<?= $this->url ?>">如果没有跳转请点击这样</a>
|
||||
<script language="javascript">setTimeout("self.location='<?= $this->url?>'",3000);</script>
|
||||
<?php } } ?>
|
||||
</div>
|
||||
</div>
|
|
@ -9,52 +9,54 @@
|
|||
$this->breadcrumb('元数据评审');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $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 class="search">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<label>搜索关键字</label><input type="text" name="keyword" class="q" value="<?php echo $this->keyword; ?>" />
|
||||
<input type="submit" class="btn" value="搜索" />
|
||||
</form>
|
||||
</div><!-- search DIV -->
|
||||
|
||||
<table class="stylized"><thead>
|
||||
<tr>
|
||||
<td width='600'>元数据标题</td>
|
||||
<td width='120'>负责编辑</td>
|
||||
<td width='120'>时间</td>
|
||||
<td width='180'>操作</td>
|
||||
</tr></thead>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<tbody id="list">
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
<tr>
|
||||
<td><a href="/data/<?php echo $item['uuid'];?>"><?= $item['title']?></a></td>
|
||||
<td><?php echo $item['realname'].'['.$item['username'].']'; ?></td>
|
||||
<td><?php echo date("Y-m-d H:i",strtotime($item['ts_accepted']));?></td>
|
||||
<td>
|
||||
<a href='/admin/review/accept/cancel/<?php echo $item['id'];?>' onclick="return confirm('是否确定取消评审')">取消评审</a>
|
||||
<a href='/admin/review/invite/?id=<?php echo $item['id'];?>'>邀请专家</a>
|
||||
<a href="/admin/review/changeadmin/?id=<?php echo $item['id'];?>">更改管理员</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
<div class="row-fluid">
|
||||
<div class="span3">
|
||||
<?= $this->partial('review/left.phtml'); ?>
|
||||
</div>
|
||||
<div class="span9">
|
||||
<?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 class="search">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<label>搜索关键字</label><input type="text" name="keyword" class="q" value="<?php echo $this->keyword; ?>" />
|
||||
<input type="submit" class="btn" value="搜索" />
|
||||
</form>
|
||||
</div><!-- search DIV -->
|
||||
|
||||
<table class="stylized"><thead>
|
||||
<tr>
|
||||
<td width='600'>元数据标题</td>
|
||||
<td width='120'>负责编辑</td>
|
||||
<td width='120'>时间</td>
|
||||
<td width='180'>操作</td>
|
||||
</tr></thead>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<tbody id="list">
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
<tr>
|
||||
<td><a href="/data/<?php echo $item['uuid'];?>"><?= $item['title']?></a></td>
|
||||
<td><?php echo $item['realname'].'['.$item['username'].']'; ?></td>
|
||||
<td><?php echo date("Y-m-d H:i",strtotime($item['ts_accepted']));?></td>
|
||||
<td>
|
||||
<a href='/admin/review/accept/cancel/<?php echo $item['id'];?>' onclick="return confirm('是否确定取消评审')">取消评审</a>
|
||||
<a href='/admin/review/invite/?id=<?php echo $item['id'];?>'>邀请专家</a>
|
||||
<a href="/admin/review/changeadmin/?id=<?php echo $item['id'];?>">更改管理员</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div><!-- span9 -->
|
||||
</div>
|
||||
<script>$("#list tr").mouseover(function(){$(this).addClass("high")}).mouseout(function(){$(this).removeClass("high")})</script>
|
|
@ -1,11 +1,11 @@
|
|||
<ul>
|
||||
<li class="title">元数据评审</li>
|
||||
<li><a href="/admin/review/draft">投稿元数据</a></li>
|
||||
<li><a href="/admin/review/accept">待审元数据</a></li>
|
||||
<li><a href="/admin/review/inreview">在审元数据</a></li>
|
||||
<li><a href="/admin/review/myreview">我负责的元数据</a></li>
|
||||
<li><a href="/admin/review/reviewed">通过评审的元数据</a></li>
|
||||
<li><a href="/admin/review/experts">专家库</a></li>
|
||||
<li><a href="/admin/review/canceled">已取消评审的元数据</a></li>
|
||||
<li><a href="/admin/review/comments">元数据评审管理</a></li>
|
||||
<ul class="nav nav-pills nav-stacked well">
|
||||
<span class="label"><h4>元数据评审</h4></span>
|
||||
<li id="Nav-review-draft"><a href="/admin/review/draft">投稿元数据</a></li>
|
||||
<li id="Nav-review-accept"><a href="/admin/review/accept">待审元数据</a></li>
|
||||
<li id="Nav-review-inreview"><a href="/admin/review/inreview">在审元数据</a></li>
|
||||
<li id="Nav-review-myreview"><a href="/admin/review/myreview">我负责的元数据</a></li>
|
||||
<li id="Nav-review-reviewed"><a href="/admin/review/reviewed">通过评审的元数据</a></li>
|
||||
<li id="Nav-review-experts"><a href="/admin/review/experts">专家库</a></li>
|
||||
<li id="Nav-review-canceled"><a href="/admin/review/canceled">已取消评审的元数据</a></li>
|
||||
<li id="Nav-review-comments"><a href="/admin/review/comments">元数据评审管理</a></li>
|
||||
</ul>
|
|
@ -2,69 +2,75 @@
|
|||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('元数据评审');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('review/left.phtml'); ?>
|
||||
<style>
|
||||
table thead tr th {background:#EBF2F6;color:#444;}
|
||||
.high{background:#444;color:#FFF;}
|
||||
</style>
|
||||
<div class="row-fluid">
|
||||
<div class="span3">
|
||||
<?= $this->partial('review/left.phtml'); ?>
|
||||
</div>
|
||||
<div class="span9">
|
||||
<?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; ?>
|
||||
<form action="" method="get" class="search input-append">
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<input type="text" class="q" name="keyword" value="<?php echo $this->keyword; ?>" />
|
||||
<button type="submit" class="btn">搜索</button>
|
||||
</form>
|
||||
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width='500'>元数据标题</th>
|
||||
<th width='80'>状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<tbody id="list">
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
<tr>
|
||||
<td><?= $item['title']?></td>
|
||||
<td><?php
|
||||
if($item['status'] == 0) echo "初始";
|
||||
if($item['status'] == -1) echo "取消审核";
|
||||
if($item['status'] == 1) echo "进入评审";
|
||||
if($item['status'] == 2) echo "邀请专家";
|
||||
if($item['status'] == 3) echo "专家接受邀请";
|
||||
if($item['status'] == 4) echo "专家反馈";
|
||||
if($item['status'] == 5) echo "已发布";
|
||||
?></td>
|
||||
<td>
|
||||
<a href="/admin/review/invite/id/<?php echo $item['id'];?>">邀请专家</a>
|
||||
<a href="/admin/review/changeadmin/id/<?php echo $item['id'];?>">更改管理员</a>
|
||||
<a href="/admin/review/inreview/show/<?php echo $item['id'];?>">查看详细</a>
|
||||
<a href="/admin/review/comments/ac/list/uuid/<?php echo $item['uuid'];?>">查看评审意见</a>
|
||||
<a href="/admin/review/reply/uuid/<?php echo $item['uuid'];?>">意见反馈</a>
|
||||
<a href='/admin/review/accept/cancel/<?php echo $item['id'];?>' onclick="return confirm('是否确定取消评审')">取消评审</a>
|
||||
<a href="/admin/review/checkmail/id/<?php echo $item['id'];?>" style="color:#6C0">发布</a>
|
||||
<a href="/admin/review/delete/id/<?php echo $item['id'];?>" style="color:#F00" onclick="return confirm('是否确定删除?该操作不可逆')">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
</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 class="search">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="search" value='1' />
|
||||
<label>搜索关键字</label><input type="text" class="q" name="keyword" value="<?php echo $this->keyword; ?>" />
|
||||
<input type="submit" class="btn" value="搜索" />
|
||||
</form>
|
||||
</div><!-- search DIV -->
|
||||
|
||||
<table class="stylized"><thead>
|
||||
<tr>
|
||||
<td width='500'>元数据标题</td>
|
||||
<td width='80'>状态</td>
|
||||
<td>操作</td>
|
||||
</tr></thead>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<tbody id="list">
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
<tr>
|
||||
<td><?= $item['title']?></td>
|
||||
<td><?php
|
||||
if($item['status'] == 0) echo "初始";
|
||||
if($item['status'] == -1) echo "取消审核";
|
||||
if($item['status'] == 1) echo "进入评审";
|
||||
if($item['status'] == 2) echo "邀请专家";
|
||||
if($item['status'] == 3) echo "专家接受邀请";
|
||||
if($item['status'] == 4) echo "专家反馈";
|
||||
if($item['status'] == 5) echo "已发布";
|
||||
?></td>
|
||||
<td>
|
||||
<a href="/admin/review/invite/id/<?php echo $item['id'];?>">邀请专家</a>
|
||||
<a href="/admin/review/changeadmin/id/<?php echo $item['id'];?>">更改管理员</a>
|
||||
<a href="/admin/review/inreview/show/<?php echo $item['id'];?>">查看详细</a>
|
||||
<a href="/admin/review/comments/ac/list/uuid/<?php echo $item['uuid'];?>">查看评审意见</a>
|
||||
<a href="/admin/review/reply/uuid/<?php echo $item['uuid'];?>">意见反馈</a>
|
||||
<a href='/admin/review/accept/cancel/<?php echo $item['id'];?>' onclick="return confirm('是否确定取消评审')">取消评审</a>
|
||||
<a href="/admin/review/checkmail/id/<?php echo $item['id'];?>" style="color:#6C0">发布</a>
|
||||
<a href="/admin/review/delete/id/<?php echo $item['id'];?>" style="color:#F00" onclick="return confirm('是否确定删除?该操作不可逆')">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
<script>$("#list tr").mouseover(function(){$(this).addClass("high")}).mouseout(function(){$(this).removeClass("high")});</script>
|
||||
<script>
|
||||
//$("#list tr").mouseover(function(){$(this).addClass("high")}).mouseout(function(){$(this).removeClass("high")});
|
||||
</script>
|
|
@ -2,41 +2,54 @@
|
|||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('后台管理');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/admin.css');
|
||||
$this->headLink()->appendStylesheet('/css/author.css');
|
||||
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||
$this->breadcrumb('评审意见反馈');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->theme->AppendPlus($this,"colorbox");
|
||||
?>
|
||||
<div id="leftPanel">
|
||||
<?= $this->partial('review/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
<?php
|
||||
if(!empty($this->msg))
|
||||
{
|
||||
?>
|
||||
<div class="box box-error"><?= $this->msg;?></div>
|
||||
<?php if(!empty($this->jump_url)) {?>
|
||||
<script language="javascript">setTimeout("history.go(-1)",3000);</script>
|
||||
<?php } ?>
|
||||
<?php } else{?>
|
||||
<div class="row-fluid">
|
||||
<div class="span3">
|
||||
<?= $this->partial('review/left.phtml'); ?>
|
||||
</div>
|
||||
<div class="span9">
|
||||
|
||||
<?php if(empty($this->review))
|
||||
{ echo "此数据尚无反馈信息";
|
||||
}else{?>
|
||||
<div id="datalist">
|
||||
<ul>
|
||||
<?php foreach($this->review as $v)
|
||||
{?>
|
||||
<?php foreach($this->review as $v){?>
|
||||
<li><?= empty($v['realname']) ? $v['username'] : $v['realname']?> :<?= $v['mdcomment']?></li>
|
||||
<?php }?>
|
||||
<?php }?>
|
||||
</ul>
|
||||
</div>
|
||||
<button type="button" onclick="send()" id="submit" class="btn btn-green">反馈给元数据作者</button>
|
||||
|
||||
<?php if(!empty($this->error)) { ?>
|
||||
<?= $this->error ?>
|
||||
<?php } ?>
|
||||
<h2>为《<?= $this->md['title'] ?>》的作者反馈</h2>
|
||||
<hr />
|
||||
<form class="form-horizontal" method="post">
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="input_title">邮件标题</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="span12" id="input_title" name="title" value="<?= (isset($this->data['title'])&&!empty($this->data['title'])) ? $this->data['title']:"" ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="input_email">收信地址</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="span12" id="input_email" name="email" value="<?= isset($this->data['email']) ? $this->data['email']:"" ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="input_content">内容</label>
|
||||
<div class="controls">
|
||||
<textarea class="span12" id="input_content" name="content" style="height:300px;"><?= isset($this->data['content']) ? $this->data['content']:"" ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<input type="hidden" name="submit" value="1" />
|
||||
<button type="submit" class="btn btn-primary">反馈给元数据作者</button>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
function send(){
|
||||
var dom = "#submit";
|
||||
|
@ -73,6 +86,5 @@ if(!empty($this->msg))
|
|||
});
|
||||
}
|
||||
</script>
|
||||
<?php }?>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
<?php
|
||||
echo implode(', ', array_map(
|
||||
create_function('$a', 'return $a->getLabel();'),
|
||||
$this->pages));?>
|
|
@ -10,8 +10,12 @@ if(!empty($this->pageTitle))
|
|||
<div class="hero-unit">
|
||||
<h2><?= $this->content ?><?php if(!empty($this->url)) echo ",系统正在为您跳转..."?></h2>
|
||||
<?php if(!empty($this->url)) {?>
|
||||
<a href="<?= $this->url ?>">如果没有跳转请点击这样</a>
|
||||
<script language="javascript">setTimeout("self.location='<?= $this->url?>'",3000);</script>
|
||||
<?php } ?>
|
||||
<?php if($this->url == -1) { ?>
|
||||
<a href="javascript:history.go(-1);">如果没有跳转请点击这样</a>
|
||||
<script language="javascript">setTimeout("history.go(-1)",3000);</script>
|
||||
<?php }else {?>
|
||||
<a href="<?= $this->url ?>">如果没有跳转请点击这样</a>
|
||||
<script language="javascript">setTimeout("self.location='<?= $this->url?>'",3000);</script>
|
||||
<?php } } ?>
|
||||
</div>
|
||||
</div>
|
|
@ -7,6 +7,7 @@ class Author extends Zend_Controller_Plugin_Abstract
|
|||
//使用到的公共变量
|
||||
public $tbl_metadata = "metadata"; //元数据
|
||||
public $tbl_author = "mdauthor"; //数据作者表
|
||||
public $tbl_user = "users";
|
||||
|
||||
function __construct($db)
|
||||
{
|
||||
|
@ -41,6 +42,29 @@ class Author extends Zend_Controller_Plugin_Abstract
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//获取某数据的所有作者
|
||||
function getAuthor($uuid,$field = "")
|
||||
{
|
||||
$sql = "SELECT md.title,u.email FROM ".$this->tbl_metadata." md
|
||||
LEFT JOIN ".$this->tbl_author." a ON md.uuid=a.uuid
|
||||
LEFT JOIN ".$this->tbl_user." u ON a.userid=u.id
|
||||
WHERE md.uuid='$uuid'";
|
||||
$sth = $this->db->query($sql);
|
||||
$rows = $sth->fetchAll();
|
||||
|
||||
if(empty($field))
|
||||
{
|
||||
return $rows;
|
||||
}else{
|
||||
$datas = array();
|
||||
foreach($rows as $k=>$v)
|
||||
{
|
||||
$datas[] = $v[$field];
|
||||
}
|
||||
return $datas;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Literature extends Author
|
||||
|
|
|
@ -5,7 +5,9 @@ class Review extends Zend_Controller_Plugin_Abstract
|
|||
private $auth = NULL; //Zend_Auth 对象
|
||||
|
||||
//使用到的公共变量
|
||||
public $tbl_review = "mdexpertreview";
|
||||
public $tbl_reviewexp = "mdexpertreview";
|
||||
public $tbl_mdreview = "mdreview";
|
||||
public $tbl_user = "users";
|
||||
|
||||
function __construct($db)
|
||||
{
|
||||
|
@ -26,7 +28,7 @@ class Review extends Zend_Controller_Plugin_Abstract
|
|||
}//非本人操作
|
||||
|
||||
try{
|
||||
$sql = "update ".$this->tbl_review." set status=$status where id='$id' and uuid='$uuid'";
|
||||
$sql = "update ".$this->tbl_reviewexp." set status=$status where id='$id' and uuid='$uuid'";
|
||||
if($this->db->exec($sql))
|
||||
{
|
||||
return true;
|
||||
|
@ -36,6 +38,18 @@ class Review extends Zend_Controller_Plugin_Abstract
|
|||
}catch(Exception $e){
|
||||
return "处理中出现错误";
|
||||
}
|
||||
}
|
||||
|
||||
//根据UUID获得评审意见
|
||||
function getReviews($uuid)
|
||||
{
|
||||
$sql = "SELECT mr.*,u.username,u.realname FROM ".$this->tbl_mdreview." mr
|
||||
LEFT JOIN ".$this->tbl_user." u ON mr.userid = u.id
|
||||
WHERE mr.uuid = '$uuid'";
|
||||
|
||||
$sth = $this->db->query($sql);
|
||||
$reviews = $sth->fetchAll();
|
||||
|
||||
return $reviews;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@ body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input
|
|||
fieldset,img{border:none;}
|
||||
address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}
|
||||
caption,th{text-align:left;}
|
||||
h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}
|
||||
table{border-collapse:collapse;border-spacing:0;}
|
||||
table td,table th{border:1px solid #0a3e68;}
|
||||
table tr td,table th{line-height:24px;}
|
||||
|
|
Loading…
Reference in New Issue