修改了后台元数据评审中发出反馈的的方式
This commit is contained in:
parent
f1ea306649
commit
326572d7c2
|
@ -2568,9 +2568,9 @@ class Admin_DataController extends Zend_Controller_Action
|
||||||
|
|
||||||
if(!empty($keywords))
|
if(!empty($keywords))
|
||||||
{
|
{
|
||||||
$search=new Search($keywords);
|
$search=new SimpleSearch($keywords);
|
||||||
$where=$search->sql_expr(array("md.title"));
|
$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
|
$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))
|
if(!empty($keywords))
|
||||||
{
|
{
|
||||||
$search=new Search($keywords);
|
$search=new SimpleSearch($keywords);
|
||||||
$where=$search->sql_expr(array("md.title"));
|
$where=$search->sql_expr(array("md.title"));
|
||||||
$sql.=' WHERE '.$where;
|
$sql.=' WHERE '.$where;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,13 +5,9 @@ class Admin_ReviewController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$this->db=Zend_Registry::get('db');
|
$this->db=Zend_Registry::get('db');
|
||||||
$this->view->config = Zend_Registry::get('config');
|
$this->view->config = Zend_Registry::get('config');
|
||||||
$this->messenger=$this->_helper->getHelper('FlashMessenger');
|
$this->view->theme = new Theme();
|
||||||
$this->view->messages = $this->messenger->getMessages();
|
$this->_helper->layout->setLayout('administry');
|
||||||
}
|
$this->view->pageID = "review-".$this->_request->getActionName();
|
||||||
|
|
||||||
function postDispatch()
|
|
||||||
{
|
|
||||||
//$this->view->messages = $this->messenger->getMessages();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1497,74 +1493,86 @@ class Admin_ReviewController extends Zend_Controller_Action
|
||||||
function replyAction(){
|
function replyAction(){
|
||||||
|
|
||||||
$uuid = $this->_getParam('uuid');
|
$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))
|
if(empty($uuid))
|
||||||
{
|
{
|
||||||
$jump_url = $this->view->jump_url = 'javascript:history.go(-1);';
|
view::Post($this,array('content'=>'参数错误','url' => -1));
|
||||||
$this->view->msg = "参数错误,<a href='$jump_url'>如果页面没有跳转请点击这里</a>";
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$review = new Review($this->db);
|
||||||
|
|
||||||
$this->view->uuid = $uuid;
|
$this->view->uuid = $uuid;
|
||||||
|
|
||||||
$sql = "SELECT mr.*,u.username,u.realname FROM mdreview mr
|
$reviews = $review->getReviews($uuid);
|
||||||
LEFT JOIN users u ON mr.userid = u.id
|
|
||||||
WHERE mr.uuid = '$uuid'";
|
|
||||||
|
|
||||||
$sth = $this->db->query($sql);
|
|
||||||
$reviews = $sth->fetchAll();
|
|
||||||
|
|
||||||
$this->view->review = $reviews;
|
$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
|
$body .= $v['username'].":".$v['mdcomment']."\r\n";
|
||||||
LEFT JOIN mdauthor a ON md.uuid=a.uuid
|
}
|
||||||
WHERE md.uuid='$uuid'";
|
else
|
||||||
$sth = $this->db->query($sql);
|
$body .= "\r\n\r\n\r\n";
|
||||||
$rows = $sth->fetchAll();
|
$body .= "--------------------------------------";
|
||||||
|
$body .= "\r\n 西部数据中心服务组";
|
||||||
|
|
||||||
$emails = array();
|
$author = new Author($this->db);
|
||||||
foreach($rows as $v);
|
$emails = $author->getAuthor($uuid,'email');
|
||||||
{
|
|
||||||
if(!empty($v['email']))
|
|
||||||
{
|
|
||||||
$emails[] = $v['email'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(count($emails)<1)
|
if(count($emails)<1)
|
||||||
{
|
{
|
||||||
$jump_url = $this->view->jump_url = 'javascript:history.go(-1);';
|
$email = "";
|
||||||
$this->view->msg = "该元数据未指派作者,<a href='$jump_url'>如果页面没有跳转请点击这里</a>";
|
}else{
|
||||||
return true;
|
$email = join(";",$emails);
|
||||||
}
|
}
|
||||||
|
|
||||||
$title = $rows[0]['title'];
|
$data = array(
|
||||||
|
'title'=>"您的元数据《".$this->view->md['title']."》有新的反馈",
|
||||||
|
'content'=>$body,
|
||||||
|
'email'=>$email
|
||||||
|
|
||||||
$this->_helper->layout->disableLayout();
|
);
|
||||||
$this->_helper->viewRenderer->setNoRender();
|
$this->view->data = $data;
|
||||||
|
|
||||||
$body = "元数据《$title》的作者,您好:\r\n
|
if(!empty($submit))
|
||||||
您的元数据《$title》有反馈信息。\r\n";
|
{
|
||||||
|
$this->view->data['title'] = $title = $this->_getParam('title');
|
||||||
|
$this->view->data['email'] = $email = $this->_getParam('email');
|
||||||
|
$this->view->data['content'] = $cotent = $this->_getParam('content');
|
||||||
|
|
||||||
foreach($reviews as $k=>$v)
|
$emails = explode(";",$email);
|
||||||
{
|
|
||||||
$body .= $v['username'].":".$v['mdcomment']."\r\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
$body .= "\r\n 西部数据中心服务组";
|
|
||||||
|
|
||||||
$mail=new WestdcMailer($this->view->config->smtp);
|
$mail=new WestdcMailer($this->view->config->smtp);
|
||||||
$mail->setBodyText($body);
|
$mail->setBodyText($cotent);
|
||||||
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
$mail->setFrom($this->view->config->service->email,'西部数据中心服务组');
|
||||||
foreach($emails as $v)
|
foreach($emails as $v)
|
||||||
{
|
{
|
||||||
$mail->addTo($v);
|
$mail->addTo($v);
|
||||||
}
|
}
|
||||||
$mail->setSubject("您的元数据《$title》有新的反馈");
|
$mail->setSubject($title);
|
||||||
$mail->send();
|
|
||||||
|
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()
|
}//replyAction()
|
||||||
|
|
|
@ -2,46 +2,44 @@
|
||||||
$this->headTitle($this->config->title->site);
|
$this->headTitle($this->config->title->site);
|
||||||
$this->headTitle($this->config->title->author);
|
$this->headTitle($this->config->title->author);
|
||||||
$this->headTitle()->setSeparator(' - ');
|
$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="/">首页</a>');
|
||||||
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
$this->breadcrumb('<a href="/admin/data">数据管理</a>');
|
||||||
$this->breadcrumb('数据作者管理');
|
$this->breadcrumb('数据作者管理');
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
|
$this->theme->AppendPlus($this,"colorbox");
|
||||||
?>
|
?>
|
||||||
<!-- 左侧导航 -->
|
<div class="row-fluid">
|
||||||
<div id="leftPanel">
|
<div class="span3">
|
||||||
<?= $this->partial('data/left.phtml'); ?>
|
<?= $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>
|
||||||
<!-- //左侧导航 -->
|
|
||||||
|
|
||||||
<!-- 页面内容 -->
|
|
||||||
<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>
|
<script>
|
||||||
function update(id){
|
function update(id){
|
||||||
$.ajax({
|
$.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('元数据评审');
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
?>
|
?>
|
||||||
<div id="leftPanel">
|
<div class="row-fluid">
|
||||||
<?= $this->partial('review/left.phtml'); ?>
|
<div class="span3">
|
||||||
</div>
|
<?= $this->partial('review/left.phtml'); ?>
|
||||||
<div id="rightPanel">
|
</div>
|
||||||
<?php if ($this->msg or $this->messages) :?>
|
<div class="span9">
|
||||||
<div id="message">
|
<?php if ($this->msg or $this->messages) :?>
|
||||||
<?php if ($this->msg) : ?>
|
<div id="message">
|
||||||
<p><?php echo $this->msg; ?></p>
|
<?php if ($this->msg) : ?>
|
||||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
<p><?php echo $this->msg; ?></p>
|
||||||
<p><?php echo $msg; ?></p>
|
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||||
<?php endforeach;endif; ?>
|
<p><?php echo $msg; ?></p>
|
||||||
</div>
|
<?php endforeach;endif; ?>
|
||||||
<?php endif; ?>
|
</div>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
<div class="search">
|
<div class="search">
|
||||||
<form action="" method="get">
|
<form action="" method="get">
|
||||||
<input type="hidden" name="search" value='1' />
|
<input type="hidden" name="search" value='1' />
|
||||||
<label>搜索关键字</label><input type="text" name="keyword" class="q" value="<?php echo $this->keyword; ?>" />
|
<label>搜索关键字</label><input type="text" name="keyword" class="q" value="<?php echo $this->keyword; ?>" />
|
||||||
<input type="submit" class="btn" value="搜索" />
|
<input type="submit" class="btn" value="搜索" />
|
||||||
</form>
|
</form>
|
||||||
</div><!-- search DIV -->
|
</div><!-- search DIV -->
|
||||||
|
|
||||||
<table class="stylized"><thead>
|
<table class="stylized"><thead>
|
||||||
<tr>
|
<tr>
|
||||||
<td width='600'>元数据标题</td>
|
<td width='600'>元数据标题</td>
|
||||||
<td width='120'>负责编辑</td>
|
<td width='120'>负责编辑</td>
|
||||||
<td width='120'>时间</td>
|
<td width='120'>时间</td>
|
||||||
<td width='180'>操作</td>
|
<td width='180'>操作</td>
|
||||||
</tr></thead>
|
</tr></thead>
|
||||||
<?php if (count($this->paginator)): ?>
|
<?php if (count($this->paginator)): ?>
|
||||||
<tbody id="list">
|
<tbody id="list">
|
||||||
<?php foreach ($this->paginator as $item): ?>
|
<?php foreach ($this->paginator as $item): ?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="/data/<?php echo $item['uuid'];?>"><?= $item['title']?></a></td>
|
<td><a href="/data/<?php echo $item['uuid'];?>"><?= $item['title']?></a></td>
|
||||||
<td><?php echo $item['realname'].'['.$item['username'].']'; ?></td>
|
<td><?php echo $item['realname'].'['.$item['username'].']'; ?></td>
|
||||||
<td><?php echo date("Y-m-d H:i",strtotime($item['ts_accepted']));?></td>
|
<td><?php echo date("Y-m-d H:i",strtotime($item['ts_accepted']));?></td>
|
||||||
<td>
|
<td>
|
||||||
<a href='/admin/review/accept/cancel/<?php echo $item['id'];?>' onclick="return confirm('是否确定取消评审')">取消评审</a>
|
<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/invite/?id=<?php echo $item['id'];?>'>邀请专家</a>
|
||||||
<a href="/admin/review/changeadmin/?id=<?php echo $item['id'];?>">更改管理员</a>
|
<a href="/admin/review/changeadmin/?id=<?php echo $item['id'];?>">更改管理员</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</table>
|
</table>
|
||||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||||
|
</div><!-- span9 -->
|
||||||
</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>
|
|
@ -1,11 +1,11 @@
|
||||||
<ul>
|
<ul class="nav nav-pills nav-stacked well">
|
||||||
<li class="title">元数据评审</li>
|
<span class="label"><h4>元数据评审</h4></span>
|
||||||
<li><a href="/admin/review/draft">投稿元数据</a></li>
|
<li id="Nav-review-draft"><a href="/admin/review/draft">投稿元数据</a></li>
|
||||||
<li><a href="/admin/review/accept">待审元数据</a></li>
|
<li id="Nav-review-accept"><a href="/admin/review/accept">待审元数据</a></li>
|
||||||
<li><a href="/admin/review/inreview">在审元数据</a></li>
|
<li id="Nav-review-inreview"><a href="/admin/review/inreview">在审元数据</a></li>
|
||||||
<li><a href="/admin/review/myreview">我负责的元数据</a></li>
|
<li id="Nav-review-myreview"><a href="/admin/review/myreview">我负责的元数据</a></li>
|
||||||
<li><a href="/admin/review/reviewed">通过评审的元数据</a></li>
|
<li id="Nav-review-reviewed"><a href="/admin/review/reviewed">通过评审的元数据</a></li>
|
||||||
<li><a href="/admin/review/experts">专家库</a></li>
|
<li id="Nav-review-experts"><a href="/admin/review/experts">专家库</a></li>
|
||||||
<li><a href="/admin/review/canceled">已取消评审的元数据</a></li>
|
<li id="Nav-review-canceled"><a href="/admin/review/canceled">已取消评审的元数据</a></li>
|
||||||
<li><a href="/admin/review/comments">元数据评审管理</a></li>
|
<li id="Nav-review-comments"><a href="/admin/review/comments">元数据评审管理</a></li>
|
||||||
</ul>
|
</ul>
|
|
@ -2,69 +2,75 @@
|
||||||
$this->headTitle($this->config->title->site);
|
$this->headTitle($this->config->title->site);
|
||||||
$this->headTitle('后台管理');
|
$this->headTitle('后台管理');
|
||||||
$this->headTitle()->setSeparator(' - ');
|
$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="/">首页</a>');
|
||||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||||
$this->breadcrumb('元数据评审');
|
$this->breadcrumb('元数据评审');
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
?>
|
?>
|
||||||
<div id="leftPanel">
|
<style>
|
||||||
<?= $this->partial('review/left.phtml'); ?>
|
table thead tr th {background:#EBF2F6;color:#444;}
|
||||||
</div>
|
.high{background:#444;color:#FFF;}
|
||||||
<div id="rightPanel">
|
</style>
|
||||||
<?php if ($this->msg or $this->messages) :?>
|
<div class="row-fluid">
|
||||||
<div id="message">
|
<div class="span3">
|
||||||
<?php if ($this->msg) : ?>
|
<?= $this->partial('review/left.phtml'); ?>
|
||||||
<p><?php echo $this->msg; ?></p>
|
</div>
|
||||||
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
<div class="span9">
|
||||||
<p><?php echo $msg; ?></p>
|
<?php if ($this->msg or $this->messages) :?>
|
||||||
<?php endforeach;endif; ?>
|
<div id="message">
|
||||||
</div>
|
<?php if ($this->msg) : ?>
|
||||||
<?php endif; ?>
|
<p><?php echo $this->msg; ?></p>
|
||||||
<div class="search">
|
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
|
||||||
<form action="" method="get">
|
<p><?php echo $msg; ?></p>
|
||||||
<input type="hidden" name="search" value='1' />
|
<?php endforeach;endif; ?>
|
||||||
<label>搜索关键字</label><input type="text" class="q" name="keyword" value="<?php echo $this->keyword; ?>" />
|
</div>
|
||||||
<input type="submit" class="btn" value="搜索" />
|
<?php endif; ?>
|
||||||
</form>
|
<form action="" method="get" class="search input-append">
|
||||||
</div><!-- search DIV -->
|
<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="stylized"><thead>
|
<table class="table table-bordered table-hover">
|
||||||
<tr>
|
<thead>
|
||||||
<td width='500'>元数据标题</td>
|
<tr>
|
||||||
<td width='80'>状态</td>
|
<th width='500'>元数据标题</th>
|
||||||
<td>操作</td>
|
<th width='80'>状态</th>
|
||||||
</tr></thead>
|
<th>操作</th>
|
||||||
<?php if (count($this->paginator)): ?>
|
</tr>
|
||||||
<tbody id="list">
|
</thead>
|
||||||
<?php foreach ($this->paginator as $item): ?>
|
<?php if (count($this->paginator)): ?>
|
||||||
<tr>
|
<tbody id="list">
|
||||||
<td><?= $item['title']?></td>
|
<?php foreach ($this->paginator as $item): ?>
|
||||||
<td><?php
|
<tr>
|
||||||
if($item['status'] == 0) echo "初始";
|
<td><?= $item['title']?></td>
|
||||||
if($item['status'] == -1) echo "取消审核";
|
<td><?php
|
||||||
if($item['status'] == 1) echo "进入评审";
|
if($item['status'] == 0) echo "初始";
|
||||||
if($item['status'] == 2) echo "邀请专家";
|
if($item['status'] == -1) echo "取消审核";
|
||||||
if($item['status'] == 3) echo "专家接受邀请";
|
if($item['status'] == 1) echo "进入评审";
|
||||||
if($item['status'] == 4) echo "专家反馈";
|
if($item['status'] == 2) echo "邀请专家";
|
||||||
if($item['status'] == 5) echo "已发布";
|
if($item['status'] == 3) echo "专家接受邀请";
|
||||||
?></td>
|
if($item['status'] == 4) echo "专家反馈";
|
||||||
<td>
|
if($item['status'] == 5) echo "已发布";
|
||||||
<a href="/admin/review/invite/id/<?php echo $item['id'];?>">邀请专家</a>
|
?></td>
|
||||||
<a href="/admin/review/changeadmin/id/<?php echo $item['id'];?>">更改管理员</a>
|
<td>
|
||||||
<a href="/admin/review/inreview/show/<?php echo $item['id'];?>">查看详细</a>
|
<a href="/admin/review/invite/id/<?php echo $item['id'];?>">邀请专家</a>
|
||||||
<a href="/admin/review/comments/ac/list/uuid/<?php echo $item['uuid'];?>">查看评审意见</a>
|
<a href="/admin/review/changeadmin/id/<?php echo $item['id'];?>">更改管理员</a>
|
||||||
<a href="/admin/review/reply/uuid/<?php echo $item['uuid'];?>">意见反馈</a>
|
<a href="/admin/review/inreview/show/<?php echo $item['id'];?>">查看详细</a>
|
||||||
<a href='/admin/review/accept/cancel/<?php echo $item['id'];?>' onclick="return confirm('是否确定取消评审')">取消评审</a>
|
<a href="/admin/review/comments/ac/list/uuid/<?php echo $item['uuid'];?>">查看评审意见</a>
|
||||||
<a href="/admin/review/checkmail/id/<?php echo $item['id'];?>" style="color:#6C0">发布</a>
|
<a href="/admin/review/reply/uuid/<?php echo $item['uuid'];?>">意见反馈</a>
|
||||||
<a href="/admin/review/delete/id/<?php echo $item['id'];?>" style="color:#F00" onclick="return confirm('是否确定删除?该操作不可逆')">删除</a>
|
<a href='/admin/review/accept/cancel/<?php echo $item['id'];?>' onclick="return confirm('是否确定取消评审')">取消评审</a>
|
||||||
</td>
|
<a href="/admin/review/checkmail/id/<?php echo $item['id'];?>" style="color:#6C0">发布</a>
|
||||||
</tr>
|
<a href="/admin/review/delete/id/<?php echo $item['id'];?>" style="color:#F00" onclick="return confirm('是否确定删除?该操作不可逆')">删除</a>
|
||||||
<?php endforeach; ?>
|
</td>
|
||||||
</tbody>
|
</tr>
|
||||||
<?php endif; ?>
|
<?php endforeach; ?>
|
||||||
</table>
|
</tbody>
|
||||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
<?php endif; ?>
|
||||||
|
</table>
|
||||||
|
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||||
|
</div>
|
||||||
</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->config->title->site);
|
||||||
$this->headTitle('后台管理');
|
$this->headTitle('后台管理');
|
||||||
$this->headTitle()->setSeparator(' - ');
|
$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="/">首页</a>');
|
||||||
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
$this->breadcrumb('<a href="/admin">后台首页</a>');
|
||||||
$this->breadcrumb('评审意见反馈');
|
$this->breadcrumb('评审意见反馈');
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
|
$this->theme->AppendPlus($this,"colorbox");
|
||||||
?>
|
?>
|
||||||
<div id="leftPanel">
|
<div class="row-fluid">
|
||||||
<?= $this->partial('review/left.phtml'); ?>
|
<div class="span3">
|
||||||
</div>
|
<?= $this->partial('review/left.phtml'); ?>
|
||||||
<div id="rightPanel">
|
</div>
|
||||||
<?php
|
<div class="span9">
|
||||||
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{?>
|
|
||||||
|
|
||||||
<?php if(empty($this->review))
|
|
||||||
{ echo "此数据尚无反馈信息";
|
|
||||||
}else{?>
|
|
||||||
<div id="datalist">
|
<div id="datalist">
|
||||||
<ul>
|
<ul>
|
||||||
<?php foreach($this->review as $v)
|
<?php foreach($this->review as $v){?>
|
||||||
{?>
|
|
||||||
<li><?= empty($v['realname']) ? $v['username'] : $v['realname']?> :<?= $v['mdcomment']?></li>
|
<li><?= empty($v['realname']) ? $v['username'] : $v['realname']?> :<?= $v['mdcomment']?></li>
|
||||||
<?php }?>
|
<?php }?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</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>
|
<script>
|
||||||
function send(){
|
function send(){
|
||||||
var dom = "#submit";
|
var dom = "#submit";
|
||||||
|
@ -73,6 +86,5 @@ if(!empty($this->msg))
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<?php }?>
|
</div>
|
||||||
<?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">
|
<div class="hero-unit">
|
||||||
<h2><?= $this->content ?><?php if(!empty($this->url)) echo ",系统正在为您跳转..."?></h2>
|
<h2><?= $this->content ?><?php if(!empty($this->url)) echo ",系统正在为您跳转..."?></h2>
|
||||||
<?php if(!empty($this->url)) {?>
|
<?php if(!empty($this->url)) {?>
|
||||||
<a href="<?= $this->url ?>">如果没有跳转请点击这样</a>
|
<?php if($this->url == -1) { ?>
|
||||||
<script language="javascript">setTimeout("self.location='<?= $this->url?>'",3000);</script>
|
<a href="javascript:history.go(-1);">如果没有跳转请点击这样</a>
|
||||||
<?php } ?>
|
<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>
|
||||||
</div>
|
</div>
|
|
@ -7,6 +7,7 @@ class Author extends Zend_Controller_Plugin_Abstract
|
||||||
//使用到的公共变量
|
//使用到的公共变量
|
||||||
public $tbl_metadata = "metadata"; //元数据
|
public $tbl_metadata = "metadata"; //元数据
|
||||||
public $tbl_author = "mdauthor"; //数据作者表
|
public $tbl_author = "mdauthor"; //数据作者表
|
||||||
|
public $tbl_user = "users";
|
||||||
|
|
||||||
function __construct($db)
|
function __construct($db)
|
||||||
{
|
{
|
||||||
|
@ -41,6 +42,29 @@ class Author extends Zend_Controller_Plugin_Abstract
|
||||||
return false;
|
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
|
class Literature extends Author
|
||||||
|
|
|
@ -5,7 +5,9 @@ class Review extends Zend_Controller_Plugin_Abstract
|
||||||
private $auth = NULL; //Zend_Auth 对象
|
private $auth = NULL; //Zend_Auth 对象
|
||||||
|
|
||||||
//使用到的公共变量
|
//使用到的公共变量
|
||||||
public $tbl_review = "mdexpertreview";
|
public $tbl_reviewexp = "mdexpertreview";
|
||||||
|
public $tbl_mdreview = "mdreview";
|
||||||
|
public $tbl_user = "users";
|
||||||
|
|
||||||
function __construct($db)
|
function __construct($db)
|
||||||
{
|
{
|
||||||
|
@ -26,7 +28,7 @@ class Review extends Zend_Controller_Plugin_Abstract
|
||||||
}//非本人操作
|
}//非本人操作
|
||||||
|
|
||||||
try{
|
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))
|
if($this->db->exec($sql))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
@ -36,6 +38,18 @@ class Review extends Zend_Controller_Plugin_Abstract
|
||||||
}catch(Exception $e){
|
}catch(Exception $e){
|
||||||
return "处理中出现错误";
|
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;}
|
fieldset,img{border:none;}
|
||||||
address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}
|
address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}
|
||||||
caption,th{text-align:left;}
|
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{border-collapse:collapse;border-spacing:0;}
|
||||||
table td,table th{border:1px solid #0a3e68;}
|
table td,table th{border:1px solid #0a3e68;}
|
||||||
table tr td,table th{line-height:24px;}
|
table tr td,table th{line-height:24px;}
|
||||||
|
|
Loading…
Reference in New Issue