更新数据首页布局
This commit is contained in:
parent
9d5c2d0c07
commit
facbc0d5c4
|
@ -45,7 +45,9 @@ class DataController extends Zend_Controller_Action
|
||||||
$k5=$state->fetchAll();
|
$k5=$state->fetchAll();
|
||||||
$this->view->keywords=array('place'=>$k1,'theme'=>$k2,'discipline'=>$k3,'stratum'=>$k4,'temporal'=>$k5);
|
$this->view->keywords=array('place'=>$k1,'theme'=>$k2,'discipline'=>$k3,'stratum'=>$k4,'temporal'=>$k5);
|
||||||
//最新10个入库数据
|
//最新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();
|
$this->view->metadata = $state->fetchAll();
|
||||||
//服务
|
//服务
|
||||||
$searchform=new SearchForm();
|
$searchform=new SearchForm();
|
||||||
|
|
|
@ -57,12 +57,22 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<h4>数据最近更新<a href="/service/feed" target="_blank"><i class=“icon-rss”></i></a></h4>
|
<div class="span6">
|
||||||
|
<h4>数据最近更新<a href="/service/feed" target="_blank"><i class="icon-rss"></i></a></h4>
|
||||||
<ul class="unstyled">
|
<ul class="unstyled">
|
||||||
<?php foreach($this->metadata as $md) : ?>
|
<?php foreach($this->metadata as $md) : ?>
|
||||||
<li><i class=“icon-map-marker”></i><a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a> </li>
|
<li><i class="icon-map-marker"></i><a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a> [<?= date('Y-m-d',strtotime($md['ts_created'])) ?>]</li>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<li class="more"><a href="/data/browse" class="pull-right">更多</a></li>
|
<li class="more"><a href="/data/browse" class="pull-right">更多</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="span6">
|
||||||
|
<h4>最多浏览数据集<a href="/service/feed" target="_blank"><i class="icon-rss"></i></a></h4>
|
||||||
|
<ul class="unstyled">
|
||||||
|
<?php foreach($this->viewedmd as $md) : ?>
|
||||||
|
<li><i class="icon-map-marker"></i><a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a>[<?= $md['viewed'] ?>]</li>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<li class="more"><a href="/data/browse" class="pull-right">更多</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
Loading…
Reference in New Issue