页面更新
This commit is contained in:
parent
d1ae54eaef
commit
301d780da7
|
@ -223,7 +223,7 @@ class WaterController extends DataController
|
|||
function tagAction()
|
||||
{
|
||||
$key = $this->_request->getParam('key');
|
||||
$page=(int)$this->_request->getParam('page');
|
||||
$page=(int)$this->_request->getParam('page');
|
||||
if (empty($page)) $page=1;
|
||||
$offset=$this->limit*($page-1);
|
||||
if (!empty($key)) {
|
||||
|
@ -239,7 +239,11 @@ class WaterController extends DataController
|
|||
$state=$this->db->query("select keyword.keyword,count(*) from keyword left join normalmetadata m on keyword.id=m.id where keyword.keytype='place' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') group by keyword.keyword order by count desc");
|
||||
$k1=$state->fetchAll();
|
||||
$state=$this->db->query("select k.keyword,count(k.keyword) from keyword k left join normalmetadata m on k.id=m.id where k.keytype='theme' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') group by k.keyword order by k.keyword");
|
||||
$k2=$state->fetchAll();
|
||||
$k2=$state->fetchAll();
|
||||
$state=$this->db->query("select k.keyword,count(k.keyword) from keyword k left join normalmetadata m on k.id=m.id where k.keytype='discipline' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') group by k.keyword order by k.keyword");
|
||||
$k3=$state->fetchAll();
|
||||
$state=$this->db->query("select k.keyword,count(k.keyword) from keyword k left join normalmetadata m on k.id=m.id where k.keytype='stratum' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') group by k.keyword order by k.keyword");
|
||||
$k4=$state->fetchAll();
|
||||
$state=$this->db->query("select keyword.keyword,count(*) from keyword left join normalmetadata m on keyword.id=m.id where keyword.keytype='temporal' and m.uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='water') group by keyword.keyword order by keyword.keyword");
|
||||
$k5=$state->fetchAll();
|
||||
$this->view->keywords=array('place'=>$k1,'theme'=>$k2,'discipline'=>$k3,'stratum'=>$k4,'temporal'=>$k5);
|
||||
|
|
|
@ -26,7 +26,6 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
|
|||
<?php echo str_replace(array("\r\n", "\n", "\r"),'</p><p>',$md->description);?>
|
||||
</p>
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
<?php if ($md->citation) : ?>
|
||||
<hr />
|
||||
|
@ -90,7 +89,7 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
|
|||
<?php endif; ?>
|
||||
<?php if ($this->resources) : ?>
|
||||
<h4><i class="icon-bolt text-warning"></i>相关资源</h4>
|
||||
<ul class="unstyled"><?php foreach($this->resources as $link) : ?>
|
||||
<ul class="unstyled inline"><?php foreach($this->resources as $link) : ?>
|
||||
<li><a class="label" href="<?php echo $link->linkage; ?>" title="<?php echo $link->description; ?>">
|
||||
<?php
|
||||
if (!empty($link->name))
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
</ul>
|
||||
<ul class="nav nav-pills nav-stacked">
|
||||
<li id="Nav-heihe-document"><a href="/heihe/document">黑河文档</a></li>
|
||||
<li id="Nav-heihe-list"><a href="/heihe/list">数据列表</a></li>
|
||||
<!-- <li id="Nav-heihe-list"><a href="/heihe/list">数据列表</a></li> -->
|
||||
<li id="Nav-heihe-browse"><a href="/heihe/browse">整体浏览</a></li>
|
||||
<li id="Nav-heihe-category"><a href="/heihe/category">ISO19115分类</a></li>
|
||||
<!-- <li id="Nav-heihe-category"><a href="/heihe/category">ISO19115分类</a></li> -->
|
||||
<li id="Nav-heihe-thumb"><a href="/heihe/thumb">缩略图浏览</a></li>
|
||||
<li id="Nav-heihe-tag"><a href="/heihe/tag">关键词导航</a></li>
|
||||
<li id="Nav-heihe-timeline"><a href="/heihe/timeline">时间轴导航</a></li>
|
||||
|
|
|
@ -9,56 +9,74 @@ $this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
|
|||
$this->breadcrumb('<a href="/heihe/">'.$this->config->title->heihe.'</a>');
|
||||
$this->breadcrumb('时空联合导航');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
//$this->headScript()->appendFile('http://maps.google.cN/maps?file=api&v=2&key='.$this->config->google->maps->api);
|
||||
$this->theme->AppendPlus($this,'google_map_v3');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
$this->headScript()->appendFile('/js/timeline_var.js');
|
||||
$this->headScript()->appendFile('/js/timeline_js/timeline-api.js');
|
||||
$this->headScript()->appendFile('/js/timemap.2.0.1/lib/mxn/mxn.js?(google)');
|
||||
$this->headScript()->appendFile('/js/timemap.2.0.1/lib/mxn/mxn.js?(googlev3)');
|
||||
$this->headScript()->appendFile('/js/timemap.2.0.1/timemap.pack.js');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
?>
|
||||
?>
|
||||
<style>
|
||||
img{max-width:none}
|
||||
</style>
|
||||
<div class="row">
|
||||
<div class="span2">
|
||||
<?= $this->partial('heihe/navi.phtml'); ?>
|
||||
</div>
|
||||
<div class="span10">
|
||||
<div id="timemap">
|
||||
<div id="watermap" style="height:500px;width:40%;float:right;"></div>
|
||||
<div id="map" style="height:500px;width:40%;float:right;"></div>
|
||||
<div id="timeline" style="height:500px;border-right:1px solid #abc;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
var tm;
|
||||
$(window).bind("load", function() { var timeout = setTimeout(function() { initLoader(); }, 100);});
|
||||
//$(window).bind("load", function() { var timeout = setTimeout(function() { gmaploaded(); }, 1000);});
|
||||
function loadMaps() {
|
||||
google.load("maps", "2", {"callback" : tmloaded,"base_domain": "ditu.google.cn"});
|
||||
}
|
||||
|
||||
function initLoader() {
|
||||
var script = document.createElement("script");
|
||||
script.src = "https://www.google.com/jsapi?key=<?php echo $this->config->google->maps->api; ?>&callback=loadMaps";
|
||||
script.type = "text/javascript";
|
||||
document.getElementsByTagName("head")[0].appendChild(script);
|
||||
}
|
||||
function tmloaded() {
|
||||
tm = TimeMap.init({
|
||||
mapId: "watermap", // Id of map div element (required)
|
||||
timelineId: "timeline", // Id of timeline div element (required)
|
||||
scrollTo: "2000-01-01",
|
||||
options: {
|
||||
eventIconPath: "../images/",
|
||||
mapType:G_HYBRID_MAP,
|
||||
mapCenter: new GLatLng(39,100)
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$('#map').height($(window).height());
|
||||
$('#timeline').height($(window).height());
|
||||
$("html,body").animate({scrollTop:$('#timemap').offset().top},600);
|
||||
var tm;
|
||||
$(function() {
|
||||
|
||||
// make a custom map style
|
||||
var styledMapType = new google.maps.StyledMapType([
|
||||
{
|
||||
featureType: "water",
|
||||
elementType: "all",
|
||||
stylers: [
|
||||
{ saturation: 0 },
|
||||
{ lightness: 100 }
|
||||
]
|
||||
},
|
||||
datasets: [
|
||||
{
|
||||
featureType: "all",
|
||||
elementType: "all",
|
||||
stylers: [
|
||||
{ saturation: -100 }
|
||||
]
|
||||
}
|
||||
], {
|
||||
name: "white"
|
||||
});
|
||||
|
||||
tm = TimeMap.init({
|
||||
mapId: "map", // Id of map div element (required)
|
||||
timelineId: "timeline", // Id of timeline div element (required)
|
||||
scrollTo: "2000-01-01",
|
||||
options: {
|
||||
eventIconPath: "../images/"
|
||||
},
|
||||
datasets: [
|
||||
{
|
||||
data:{
|
||||
id: "artists",
|
||||
title: "Artists",
|
||||
theme: "orange",
|
||||
// note that the lines below are now the preferred syntax
|
||||
type: "basic",
|
||||
value: [
|
||||
<?php foreach($this->rows as $row) : ?>
|
||||
options: {
|
||||
items: [
|
||||
<?php
|
||||
foreach($this->rows as $row) : ?>
|
||||
{
|
||||
"start" : "<?php echo $row['timebegin']; ?>",
|
||||
<?php if ($row['timeend']!='') : ?>
|
||||
|
@ -71,23 +89,25 @@ function tmloaded() {
|
|||
},
|
||||
"title" : "<?php echo htmlspecialchars($row['title']); ?>",
|
||||
"options" : {
|
||||
// set the full HTML for the info window
|
||||
"infoHtml": "<div class='info'><a href=/heihe/view/uuid/<?php echo $row['uuid']; ?>><?php echo htmlspecialchars($row['title']); ?></a><hr /><img src=/service/thumb/id/<?php echo $row['id']; ?> onclick='$.colorbox({photo:\"true\",href:\"/service/bigthumb/id/<?php echo $row['id']; ?>\"});' /></div>",
|
||||
"theme":"orange"
|
||||
}
|
||||
"theme":"orange"
|
||||
}
|
||||
},
|
||||
<?php endforeach; ?>
|
||||
]
|
||||
<?php endforeach; ?>
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
bandIntervals: [
|
||||
Timeline.DateTime.MONTH,
|
||||
Timeline.DateTime.YEAR
|
||||
Timeline.DateTime.DECADE
|
||||
]
|
||||
});
|
||||
// manipulate the timemap further here if you like
|
||||
var map=tm.map;
|
||||
map.setCenter(new GLatLng(39,100),7);
|
||||
}
|
||||
</script>
|
||||
|
||||
// set the map to our custom style
|
||||
var gmap = tm.getNativeMap();
|
||||
gmap.mapTypes.set("white", styledMapType);
|
||||
gmap.setMapTypeId("white");
|
||||
});
|
||||
|
||||
</script>
|
|
@ -16,26 +16,28 @@
|
|||
h3.gs_rt{font-size:110%;}
|
||||
</style>
|
||||
<?php $md=$this->metadata;if ($md):?>
|
||||
<h1><?php echo $this->escape($md->title);
|
||||
if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
|
||||
</h1>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="span2">
|
||||
<?= $this->partial('heihe/navi.phtml'); ?>
|
||||
</div>
|
||||
<div class="span6">
|
||||
</div>
|
||||
<div class="span10">
|
||||
<h3><?php echo $this->escape($md->title);
|
||||
if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
|
||||
</h3>
|
||||
<hr />
|
||||
|
||||
</div>
|
||||
<div class="span6">
|
||||
<div>
|
||||
<a class="colorbox pull-right" title="<?php echo $md->title; ?>" href="/service/bigthumb/uuid/<?php echo $md->uuid; ?>"><img src="/service/thumb/uuid/<?php echo $md->uuid;?>"/></a>
|
||||
<p style="word-break:break-all;word-wrap:break-word;overflow:hidden;">
|
||||
<?php echo str_replace(array("\r\n", "\n", "\r"),'</p><p>',$md->description);?>
|
||||
</p>
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
<?php if ($md->citation) : ?>
|
||||
<hr />
|
||||
<h4><i class="icon-quote-left muted"></i>本数据引用方式</h4>
|
||||
<h4><i class="icon-quote-left muted"></i>本数据引用方式<a class="btn btn-danger pull-right" href="#" ><i class="icon-comment"></i>数据引用帮助</a></h4>
|
||||
<p><?php echo $this->escape($md->citation);?></p>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->ref) : ?>
|
||||
|
@ -95,8 +97,8 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
|
|||
<?php endif; ?>
|
||||
<?php if ($this->resources) : ?>
|
||||
<h4><i class="icon-bolt text-warning"></i>相关资源</h4>
|
||||
<ul class="unstyled"><?php foreach($this->resources as $link) : ?>
|
||||
<li><a href="<?php echo $link->linkage; ?>" title="<?php echo $link->description; ?>">
|
||||
<ul class="unstyled inline"><?php foreach($this->resources as $link) : ?>
|
||||
<li><a class="label" href="<?php echo $link->linkage; ?>" title="<?php echo $link->description; ?>">
|
||||
<?php
|
||||
if (!empty($link->name))
|
||||
echo $link->name;
|
||||
|
@ -262,6 +264,9 @@ foreach($this->keys as $cg) :
|
|||
echo '<li><a href="/data/tag/key/'.urlencode($cg['keyword']).'"><i class="icon-tag"></i>'.$cg['keyword'].'</a></li>';
|
||||
endforeach;
|
||||
?></ul>
|
||||
<?php if ($md->doi) : ?>
|
||||
<ul class="well well-small inline unstyled"><li><span class="label label-success">数据DOI</span> <?php echo $md->doi; ?></li></ul>
|
||||
<?php endif; ?>
|
||||
|
||||
<div>
|
||||
<hr />
|
||||
|
@ -304,7 +309,7 @@ endforeach;
|
|||
}?>">数据说明文档</a></li>
|
||||
<?php endif; ?>
|
||||
<?php if ($this->attachments) : ?>
|
||||
<li id="attach"><span>相关文档:</span>
|
||||
<li><span class="label label-success">相关文档:</span>
|
||||
<?php foreach ($this->attachments as $k=>$a) : ?>
|
||||
<a href="/service/attach/id/<?php echo $a->id; ?>" title="<?php echo $a->realname; ?>"><img src="/images/document.png"></a>
|
||||
<?php endforeach; ?>
|
||||
|
|
|
@ -12,7 +12,7 @@ $this->breadcrumb('<a href="/water/">黑河综合遥感联合试验</a>');
|
|||
$this->breadcrumb('快速搜索');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div class="tools">
|
||||
<div class="tools row">
|
||||
<ul><form id="search" enctype="application/x-www-form-urlencoded" action="/water/search" method="post">
|
||||
<li><input type="text" name="q" id="q" value="输入关键词搜索标题和摘要" onfocus="myfocus(this);" onblur="myblur(this);"></li>
|
||||
<li><button type="submit" name="submit" id="submit">搜索</button></li>
|
||||
|
@ -36,12 +36,14 @@ $this->breadcrumb()->setSeparator(' > ');
|
|||
<?php if (!empty($this->metadata)) : ?>
|
||||
<?php echo $this->page->getNavigation();
|
||||
foreach($this->metadata as $md) : ?>
|
||||
<div class="mditem">
|
||||
<hr />
|
||||
<div class="thumb"><img src="/service/thumb/id/<?php echo $md['id'];?>" /></div>
|
||||
<h2><a href="/water/<?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 class="media well well-small">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" src="/service/thumb/id/<?php echo $md['id'];?>" data-src="holder.js/128x128">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading"><a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a></h4>
|
||||
<div class="summary"><?php echo str_replace(array("\r\n", "\n", "\r"),'<br />',mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']));?></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<hr class="mditem" />
|
||||
|
|
|
@ -10,30 +10,40 @@ $this->breadcrumb('<a href="/water/">黑河综合遥感联合试验</a>');
|
|||
$this->breadcrumb('关键词导航'.(($this->codename)?':'.$this->codename:''));
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="span3">
|
||||
<?= $this->partial('water/navi.phtml'); ?>
|
||||
</div>
|
||||
<div class="span9">
|
||||
<div class="row" style="overflow:hidden;">
|
||||
<div class="input-append">
|
||||
<form id="search" enctype="application/x-www-form-urlencoded" action="/water/search" method="post">
|
||||
<input type="text" name="q" id="q" value="输入关键词搜索标题和摘要" onfocus="myfocus(this);" onblur="myblur(this);">
|
||||
<button class="btn" type="submit" name="submit" id="submit">搜索</button>
|
||||
<button class="btn" type="button" onclick="location.href='/water/tag'">关键词导航</button>
|
||||
<button class="btn" type="button" onclick="location.href='/water/timeline'">时间轴导航</button>
|
||||
<button class="btn" type="button" onclick="location.href='/water/timemap'">时空联合导航</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (!empty($this->metadata)) : ?>
|
||||
<div id='metacontent'>
|
||||
<h1>当前浏览:<?php echo $this->codename; ?></h1>
|
||||
<h3>当前浏览:<?php echo $this->codename; ?></h3>
|
||||
<?php echo $this->page->getNavigation(); ?>
|
||||
<?php foreach($this->metadata as $md) : ?>
|
||||
<div class="mditem">
|
||||
<hr />
|
||||
<div class="thumb"><img src="/service/thumb/id/<?php echo $md['id'];?>" /></div>
|
||||
<h2><a href="/water/<?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 class="media well well-small">
|
||||
<a class="pull-left" href="#">
|
||||
<img class="media-object" src="/service/thumb/id/<?php echo $md['id'];?>" data-src="holder.js/128x128">
|
||||
</a>
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading"><a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a></h4>
|
||||
<div class="summary"><?php echo str_replace(array("\r\n", "\n", "\r"),'<br />',mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']));?></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<hr class="mditem" />
|
||||
|
||||
<?php echo $this->page->getNavigation(); ?>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<div id='sidebar'>
|
||||
<div id='leftnavi'>
|
||||
<?= $this->partial('water/navi.phtml'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div id='right'>
|
||||
<div id='links'>
|
||||
<?php
|
||||
$keytypezh=array('place'=>'地点关键词','theme'=>'主题关键词','discipline'=>'学科关键词','stratum'=>'地层关键词','temporal'=>'时间关键词');
|
||||
|
@ -52,3 +62,4 @@ if (is_array($kcg) && count($kcg)>0 ) :
|
|||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
|
@ -3,72 +3,104 @@ $this->headTitle($this->config->title->site);
|
|||
$this->headTitle($this->config->title->data);
|
||||
$this->headTitle('时空导航');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/water.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
|
||||
$this->breadcrumb('<a href="/water/">黑河综合遥感联合试验</a>');
|
||||
$this->breadcrumb('时空联合导航');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
$this->headScript()->appendFile('http://maps.google.cn/maps?file=api&v=2&key='.$this->config->google->maps->api);
|
||||
$this->headScript()->appendFile('/js/timeline_var.js');
|
||||
$this->headScript()->appendFile('/js/timeline_js/timeline-api.js');
|
||||
$this->headScript()->appendFile('/js/timemap/timemap.js');
|
||||
$this->headScript()->captureStart();
|
||||
$this->theme->AppendPlus($this,'google_map_v3');
|
||||
$this->theme->AppendPlus($this,'colorbox');
|
||||
$this->headScript()->appendFile('/js/timeline_var.js');
|
||||
$this->headScript()->appendFile('/js/timeline_js/timeline-api.js');
|
||||
$this->headScript()->appendFile('/js/timemap.2.0.1/lib/mxn/mxn.js?(googlev3)');
|
||||
$this->headScript()->appendFile('/js/timemap.2.0.1/timemap.pack.js');
|
||||
?>
|
||||
var tm;
|
||||
window.onload=function() {
|
||||
tm = TimeMap.init({
|
||||
mapId: "watermap", // Id of map div element (required)
|
||||
timelineId: "timeline", // Id of timeline div element (required)
|
||||
scrollTo: "2008-06-01",
|
||||
options: {
|
||||
eventIconPath: "../images/",
|
||||
mapType:G_SATELLITE_MAP,
|
||||
mapCenter: new GLatLng(39,100)
|
||||
},
|
||||
datasets: [
|
||||
{
|
||||
data:{
|
||||
theme: "orange",
|
||||
// note that the lines below are now the preferred syntax
|
||||
type: "basic",
|
||||
value: [
|
||||
<?php foreach($this->rows as $row) : ?>
|
||||
{
|
||||
"start" : "<?php echo $row['timebegin']; ?>",
|
||||
<?php if ($row['timeend']!='') : ?>
|
||||
"end" : "<?php echo $row['timeend']; ?>",
|
||||
<?php endif; ?>
|
||||
"point" :
|
||||
{
|
||||
"lat" : <?php echo ($row['south']+$row['north'])/2; ?>,
|
||||
"lon" : <?php echo ($row['west']+$row['east'])/2; ?>
|
||||
},
|
||||
"title" : "<?php echo htmlspecialchars(mb_substr($row['title'],11,mb_strlen($row['title'],'UTF-8')-10,'UTF-8')); ?>",
|
||||
"options" : {
|
||||
// set the full HTML for the info window
|
||||
"infoHtml": "<div class='info'><a href=/water/<?php echo $row['uuid']; ?>><?php echo htmlspecialchars(mb_substr($row['title'],11,mb_strlen($row['title'],'UTF-8')-10,'UTF-8')); ?></a><hr /><img src=/service/thumb/id/<?php echo $row['id']; ?> /></div>",
|
||||
"theme":"orange"
|
||||
}
|
||||
},
|
||||
<?php endforeach; ?>
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
bandIntervals: [
|
||||
Timeline.DateTime.DAY,
|
||||
Timeline.DateTime.MONTH
|
||||
]
|
||||
});
|
||||
// manipulate the timemap further here if you like
|
||||
var map=tm.map;
|
||||
map.setCenter(new GLatLng(39,100),7);
|
||||
}
|
||||
window.onunload=GUnload();
|
||||
<?php $this->headScript()->captureEnd(); ?>
|
||||
<style>
|
||||
img{max-width:none}
|
||||
</style>
|
||||
<div id="timemap" style="clear:both;">
|
||||
<div id="watermap" style="height:500px;width:40%;float:right;"></div>
|
||||
<div id="map" style="height:500px;width:40%;float:right;"></div>
|
||||
<div id="timeline" style="height:500px;border-right:1px solid #abc;"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$('#map').height($(window).height());
|
||||
$('#timeline').height($(window).height());
|
||||
$("html,body").animate({scrollTop:$('#timemap').offset().top},600);
|
||||
var tm;
|
||||
$(function() {
|
||||
|
||||
// make a custom map style
|
||||
var styledMapType = new google.maps.StyledMapType([
|
||||
{
|
||||
featureType: "water",
|
||||
elementType: "all",
|
||||
stylers: [
|
||||
{ saturation: 0 },
|
||||
{ lightness: 100 }
|
||||
]
|
||||
},
|
||||
{
|
||||
featureType: "all",
|
||||
elementType: "all",
|
||||
stylers: [
|
||||
{ saturation: -100 }
|
||||
]
|
||||
}
|
||||
], {
|
||||
name: "white"
|
||||
});
|
||||
|
||||
tm = TimeMap.init({
|
||||
mapId: "map", // Id of map div element (required)
|
||||
timelineId: "timeline", // Id of timeline div element (required)
|
||||
scrollTo: "2008-06-01",
|
||||
options: {
|
||||
eventIconPath: "../images/"
|
||||
},
|
||||
datasets: [
|
||||
{
|
||||
id: "artists",
|
||||
title: "Artists",
|
||||
theme: "orange",
|
||||
// note that the lines below are now the preferred syntax
|
||||
type: "basic",
|
||||
options: {
|
||||
items: [
|
||||
<?php
|
||||
foreach($this->rows as $row) : ?>
|
||||
{
|
||||
"start" : "<?php echo $row['timebegin']; ?>",
|
||||
<?php if ($row['timeend']!='') : ?>
|
||||
"end" : "<?php echo $row['timeend']; ?>",
|
||||
<?php endif; ?>
|
||||
"point" :
|
||||
{
|
||||
"lat" : <?php echo ($row['south']+$row['north'])/2; ?>,
|
||||
"lon" : <?php echo ($row['west']+$row['east'])/2; ?>
|
||||
},
|
||||
"title" : "<?php echo htmlspecialchars($row['title']); ?>",
|
||||
"options" : {
|
||||
"infoHtml": "<div class='info'><a href=/water/view/uuid/<?php echo $row['uuid']; ?>><?php echo htmlspecialchars($row['title']); ?></a><hr /><img src=/service/thumb/id/<?php echo $row['id']; ?> onclick='$.colorbox({photo:\"true\",href:\"/service/bigthumb/id/<?php echo $row['id']; ?>\"});' /></div>",
|
||||
"theme":"orange"
|
||||
}
|
||||
},
|
||||
<?php endforeach; ?>
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
bandIntervals: [
|
||||
Timeline.DateTime.DAY,
|
||||
Timeline.DateTime.MONTH
|
||||
]
|
||||
});
|
||||
|
||||
// set the map to our custom style
|
||||
var gmap = tm.getNativeMap();
|
||||
gmap.mapTypes.set("white", styledMapType);
|
||||
gmap.setMapTypeId("white");
|
||||
});
|
||||
|
||||
</script>
|
|
@ -27,7 +27,6 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
|
|||
<?php echo str_replace(array("\r\n", "\n", "\r"),'</p><p>',$md->description);?>
|
||||
</p>
|
||||
</div>
|
||||
<hr />
|
||||
<div>
|
||||
<?php if ($md->citation) : ?>
|
||||
<hr />
|
||||
|
@ -91,8 +90,8 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
|
|||
<?php endif; ?>
|
||||
<?php if ($this->resources) : ?>
|
||||
<h4><i class="icon-bolt text-warning"></i>相关资源</h4>
|
||||
<ul class="unstyled"><?php foreach($this->resources as $link) : ?>
|
||||
<li><a href="<?php echo $link->linkage; ?>" title="<?php echo $link->description; ?>">
|
||||
<ul class="unstyled inline"><?php foreach($this->resources as $link) : ?>
|
||||
<li><a class="label" href="<?php echo $link->linkage; ?>" title="<?php echo $link->description; ?>">
|
||||
<?php
|
||||
if (!empty($link->name))
|
||||
echo $link->name;
|
||||
|
@ -258,7 +257,9 @@ foreach($this->keys as $cg) :
|
|||
echo '<li><a href="/data/tag/key/'.urlencode($cg['keyword']).'"><i class="icon-tag"></i>'.$cg['keyword'].'</a></li>';
|
||||
endforeach;
|
||||
?></ul>
|
||||
|
||||
<?php if ($md->doi) : ?>
|
||||
<ul class="well well-small inline unstyled"><li><span class="label label-success">数据DOI</span> <?php echo $md->doi; ?></li></ul>
|
||||
<?php endif; ?>
|
||||
<div>
|
||||
<hr />
|
||||
<h4>数据细节<a class="btn pull-right" href="javascript:void(0);" id="show-list" onclick="getFileList()" title=""><i class="icon-file"></i>文件列表</a></h4>
|
||||
|
|
Loading…
Reference in New Issue