在单数据版本中添加编辑链接
This commit is contained in:
parent
a5c49863b8
commit
2a877badb9
|
@ -1994,9 +1994,10 @@ class Admin_DataController extends Zend_Controller_Action
|
|||
if (!empty($uuid) && empty($ac))
|
||||
{
|
||||
//view the versions of the data
|
||||
$sql = "SELECT md.title,md.uuid,v.ts_created,v.changelog,v.userid,v.id,u.username,u.realname FROM mdversion v
|
||||
$sql = "SELECT md.title,md.uuid,v.ts_created,v.changelog,v.userid,v.id,u.username,u.realname,g.id as gid FROM mdversion v
|
||||
LEFT JOIN metadata md ON md.uuid=v.uuid
|
||||
left join users u on v.userid=u.id
|
||||
left join geonetworkmetadata g on md.uuid=g.uuid
|
||||
WHERE md.title IS NOT NULL AND v.uuid=?
|
||||
order by v.ts_created desc
|
||||
";
|
||||
|
|
|
@ -32,11 +32,20 @@ $this->breadcrumb()->setSeparator(' > ');
|
|||
if ($this->mdtitle) echo "<h2>元数据:".$this->mdtitle."</h2>";
|
||||
echo "<ul>";
|
||||
$autoindex=0;
|
||||
$edited=false;
|
||||
foreach ($this->paginator as $item):
|
||||
$autoindex++;?>
|
||||
<li id="list_<?php echo $item['id'];?>">
|
||||
<p><a href="/data/<?php echo $item['uuid'];?>" target="_blank"><?php echo $item['title'];?></a>
|
||||
【<a href="/admin/data/version/uuid/<?php echo $item['uuid']; ?>">查看此数据所有版本</a>】</p>
|
||||
【<a href="/admin/data/version/uuid/<?php echo $item['uuid']; ?>">查看此数据所有版本</a>
|
||||
<?php
|
||||
if (!$edited && @$item['gid'])
|
||||
{
|
||||
$edited=true;
|
||||
echo '<a href="/service/geonetwork?url=metadata.edit?id='.$item['gid'].'" target="_blank">编辑最新版本</a> ';
|
||||
}
|
||||
?>
|
||||
】</p>
|
||||
<p>版本创建时间: <?php echo date("Y-m-d H:i",strtotime($item['ts_created']));?>
|
||||
<?php if ($item['userid']) :
|
||||
echo "发布人: ".(empty($item['realname'])?$item['username']:$item['realname'])." ";
|
||||
|
|
Loading…
Reference in New Issue