update metadata list in admin
This commit is contained in:
parent
590313d5c7
commit
1c8a523f9b
|
@ -304,7 +304,7 @@ class Admin_DataController extends Zend_Controller_Action
|
|||
$keyword = $this->_getParam('keyword');
|
||||
$att=$this->_getParam('att');
|
||||
$attupdate = $this->_getParam('attupdate');
|
||||
|
||||
$source = (int)$this->_getParam('source');
|
||||
|
||||
if ($delete)
|
||||
{
|
||||
|
@ -498,25 +498,28 @@ class Admin_DataController extends Zend_Controller_Action
|
|||
|
||||
}//search
|
||||
else{
|
||||
|
||||
$sql = "SELECT md.*,s.viewed,g.id as gid,gen.id as genid,st.status as mdstatus,ds.id as datasetid,spatial.stid as stid FROM metadata md
|
||||
LEFT JOIN mdstat s ON md.uuid=s.uuid
|
||||
LEFT JOIN geonetworkmetadata g ON g.uuid=md.uuid
|
||||
LEFT JOIN mdstatus st ON md.uuid=st.uuid
|
||||
LEFT JOIN dataset ds ON md.uuid=ds.uuid and ds.lang in ('','cn')
|
||||
left join en.geonetworkmetadata gen on gen.uuid=md.uuid
|
||||
left join (select count(uuid) as stid,uuid from dataspatial group by uuid) as spatial on spatial.uuid=md.uuid
|
||||
ORDER BY md.id DESC";
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute();
|
||||
$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;
|
||||
$sourceSql = "";
|
||||
$sourceJoin = "";
|
||||
if($source && is_int($source)){
|
||||
$sourceJoin = " LEFT JOIN datasource dsrc ON dsrc.uuid=md.uuid ";
|
||||
$sourceSql = " WHERE dsrc.sourceid=$source ";
|
||||
}
|
||||
|
||||
$sql = "SELECT md.*,s.viewed,g.id as gid,gen.id as genid,st.status as mdstatus,ds.id as datasetid,spatial.stid as stid FROM metadata md
|
||||
LEFT JOIN mdstat s ON md.uuid=s.uuid
|
||||
LEFT JOIN geonetworkmetadata g ON g.uuid=md.uuid
|
||||
LEFT JOIN mdstatus st ON md.uuid=st.uuid
|
||||
LEFT JOIN dataset ds ON md.uuid=ds.uuid and ds.lang in ('','cn')
|
||||
left join en.geonetworkmetadata gen on gen.uuid=md.uuid
|
||||
left join (select count(uuid) as stid,uuid from dataspatial group by uuid) as spatial on spatial.uuid=md.uuid
|
||||
$sourceJoin
|
||||
$sourceSql
|
||||
ORDER BY md.id DESC";
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute();
|
||||
$rows = $sth->fetchAll();
|
||||
|
||||
view::addPaginator($rows, $this, 10);
|
||||
}
|
||||
|
||||
}//mdAction 元数据管理
|
||||
|
|
|
@ -36,7 +36,13 @@
|
|||
<span class="input-group-btn"><button class="btn btn-default" value="搜索">搜索</button></span>
|
||||
</form>
|
||||
</div><!-- search DIV -->
|
||||
<p><a href="/admin/data/md/down/1">下载全部xml元数据</a></p>
|
||||
<p>
|
||||
<a href="/admin/data/md/down/1" class="btn btn-default">下载全部xml元数据</a>
|
||||
<a href="/admin/data/md/1" class="btn btn-default">所有元数据</a>
|
||||
<a href="/admin/data/md/source/9" class="btn btn-default">三极元数据</a>
|
||||
<a href="/admin/data/md/source/10" class="btn btn-default">泛三极元数据</a>
|
||||
<a href="/admin/data/md/source/11" class="btn btn-default">三江源元数据</a>
|
||||
</p>
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<div class="datalist">
|
||||
<ul class="list-unstyled">
|
||||
|
|
32
readme.md
32
readme.md
|
@ -16,4 +16,34 @@ Host sj
|
|||
|
||||
拷贝公钥到服务器下,然后运行部署命令即可部署,无需登录服务器
|
||||
|
||||
`shipit main deploy` or `npm run d`
|
||||
`shipit main deploy` or `npm run d`
|
||||
|
||||
|
||||
### 时空三极网站数据库
|
||||
|
||||
创建用户: `gis`,密码: `gispassword`
|
||||
|
||||
```sql
|
||||
CREATE DATABASE geonetwork
|
||||
WITH
|
||||
OWNER = gis
|
||||
ENCODING = 'UTF8'
|
||||
CONNECTION LIMIT = -1;
|
||||
|
||||
CREATE DATABASE metadata
|
||||
WITH
|
||||
OWNER = gis
|
||||
ENCODING = 'UTF8'
|
||||
CONNECTION LIMIT = -1;
|
||||
```
|
||||
|
||||
然后在两个数据库中分别运行
|
||||
|
||||
```sql
|
||||
CREATE EXTENSION dblink;
|
||||
CREATE EXTENSION hstore;
|
||||
CREATE EXTENSION pgcrypto;
|
||||
CREATE EXTENSION "uuid-ossp";
|
||||
CREATE EXTENSION postgis;
|
||||
CREATE EXTENSION tablefunc;
|
||||
```
|
Loading…
Reference in New Issue