diff --git a/application/default/controllers/DataController.php b/application/default/controllers/DataController.php index 4ce0602e..6a9033f9 100755 --- a/application/default/controllers/DataController.php +++ b/application/default/controllers/DataController.php @@ -1068,7 +1068,6 @@ class DataController extends Zend_Controller_Action $dataservice = new \data\DataService(); $info = $dataservice->get($uuid); - //暂时只有wsn { $this->_helper->layout->disableLayout(); @@ -1103,6 +1102,40 @@ class DataController extends Zend_Controller_Action } + public function glacierAction() + { + $this->_helper->layout->disableLayout(); + $this->_helper->viewRenderer->setNoRender(); + + $uuid = $this->_getParam("uuid"); + $basin = $this->getParam("basin"); + $mountain = $this->getParam("mountain"); + + if(empty($basin) && empty($mountain)) + { + $this->jsonexit(array("error"=>'please select sub dataset')); + return true; + } + + $selections = array( + 'basin' => $basin, + 'mountain' => $mountain + ); + + $order = new Order(); + $state = $order->addOrder($uuid,$selections); + + if($state !== true) + { + $this->jsonexit(array("error"=>$state)); + return true; + }else{ + $this->jsonexit(array('success'=>'Success! You can add more dataset or submit your application.')); + return true; + //$this->view->msg = view::Msg('alert-success',"Success! You can add more dataset or submit your application."); + } + } + public function wsnAction() { $this->_helper->layout->disableLayout(); @@ -2191,6 +2224,7 @@ class DataController extends Zend_Controller_Action $wsn = $this->_request->getParam('wsn'); $pdf = $this->_request->getParam('pdf'); $selections = $this->_request->getParam('data'); + //if (empty($uuid)) $this->_redirect('/data'); $userid = view::User('id'); diff --git a/application/default/views/scripts/data/view.phtml b/application/default/views/scripts/data/view.phtml index 1855bd01..f22bfed8 100755 --- a/application/default/views/scripts/data/view.phtml +++ b/application/default/views/scripts/data/view.phtml @@ -500,8 +500,8 @@ var bound = {