后台修改了查看在线申请时的查看项目,增加了按元数据uuid查看评论的功能
This commit is contained in:
parent
65072d0317
commit
bee9d5063f
|
@ -458,6 +458,8 @@ class Admin_DataController extends Zend_Controller_Action
|
|||
function commentAction()
|
||||
{
|
||||
$delete=(int)$this->_getParam('delete');
|
||||
$uuid = $this->_getParam('uuid');
|
||||
|
||||
if ($delete)
|
||||
{
|
||||
$sql="delete from comments where id=?";
|
||||
|
@ -469,6 +471,33 @@ class Admin_DataController extends Zend_Controller_Action
|
|||
}
|
||||
$this->_redirect("/admin/data/comment");
|
||||
}
|
||||
|
||||
if($uuid)
|
||||
{
|
||||
$sql = "SELECT c.*,md.title,md.uuid FROM comments c
|
||||
LEFT JOIN metadata md ON md.uuid=c.uuid
|
||||
WHERE c.uuid=?";
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute(array($uuid));
|
||||
$rows = $sth->fetchAll();
|
||||
|
||||
$paginator = Zend_Paginator::factory($rows);
|
||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||
$paginator->setItemCountPerPage($this->view->config->page->max);
|
||||
$paginator->setView($this->view);
|
||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml');
|
||||
$this->view->paginator=$paginator;
|
||||
|
||||
$sql = "SELECT title FROM metadata WHERE uuid=?";
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute(array($uuid));
|
||||
$row = $sth->fetch();
|
||||
|
||||
$this->view->title = $row['title'];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
$select=$this->db->select();
|
||||
$select->from('comments')
|
||||
->joinLeft('metadata','metadata.uuid=comments.uuid','title')
|
||||
|
|
|
@ -680,7 +680,7 @@ class Admin_DownController extends Zend_Controller_Action
|
|||
if(empty($show) && empty($delete))
|
||||
{
|
||||
$select=$this->db->select();
|
||||
$select->from('onlineapp as o',array('id','userid','unit','username','ts_created','project'))
|
||||
$select->from('onlineapp as o',array('id','userid','unit','username','ts_created','project','project_id','project_type','project_title'))
|
||||
->join('metadata as m', 'o.uuid = m.uuid', array('title','uuid'))
|
||||
->where('o.id in (select distinct(onlineappid) from dataorder)')
|
||||
->order('o.id desc');
|
||||
|
|
|
@ -13,6 +13,9 @@
|
|||
<?= $this->partial('data/left.phtml'); ?>
|
||||
</div>
|
||||
<div id="rightPanel">
|
||||
<?php if(isset($this->title)) {
|
||||
echo "元数据《".$this->title."》的所有评论";
|
||||
}?>
|
||||
<?php if ($this->msg or $this->messages) :?>
|
||||
<div id="message">
|
||||
<?php if ($this->msg) : ?>
|
||||
|
|
|
@ -23,12 +23,11 @@
|
|||
<?php endforeach;endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<div id="rightPanel">
|
||||
<table>
|
||||
<tr><td>用户</td><td><a href="/admin/user/show/id/<?php echo $this->infos['uid'];?>"><?php echo $this->infos['uname'];?> </a> (<a href="/admin/down/user/show/<?php echo $this->infos['uid'];?>">用户下载记录 </a>)</td></tr>
|
||||
<tr><td>姓名</td><td><?php echo $this->infos['username'];?></td></tr>
|
||||
<tr><td>数据</td><td><a href="/data/<?php echo $this->infos['uuid'];?>"><?php echo $this->infos['title'];?></a>(<a href="/admin/down/data/show/<?php echo $this->infos['uuid'];?>">数据下载记录</a>)</td></tr>
|
||||
<tr><td>单位</td><td><?php echo $this->infos['unit'];?></td></tr>
|
||||
<tr><td>电话</td><td><?php echo $this->infos['phone'];?></td></tr>
|
||||
<tr><td>地址</td><td><?php echo $this->infos['address'];?></td></tr>
|
||||
|
@ -36,7 +35,10 @@
|
|||
<tr><td>电话</td><td><?php echo $this->infos['phone'];?></td></tr>
|
||||
<tr><td>Email</td><td><?php echo $this->infos['email'];?></td></tr>
|
||||
<tr><td>用途</td><td><textarea style="width:500px;height:200px;font-size:12px;"><?php echo $this->infos['project'];?></textarea></td></tr>
|
||||
<tr><td>项目编号</td><td><?php echo $this->infos['project_id'];?></td></tr>
|
||||
<tr><td>项目标题</td><td><?php echo $this->infos['project_title'];?></td></tr>
|
||||
<tr><td>项目类型</td><td><?php echo $this->infos['project_type'];?></td></tr>
|
||||
<tr><td>项目信息</td><td><?php echo $this->infos['project'];?></td></tr>
|
||||
<tr><td>时间</td><td><?php echo date('Y-m-d H:i:s', strtotime($this->infos['ts_created']));?></td></tr>
|
||||
<tr><td>数据</td><td><a href="/data/<?php echo $this->infos['uuid'];?>"><?php echo $this->infos['title'];?></a>(<a href="/admin/down/data/show/<?php echo $this->infos['uuid'];?>">数据下载记录</a>)</td></tr>
|
||||
</table>
|
||||
</div>
|
Loading…
Reference in New Issue