添加了可视化数据的浏览列表
This commit is contained in:
parent
4833a99d8a
commit
697dbe4529
File diff suppressed because it is too large
Load Diff
|
@ -22,7 +22,7 @@ $this->headTitle()->setSeparator(' - ');
|
||||||
<a class="btn" href="/data/browse"><i class="icon-reorder"></i>数据列表浏览</a>
|
<a class="btn" href="/data/browse"><i class="icon-reorder"></i>数据列表浏览</a>
|
||||||
<a class="btn" href="/data/onlinelist"><i class="icon-th"></i>在线数据清单</a>
|
<a class="btn" href="/data/onlinelist"><i class="icon-th"></i>在线数据清单</a>
|
||||||
<a class="btn" href="/data/offlinelist"><i class="icon-th"></i>离线数据清单</a>
|
<a class="btn" href="/data/offlinelist"><i class="icon-th"></i>离线数据清单</a>
|
||||||
|
<a class="btn" href="/data/visual"><i class="icon-th"></i>可视化数据</a>
|
||||||
</form>
|
</form>
|
||||||
<ul class="unstyled inline">
|
<ul class="unstyled inline">
|
||||||
<li><a class="btn" href="/data/thumb"><i class="icon-picture"></i>缩略图浏览</a></li>
|
<li><a class="btn" href="/data/thumb"><i class="icon-picture"></i>缩略图浏览</a></li>
|
||||||
|
|
|
@ -0,0 +1,59 @@
|
||||||
|
<?php
|
||||||
|
$this->headTitle($this->config->title->site);
|
||||||
|
$this->headTitle($this->config->title->data);
|
||||||
|
if (!empty($this->codename)) $this->headTitle($this->codename);
|
||||||
|
$this->headTitle()->setSeparator(' - ');
|
||||||
|
$this->headLink()->appendStylesheet('/css/metadata.css');
|
||||||
|
$this->nav[] = array('link'=>"/data/tag",'title'=>'关键词浏览');
|
||||||
|
$this->theme->AppendPlus($this,'colorbox');
|
||||||
|
?>
|
||||||
|
<div id='row-fluid'>
|
||||||
|
<?= $this->render('breadcrumbs.phtml') ?>
|
||||||
|
<?= $this->partial('data/tools.phtml'); ?>
|
||||||
|
</div>
|
||||||
|
<?php if (!empty($this->paginator)) : ?>
|
||||||
|
<div id='metacontent'>
|
||||||
|
<h1>当前浏览:<?php echo $this->codename; ?></h1>
|
||||||
|
<?php echo $this->paginator; ?>
|
||||||
|
<hr />
|
||||||
|
<?php foreach($this->paginator as $md) : ?>
|
||||||
|
<div class="mditem">
|
||||||
|
<div class="thumb">
|
||||||
|
<a href="/service/bigthumb/uuid/<?= $md['uuid'] ?>" class="colorbox">
|
||||||
|
<img src="/service/thumb/id/<?php echo $md['id'];?>" />
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<h2><a href="/data/<?php echo $md['uuid']; ?>"><?php echo $this->escape($md['title']);?></a></h2>
|
||||||
|
<span><?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?></span>
|
||||||
|
</div>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
<?php echo $this->paginator; ?>
|
||||||
|
</div>
|
||||||
|
<?php else : ?>
|
||||||
|
<div id='leftnav'>
|
||||||
|
<?php
|
||||||
|
$keytypezh=array('place'=>'地点关键词','theme'=>'主题关键词','discipline'=>'学科关键词','stratum'=>'地层关键词','temporal'=>'时间关键词');
|
||||||
|
$type='';
|
||||||
|
foreach($this->keywords as $cg) :
|
||||||
|
if ($type!=$cg['keytype']) :
|
||||||
|
if ($type!='') : ?>
|
||||||
|
</ul></fieldset>
|
||||||
|
<?php endif;
|
||||||
|
$type=$cg['keytype'];
|
||||||
|
?>
|
||||||
|
<fieldset><legend><?php echo $keytypezh[$type]; ?></legend>
|
||||||
|
<ul>
|
||||||
|
<li><a href='/data/tag/<?php echo urlencode($cg['keyword']); ?>'><?php echo $cg['keyword']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
|
||||||
|
<?php else : ?>
|
||||||
|
<li><a href='/data/tag/<?php echo urlencode($cg['keyword']); ?>'><?php echo $cg['keyword']; ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
|
||||||
|
<?php endif; ?>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</ul>
|
||||||
|
</fieldset></div>
|
||||||
|
<?php endif; ?>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function(){
|
||||||
|
$(".colorbox").colorbox({rel:"colorbox",photo:"true",transition:"fade"});
|
||||||
|
$(".colorbox").colorbox({photo:"true"});
|
||||||
|
});
|
||||||
|
</script>
|
|
@ -9,7 +9,10 @@ class Curl
|
||||||
|
|
||||||
public function __construct($options = array())
|
public function __construct($options = array())
|
||||||
{
|
{
|
||||||
|
if(count($options) == 0)
|
||||||
|
{
|
||||||
|
$this->initOptions();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function initOptions($options = array())
|
public function initOptions($options = array())
|
||||||
|
|
|
@ -97,4 +97,15 @@ class Visual
|
||||||
$rs = $this->db->query($sql);
|
$rs = $this->db->query($sql);
|
||||||
return $rs->fetch(\PDO::FETCH_ASSOC);
|
return $rs->fetch(\PDO::FETCH_ASSOC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//获得可以可视化的元数据
|
||||||
|
public function getVisualMetadata()
|
||||||
|
{
|
||||||
|
$sql = "SELECT * FROM metadata md
|
||||||
|
LEFT JOIN {$this->mainTable} v ON v.uuid = md.uuid
|
||||||
|
WHERE v.uuid IS NOT NULL
|
||||||
|
";
|
||||||
|
$rs = $this->db->query($sql);
|
||||||
|
return $rs->fetch(\PDO::FETCH_ASSOC);
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue