From 9d5c2d0c0744a949537d27c68266aaa8dd85dd0c Mon Sep 17 00:00:00 2001 From: wlx Date: Wed, 18 Jun 2014 05:32:36 +0000 Subject: [PATCH 1/7] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BB=A5=E5=8F=8A=E4=BF=AE=E5=A4=8D=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../default/views/scripts/data/index.phtml | 20 +++++++++---------- .../default/views/scripts/index/index.phtml | 4 ++-- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/application/default/views/scripts/data/index.phtml b/application/default/views/scripts/data/index.phtml index 942f1c1b..776c4412 100755 --- a/application/default/views/scripts/data/index.phtml +++ b/application/default/views/scripts/data/index.phtml @@ -31,17 +31,6 @@ - -
-

 

- -
+
+

数据最近更新

+ +
diff --git a/application/default/views/scripts/index/index.phtml b/application/default/views/scripts/index/index.phtml index 9535b096..3944e3e0 100755 --- a/application/default/views/scripts/index/index.phtml +++ b/application/default/views/scripts/index/index.phtml @@ -92,7 +92,7 @@ - 更多>> + 更多>> @@ -106,7 +106,7 @@ - 更多>> + 更多>> From facbc0d5c410c5455a53267533277b308faceff6 Mon Sep 17 00:00:00 2001 From: wlx Date: Wed, 18 Jun 2014 05:48:26 +0000 Subject: [PATCH 2/7] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../default/controllers/DataController.php | 4 +++- .../default/views/scripts/data/index.phtml | 16 +++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/application/default/controllers/DataController.php b/application/default/controllers/DataController.php index db6809b7..c7cc0b63 100755 --- a/application/default/controllers/DataController.php +++ b/application/default/controllers/DataController.php @@ -45,7 +45,9 @@ class DataController extends Zend_Controller_Action $k5=$state->fetchAll(); $this->view->keywords=array('place'=>$k1,'theme'=>$k2,'discipline'=>$k3,'stratum'=>$k4,'temporal'=>$k5); //最新10个入库数据 - $state=$this->db->query("select id,uuid,title from {$this->submd} order by id desc limit 10"); + $state=$this->db->query("select id,uuid,title,ts_created from {$this->submd} order by ts_created desc limit 10"); + $this->view->metadata = $state->fetchAll(); + $state=$this->db->query("select m.id,m.uuid,m.title,s.viewed from {$this->submd} m left join mdstat s on m.uuid=s.uuid order by s.viewed desc limit 10"); $this->view->metadata = $state->fetchAll(); //服务 $searchform=new SearchForm(); diff --git a/application/default/views/scripts/data/index.phtml b/application/default/views/scripts/data/index.phtml index 776c4412..57304d25 100755 --- a/application/default/views/scripts/data/index.phtml +++ b/application/default/views/scripts/data/index.phtml @@ -57,12 +57,22 @@
-

数据最近更新

+
+

数据最近更新

- +
+

最多浏览数据集

+ +
+
\ No newline at end of file From 265f09bb4d3bb62a1413f9094f5fa4eb527132ce Mon Sep 17 00:00:00 2001 From: wlx Date: Wed, 18 Jun 2014 05:49:30 +0000 Subject: [PATCH 3/7] fix code error --- application/default/controllers/DataController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/default/controllers/DataController.php b/application/default/controllers/DataController.php index c7cc0b63..e2f3a756 100755 --- a/application/default/controllers/DataController.php +++ b/application/default/controllers/DataController.php @@ -48,7 +48,7 @@ class DataController extends Zend_Controller_Action $state=$this->db->query("select id,uuid,title,ts_created from {$this->submd} order by ts_created desc limit 10"); $this->view->metadata = $state->fetchAll(); $state=$this->db->query("select m.id,m.uuid,m.title,s.viewed from {$this->submd} m left join mdstat s on m.uuid=s.uuid order by s.viewed desc limit 10"); - $this->view->metadata = $state->fetchAll(); + $this->view->viewedmd = $state->fetchAll(); //服务 $searchform=new SearchForm(); $this->view->searchform=$searchform; From 295728d7ffb6ebf58771ca5d203f496fcda44c5b Mon Sep 17 00:00:00 2001 From: wlx Date: Wed, 18 Jun 2014 05:51:06 +0000 Subject: [PATCH 4/7] remove more link --- application/default/views/scripts/data/index.phtml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/application/default/views/scripts/data/index.phtml b/application/default/views/scripts/data/index.phtml index 57304d25..1086b155 100755 --- a/application/default/views/scripts/data/index.phtml +++ b/application/default/views/scripts/data/index.phtml @@ -63,16 +63,14 @@ metadata as $md) : ?>
  • escape($md['title']);?> []
  • -
  • 更多
  • -

    最多浏览数据集

    +

    最多浏览数据集

    \ No newline at end of file From efc508c58c3eca67020fe1aa1c21269740968eb1 Mon Sep 17 00:00:00 2001 From: wlx Date: Wed, 18 Jun 2014 06:19:54 +0000 Subject: [PATCH 5/7] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8F=AF=E8=A7=86?= =?UTF-8?q?=E5=8C=96=E6=95=B0=E6=8D=AE=E7=9A=84=E6=8E=92=E5=BA=8F=E6=96=B9?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/module/Westdc/Visual/Visual.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/module/Westdc/Visual/Visual.php b/application/module/Westdc/Visual/Visual.php index fe1c1404..d4a59fa6 100644 --- a/application/module/Westdc/Visual/Visual.php +++ b/application/module/Westdc/Visual/Visual.php @@ -115,7 +115,8 @@ class Visual { $sql = "SELECT * FROM {$this->metadataTable} md LEFT JOIN {$this->mainTable} v ON v.uuid = md.uuid - WHERE v.uuid IS NOT NULL"; + WHERE v.uuid IS NOT NULL + order by v.ts_changed desc"; $rs = $this->db->query($sql); return $rs->fetchAll(\PDO::FETCH_ASSOC); From 6e9b2c81cce6a0735c7cb6368a437f46cfce7c33 Mon Sep 17 00:00:00 2001 From: wlx Date: Wed, 18 Jun 2014 06:24:53 +0000 Subject: [PATCH 6/7] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=A9=E7=95=A5?= =?UTF-8?q?=E5=9B=BE=E6=B5=8F=E8=A7=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/default/controllers/DataController.php | 4 ++-- application/default/views/scripts/data/index.phtml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/application/default/controllers/DataController.php b/application/default/controllers/DataController.php index e2f3a756..bc060e88 100755 --- a/application/default/controllers/DataController.php +++ b/application/default/controllers/DataController.php @@ -1800,11 +1800,11 @@ class DataController extends Zend_Controller_Action $page=(int)$this->_request->getParam('page'); if (empty($page)) $page=1; $offset=$this->limit*($page-1); - $state=$this->db->query("select count(*) from normalmetadata"); + $state=$this->db->query("select count(*) from $this->submd"); $row=$state->fetchAll(); $sum=$row[0]['count']; $select=$this->db->select(); - $select->from('normalmetadata as m','m.*') + $select->from($this->submd.' as m','m.*') ->order('m.title desc')->limitPage($page,9); $this->view->metadata = $this->db->fetchAll($select); $this->view->page=new Pagination($sum,$page,$this->limit); diff --git a/application/default/views/scripts/data/index.phtml b/application/default/views/scripts/data/index.phtml index 1086b155..61aa073e 100755 --- a/application/default/views/scripts/data/index.phtml +++ b/application/default/views/scripts/data/index.phtml @@ -7,6 +7,7 @@