Ticket #304 增加了数据反馈查看功能
This commit is contained in:
parent
284cc2cbc3
commit
2b8e9e7524
|
@ -822,6 +822,98 @@ body=>
|
|||
}// ac = apply 申请处理
|
||||
|
||||
}//applyAction() 申请成为元数据作者
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* authoredAction() 数据反馈
|
||||
*
|
||||
* param string $uuid 元数据UUID
|
||||
* param int $page 页数
|
||||
*
|
||||
*/
|
||||
function authoredAction()
|
||||
{
|
||||
$ac = $this->_request->getParam('ac');
|
||||
|
||||
$auth = Zend_Auth::getInstance();
|
||||
if($auth->hasIdentity())
|
||||
{
|
||||
$user = $auth->getIdentity();
|
||||
$u_id = $user->id;
|
||||
$u_email = $user->email;
|
||||
}
|
||||
|
||||
if(empty($ac)|| $ac=='list')
|
||||
{
|
||||
$sql = "SELECT md.title,md.uuid,count(c.id) as c FROM comments c
|
||||
LEFT JOIN metadata md ON md.uuid=c.uuid
|
||||
LEFT JOIN mdauthor a ON md.uuid=a.uuid
|
||||
WHERE md.title IS NOT NULL AND a.userid=?
|
||||
GROUP BY md.title,md.uuid
|
||||
";
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute(array($u_id));
|
||||
$rows = $sth->fetchAll();
|
||||
|
||||
|
||||
$paginator = Zend_Paginator::factory($rows);
|
||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||
$paginator->setItemCountPerPage(15);
|
||||
$paginator->setView($this->view);
|
||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
||||
$this->view->paginator=$paginator;
|
||||
|
||||
}
|
||||
|
||||
if($ac=="view")
|
||||
{
|
||||
|
||||
$uuid = $this->_request->getParam('uuid');
|
||||
if(preg_match("/^[0-9A-Za-z]{8}-[0-9A-Za-z]{4}-[0-9A-Za-z]{4}-[0-9A-Za-z]{4}-[0-9A-Za-z]{12}$/",$uuid))
|
||||
{
|
||||
$sql = "SELECT c.author,c.email,c.url,c.ts_created,c.content FROM comments c
|
||||
LEFT JOIN mdauthor a ON a.uuid=c.uuid
|
||||
WHERE c.uuid=? AND a.userid=?
|
||||
ORDER BY ts_created DESC";
|
||||
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute(array($uuid,$u_id));
|
||||
$rows = $sth->fetchAll();
|
||||
|
||||
$paginator = Zend_Paginator::factory($rows);
|
||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||
$paginator->setItemCountPerPage(10);
|
||||
$paginator->setView($this->view);
|
||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
||||
$this->view->paginator=$paginator;
|
||||
}
|
||||
|
||||
$this->_helper->viewRenderer('authored-list');
|
||||
}
|
||||
|
||||
if($ac == "listall")
|
||||
{
|
||||
$sql = "SELECT md.title,c.author,c.email,c.url,c.ts_created,c.content FROM comments c
|
||||
LEFT JOIN mdauthor a ON a.uuid=c.uuid
|
||||
LEFT JOIN metadata md ON md.uuid=c.uuid
|
||||
WHERE a.userid=?
|
||||
ORDER BY ts_created DESC";
|
||||
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute(array($u_id));
|
||||
$rows = $sth->fetchAll();
|
||||
|
||||
$paginator = Zend_Paginator::factory($rows);
|
||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||
$paginator->setItemCountPerPage(10);
|
||||
$paginator->setView($this->view);
|
||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
||||
$this->view->paginator=$paginator;
|
||||
|
||||
$this->_helper->viewRenderer('authored-listall');
|
||||
}
|
||||
}// authoredAction() 数据反馈
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
$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/author.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/author">数据作者</a>');
|
||||
$this->breadcrumb('数据反馈管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<!-- 左侧导航 -->
|
||||
<div id='sidebar'>
|
||||
<div id='leftnavi'>
|
||||
<?= $this->partial('author/navi.phtml'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //左侧导航 -->
|
||||
|
||||
<!-- 页面内容 -->
|
||||
<div id="wapper">
|
||||
<div id="tabs-controller">
|
||||
<ul>
|
||||
<li class="box-shadow active"><a class="text-shadow" href="/author/authored">元数据反馈概况</a></li>
|
||||
<li class="box-shadow"><a class="text-shadow" href="/author/authored/ac/listall">所有元数据反馈</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="datalist">
|
||||
<?php
|
||||
if (count($this->paginator)):
|
||||
echo "<ul>";
|
||||
$autoindex=0;
|
||||
foreach ($this->paginator as $item):
|
||||
$autoindex++;?>
|
||||
<li>
|
||||
<p>评论者:<?php echo $item['author'] ?> (<?php echo $item['email'];?>) 评论时间:<?php echo date("Y-m-d H:i",strtotime($item['ts_created']));?></p>
|
||||
<p> <?php echo $item['content'] ?></p>
|
||||
</li>
|
||||
<?php endforeach;
|
||||
echo "</ul>";
|
||||
endif; ?>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
||||
<script>
|
||||
$('#wapper').width($('body').width()-300);
|
||||
</script>
|
|
@ -0,0 +1,49 @@
|
|||
<?php
|
||||
$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/author.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/author">数据作者</a>');
|
||||
$this->breadcrumb('数据反馈管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<!-- 左侧导航 -->
|
||||
<div id='sidebar'>
|
||||
<div id='leftnavi'>
|
||||
<?= $this->partial('author/navi.phtml'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //左侧导航 -->
|
||||
|
||||
<!-- 页面内容 -->
|
||||
<div id="wapper">
|
||||
<div id="tabs-controller">
|
||||
<ul>
|
||||
<li class="box-shadow"><a class="text-shadow" href="/author/authored">元数据反馈概况</a></li>
|
||||
<li class="box-shadow active"><a class="text-shadow" href="/author/authored/ac/listall">所有元数据反馈</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="datalist">
|
||||
<?php
|
||||
if (count($this->paginator)):
|
||||
echo "<ul>";
|
||||
$autoindex=0;
|
||||
foreach ($this->paginator as $item):
|
||||
$autoindex++;?>
|
||||
<li>
|
||||
<p><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><?php echo $item['title'];?></a></p>
|
||||
<p>评论者:<?php echo $item['author'] ?> (<?php echo $item['email'];?>) 评论时间:<?php echo date("Y-m-d H:i",strtotime($item['ts_created']));?></p>
|
||||
<p> <?php echo $item['content'] ?></p>
|
||||
</li>
|
||||
<?php endforeach;
|
||||
echo "</ul>";
|
||||
endif; ?>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
||||
<script>
|
||||
$('#wapper').width($('body').width()-300);
|
||||
</script>
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
$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/author.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/author">数据作者</a>');
|
||||
$this->breadcrumb('数据反馈管理');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<!-- 左侧导航 -->
|
||||
<div id='sidebar'>
|
||||
<div id='leftnavi'>
|
||||
<?= $this->partial('author/navi.phtml'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //左侧导航 -->
|
||||
|
||||
<!-- 页面内容 -->
|
||||
<div id="wapper">
|
||||
<div id="tabs-controller">
|
||||
<ul>
|
||||
<li class="box-shadow active"><a class="text-shadow" href="/author/authored">元数据反馈概况</a></li>
|
||||
<li class="box-shadow"><a class="text-shadow" href="/author/authored/ac/listall">所有元数据反馈</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="datalist">
|
||||
<?php
|
||||
if (count($this->paginator)):
|
||||
echo "<ul>";
|
||||
$autoindex=0;
|
||||
foreach ($this->paginator as $item):
|
||||
$autoindex++;?>
|
||||
<li>
|
||||
<p><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><?php echo $item['title'];?></a></p>
|
||||
<p>反馈数: <a href="/author/authored/ac/view/uuid/<?php echo $item['uuid'];?>"><?php echo $item['c'];?></a> <a href="/author/authored/ac/view/uuid/<?php echo $item['uuid'];?>" class="more">查看详细</a></p>
|
||||
</li>
|
||||
<?php endforeach;
|
||||
echo "</ul>";
|
||||
endif; ?>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- //页面内容 -->
|
||||
<script>
|
||||
$('#wapper').width($('body').width()-300);
|
||||
</script>
|
|
@ -27,6 +27,12 @@ $this->breadcrumb()->setSeparator(' > ');
|
|||
<p>您在数据中心发布了一条数据,若需对数据进行修改,则需要进行数据认证。</p>
|
||||
</div>
|
||||
</li>
|
||||
<li id="help_apply">
|
||||
<h1>如何成为已发布数据的作者</h1>
|
||||
<div class="content">
|
||||
<p>登录后,进入网站的“数据作者”→“数据认证”页面,在搜索框内输入您的数据的关键字,然后点击搜索,带列表加载后,点击数据介绍下方的“申请成为此数据的作者”即可进入申请步骤。该功能需要登录后使用(<a href="/author/apply">点击这里</a>可以进入数据认证)</p>
|
||||
</div>
|
||||
</li>
|
||||
<li id="help_inauthor">
|
||||
<h1>在线、离线数据查看与审批功能</h1>
|
||||
<div class="content">
|
||||
|
|
Loading…
Reference in New Issue