diff --git a/application/default/controllers/SearchController.php b/application/default/controllers/SearchController.php index 76aca128..353d57c9 100644 --- a/application/default/controllers/SearchController.php +++ b/application/default/controllers/SearchController.php @@ -7,6 +7,7 @@ class SearchController extends Zend_Controller_Action $this->view->config = Zend_Registry::get('config'); $this->messenger=$this->_helper->getHelper('FlashMessenger'); $this->view->messages = $this->messenger->getMessages(); + $this->view->theme = new Theme(); $this->view->nav = array( array('link'=>'/','title'=>''), array('link'=>'/data','title'=>$this->view->config->title->data), @@ -38,5 +39,15 @@ class SearchController extends Zend_Controller_Action $this->_helper->viewRenderer->setNoRender(); header("Content-Type: application/json; charset=utf-8"); echo $search->suggest($q); - } + } + function advanceAction() + { + $this->view->east=$this->getParam('east'); + $this->view->west=$this->getParam('west'); + $this->view->south=$this->getParam('south'); + $this->view->north=$this->getParam('north'); + $this->view->begin=$this->getParam('begin'); + $this->view->end=$this->getParam('end'); + $this->view->q=$this->getParam('q'); + } } diff --git a/application/default/views/scripts/data/index.phtml b/application/default/views/scripts/data/index.phtml index e1a1b8e8..5f05f8af 100755 --- a/application/default/views/scripts/data/index.phtml +++ b/application/default/views/scripts/data/index.phtml @@ -26,7 +26,7 @@ $this->headTitle()->setSeparator(' - '); - 高级搜索 + 高级搜索 数据列表浏览 在线数据清单 离线数据清单 diff --git a/application/default/views/scripts/search/advance.phtml b/application/default/views/scripts/search/advance.phtml new file mode 100644 index 00000000..af5cde54 --- /dev/null +++ b/application/default/views/scripts/search/advance.phtml @@ -0,0 +1,212 @@ +headTitle($this->config->title->site); +$this->headTitle($this->config->title->data); +$this->headTitle('高级搜索'); +if (!empty($this->codename)) $this->headTitle($this->codename); +$this->headTitle()->setSeparator(' - '); +$this->headLink()->appendStylesheet('/css/metadata.css'); +$this->breadcrumb('首页'); +$this->breadcrumb(''.$this->config->title->data.''); +$this->breadcrumb('高级搜索'); +$this->breadcrumb()->setSeparator(' > '); +$this->theme->AppendPlus($this,'google_map_v3'); +$this->theme->AppendPlus($this,'google_map_keydragzone'); +$this->theme->AppendPlus($this,'jquery_ui'); +$this->theme->AppendPlus($this,'colorbox'); +?> +
+partial('data/tools.phtml'); ?> +
+metadata)) : + echo $this->page->getNavigation();?> +
+ +metadata as $md) : ?> +
+
+

escape($md['title']);?> +

+ 400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?> +
+ +page->getNavigation();?> + + +
+
+
+ +
+
+ + +
+
搜索说明
+
+ + + + \ No newline at end of file diff --git a/application/default/views/scripts/search/index.phtml b/application/default/views/scripts/search/index.phtml index ebf0a5cf..3d01ccfc 100644 --- a/application/default/views/scripts/search/index.phtml +++ b/application/default/views/scripts/search/index.phtml @@ -1,5 +1,5 @@ nav[] = array('link'=>"/search",'title'=>'全文搜索'); + '; + if ($begin || $end) echo '时间范围'; + if ($begin) echo '开始:'.$begin; + if ($end) echo '结束:'.$end; + if ($east) echo '空间范围 东:'.$east.' 西:'.$west.' 南:'.$south.' 北:'.$north; + echo ''; + } + ?> hot) > 0): ?> @@ -194,11 +212,16 @@ $(function(){ // submit check $('#q-form').submit(function(){ var $input = $('#q-input .text'); - if ($input.val() == $input.attr('title')) { + /*if ($input.val() == $input.attr('title')) { alert('请先输入关键词'); $input.focus(); return false; - } + }*/ + }); + //advance search + $('#advance').click(function(){ + $('#q-form').attr('action','/search/advance'); + $('#q-form').submit(); }); });