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');
|
$keyword = $this->_getParam('keyword');
|
||||||
$att=$this->_getParam('att');
|
$att=$this->_getParam('att');
|
||||||
$attupdate = $this->_getParam('attupdate');
|
$attupdate = $this->_getParam('attupdate');
|
||||||
|
$source = (int)$this->_getParam('source');
|
||||||
|
|
||||||
if ($delete)
|
if ($delete)
|
||||||
{
|
{
|
||||||
|
@ -498,6 +498,12 @@ class Admin_DataController extends Zend_Controller_Action
|
||||||
|
|
||||||
}//search
|
}//search
|
||||||
else{
|
else{
|
||||||
|
$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
|
$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 mdstat s ON md.uuid=s.uuid
|
||||||
|
@ -506,17 +512,14 @@ class Admin_DataController extends Zend_Controller_Action
|
||||||
LEFT JOIN dataset ds ON md.uuid=ds.uuid and ds.lang in ('','cn')
|
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 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
|
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";
|
ORDER BY md.id DESC";
|
||||||
$sth = $this->db->prepare($sql);
|
$sth = $this->db->prepare($sql);
|
||||||
$sth->execute();
|
$sth->execute();
|
||||||
$rows = $sth->fetchAll();
|
$rows = $sth->fetchAll();
|
||||||
|
|
||||||
$paginator = Zend_Paginator::factory($rows);
|
view::addPaginator($rows, $this, 10);
|
||||||
$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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}//mdAction 元数据管理
|
}//mdAction 元数据管理
|
||||||
|
|
|
@ -36,7 +36,13 @@
|
||||||
<span class="input-group-btn"><button class="btn btn-default" value="搜索">搜索</button></span>
|
<span class="input-group-btn"><button class="btn btn-default" value="搜索">搜索</button></span>
|
||||||
</form>
|
</form>
|
||||||
</div><!-- search DIV -->
|
</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)): ?>
|
<?php if (count($this->paginator)): ?>
|
||||||
<div class="datalist">
|
<div class="datalist">
|
||||||
<ul class="list-unstyled">
|
<ul class="list-unstyled">
|
||||||
|
|
30
readme.md
30
readme.md
|
@ -17,3 +17,33 @@ 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