From 1890f8f8ddbd8226c8ac1e532af998e6cad0ceaa Mon Sep 17 00:00:00 2001 From: wlx Date: Tue, 16 Apr 2013 09:38:28 +0000 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=86=E5=8D=95=E4=BD=8D?= =?UTF-8?q?=E6=B5=8F=E8=A7=88=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../default/controllers/DataController.php | 24 ++++++++++- .../default/views/scripts/data/index.phtml | 4 +- .../views/scripts/data/organization.phtml | 43 +++++++++++++++++++ .../views/scripts/heihe/economic.phtml | 3 +- 4 files changed, 70 insertions(+), 4 deletions(-) create mode 100644 application/default/views/scripts/data/organization.phtml diff --git a/application/default/controllers/DataController.php b/application/default/controllers/DataController.php index d9338256..0b5e9252 100755 --- a/application/default/controllers/DataController.php +++ b/application/default/controllers/DataController.php @@ -1940,6 +1940,28 @@ class DataController extends Zend_Controller_Action public function jsonexit($data){ $this->getResponse()->setHeader('Content-Type', 'application/json')->appendBody(json_encode($data,JSON_NUMERIC_CHECK)); return true; - } + } + function organizationAction() + { + $page = $this->_request->getParam('page'); + $name = $this->_request->getParam('name'); + $state=$this->db->query("select distinct responsible.organisation from responsible left join role on role.resid=responsible.id where role.role in ('pointOfContact','resourceProvider','owner')"); + $this->view->organisation=$state->fetchAll(); + if (!empty($name)) { + $this->view->codename=$name; + $sql="select distinct m.* from normalmetadata m left join role r on m.uuid=r.uuid left join responsible s on r.resid=s.id where r.role in ('pointOfContact','resourceProvider','owner') and s.organisation=?"; + $sth = $this->db->prepare($sql); + $sth->execute(array($name)); + $rows = $sth->fetchAll(); + $paginator = Zend_Paginator::factory($rows); + $paginator->setCurrentPageNumber($this->_getParam('page')); + $paginator->setItemCountPerPage(10); + $paginator->setView($this->view); + Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml'); + $this->view->paginator=$paginator; + } else { + //提供全部分类列表 + } + } } diff --git a/application/default/views/scripts/data/index.phtml b/application/default/views/scripts/data/index.phtml index 62cf3642..98b26486 100755 --- a/application/default/views/scripts/data/index.phtml +++ b/application/default/views/scripts/data/index.phtml @@ -38,8 +38,8 @@ $this->headTitle()->setSeparator(' - ');
  • 空间浏览
  • 时空浏览
  • 单位浏览
  • -
  • 项目浏览
  • -
  • 作者浏览
  • +
  • 项目浏览
  • +
  • 作者浏览
  • 文献浏览
  • diff --git a/application/default/views/scripts/data/organization.phtml b/application/default/views/scripts/data/organization.phtml new file mode 100644 index 00000000..c897001b --- /dev/null +++ b/application/default/views/scripts/data/organization.phtml @@ -0,0 +1,43 @@ +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->breadcrumb('首页'); +$this->breadcrumb(''.$this->config->title->data.''); +$this->breadcrumb('分单位浏览'); +if (!empty($this->codename)) $this->breadcrumb($this->codename); +$this->breadcrumb()->setSeparator(' > '); +?> + +
    +
    breadcrumb() ?>
    +partial('data/tools.phtml'); ?> +
    + +paginator)) : ?> +

    当前浏览:codename; ?>

    + + + + +
    +
    + \ No newline at end of file diff --git a/application/default/views/scripts/heihe/economic.phtml b/application/default/views/scripts/heihe/economic.phtml index ffc32c5b..a52a31ec 100644 --- a/application/default/views/scripts/heihe/economic.phtml +++ b/application/default/views/scripts/heihe/economic.phtml @@ -13,7 +13,8 @@ $this->breadcrumb()->setSeparator(' > ');
    partial('heihe/navi.phtml'); ?>
    -
    +
    +
    breadcrumb() ?>

    各类社会经济数据。