From ee80c48617d356bf2989537610968d47eb3ebb3a Mon Sep 17 00:00:00 2001 From: wlx Date: Mon, 5 Jan 2015 07:36:00 +0000 Subject: [PATCH] change to tianditu, fix chinese link problem --- .../default/controllers/DataController.php | 4 +- .../default/views/scripts/data/view.phtml | 88 ++++++++----------- 2 files changed, 40 insertions(+), 52 deletions(-) diff --git a/application/default/controllers/DataController.php b/application/default/controllers/DataController.php index 50dff2bc..2d3f1ea9 100755 --- a/application/default/controllers/DataController.php +++ b/application/default/controllers/DataController.php @@ -853,8 +853,8 @@ class DataController extends Zend_Controller_Action $id = (int)$this->_request->getParam('id'); - $sql="select m.*,s.status,g.id as gid,t.filename,i.doi as datadoi,i.author_en,i.publisher_en, date_part('year',i.ts_published) as publish_year from en.normalmetadata m left join en.mdstatus s on m.uuid=s.uuid - + $sql="select m.*,s.status,g.id as gid,md.id as mdid, t.filename,i.doi as datadoi,i.author_en,i.publisher_en, date_part('year',i.ts_published) as publish_year from en.normalmetadata m left join en.mdstatus s on m.uuid=s.uuid + left join metadata md on m.uuid=md.uuid left join en.thumbnail t on t.id=m.id left join en.geonetworkmetadata g on m.uuid=g.uuid left join datadoi i on i.uuid=m.uuid where "; if (empty($id)) { diff --git a/application/default/views/scripts/data/view.phtml b/application/default/views/scripts/data/view.phtml index f22bfed8..63f60f51 100755 --- a/application/default/views/scripts/data/view.phtml +++ b/application/default/views/scripts/data/view.phtml @@ -3,7 +3,7 @@ $this->headTitle($this->config->title->data); $this->headTitle($this->metadata->title); $this->headTitle()->setSeparator(' - '); - $this->theme->AppendPlus($this,'google_map_v3'); + $this->theme->AppendPlus($this,'tianditu'); $this->theme->AppendPlus($this,'colorbox'); if(!empty($this->dataService)) { $this->theme->AppendModel($this,"dataservice"); @@ -19,7 +19,7 @@ h3.gs_rt{font-size:110%;} metadata;if ($md):?>

escape($md->title); if ($md->title_en) echo '
'.$this->escape($md->title_en); - echo 'Chinese Version';?> + if ($md->mdid) echo 'Chinese Version';?>


@@ -407,7 +407,6 @@ endforeach;

Cannot find the metadata.

@@ -486,37 +507,4 @@ var bound = { theme->AppendPlus($this,'datepicker'); ?> - -dataService)) { ?> - dataService['service_type'] == 2) { ?> - - dataService['service_type'] == 3) {?> - - - \ No newline at end of file