页面更新
This commit is contained in:
parent
d1ae54eaef
commit
301d780da7
|
@ -223,7 +223,7 @@ class WaterController extends DataController
|
||||||
function tagAction()
|
function tagAction()
|
||||||
{
|
{
|
||||||
$key = $this->_request->getParam('key');
|
$key = $this->_request->getParam('key');
|
||||||
$page=(int)$this->_request->getParam('page');
|
$page=(int)$this->_request->getParam('page');
|
||||||
if (empty($page)) $page=1;
|
if (empty($page)) $page=1;
|
||||||
$offset=$this->limit*($page-1);
|
$offset=$this->limit*($page-1);
|
||||||
if (!empty($key)) {
|
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");
|
$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();
|
$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");
|
$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");
|
$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();
|
$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);
|
||||||
|
|
|
@ -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);?>
|
<?php echo str_replace(array("\r\n", "\n", "\r"),'</p><p>',$md->description);?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
|
||||||
<div>
|
<div>
|
||||||
<?php if ($md->citation) : ?>
|
<?php if ($md->citation) : ?>
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -90,7 +89,7 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if ($this->resources) : ?>
|
<?php if ($this->resources) : ?>
|
||||||
<h4><i class="icon-bolt text-warning"></i>相关资源</h4>
|
<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; ?>">
|
<li><a class="label" href="<?php echo $link->linkage; ?>" title="<?php echo $link->description; ?>">
|
||||||
<?php
|
<?php
|
||||||
if (!empty($link->name))
|
if (!empty($link->name))
|
||||||
|
|
|
@ -24,9 +24,9 @@
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="nav nav-pills nav-stacked">
|
<ul class="nav nav-pills nav-stacked">
|
||||||
<li id="Nav-heihe-document"><a href="/heihe/document">黑河文档</a></li>
|
<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-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-thumb"><a href="/heihe/thumb">缩略图浏览</a></li>
|
||||||
<li id="Nav-heihe-tag"><a href="/heihe/tag">关键词导航</a></li>
|
<li id="Nav-heihe-tag"><a href="/heihe/tag">关键词导航</a></li>
|
||||||
<li id="Nav-heihe-timeline"><a href="/heihe/timeline">时间轴导航</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('<a href="/heihe/">'.$this->config->title->heihe.'</a>');
|
||||||
$this->breadcrumb('时空联合导航');
|
$this->breadcrumb('时空联合导航');
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$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_var.js');
|
||||||
$this->headScript()->appendFile('/js/timeline_js/timeline-api.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->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="row">
|
||||||
<div class="span2">
|
<div class="span2">
|
||||||
<?= $this->partial('heihe/navi.phtml'); ?>
|
<?= $this->partial('heihe/navi.phtml'); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="span10">
|
<div class="span10">
|
||||||
<div id="timemap">
|
<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 id="timeline" style="height:500px;border-right:1px solid #abc;"></div>
|
||||||
</div>
|
</div>
|
||||||
</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() {
|
<script type="text/javascript" charset="utf-8">
|
||||||
var script = document.createElement("script");
|
$('#map').height($(window).height());
|
||||||
script.src = "https://www.google.com/jsapi?key=<?php echo $this->config->google->maps->api; ?>&callback=loadMaps";
|
$('#timeline').height($(window).height());
|
||||||
script.type = "text/javascript";
|
$("html,body").animate({scrollTop:$('#timemap').offset().top},600);
|
||||||
document.getElementsByTagName("head")[0].appendChild(script);
|
var tm;
|
||||||
}
|
$(function() {
|
||||||
function tmloaded() {
|
|
||||||
tm = TimeMap.init({
|
// make a custom map style
|
||||||
mapId: "watermap", // Id of map div element (required)
|
var styledMapType = new google.maps.StyledMapType([
|
||||||
timelineId: "timeline", // Id of timeline div element (required)
|
{
|
||||||
scrollTo: "2000-01-01",
|
featureType: "water",
|
||||||
options: {
|
elementType: "all",
|
||||||
eventIconPath: "../images/",
|
stylers: [
|
||||||
mapType:G_HYBRID_MAP,
|
{ saturation: 0 },
|
||||||
mapCenter: new GLatLng(39,100)
|
{ 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",
|
theme: "orange",
|
||||||
// note that the lines below are now the preferred syntax
|
// note that the lines below are now the preferred syntax
|
||||||
type: "basic",
|
type: "basic",
|
||||||
value: [
|
options: {
|
||||||
<?php foreach($this->rows as $row) : ?>
|
items: [
|
||||||
|
<?php
|
||||||
|
foreach($this->rows as $row) : ?>
|
||||||
{
|
{
|
||||||
"start" : "<?php echo $row['timebegin']; ?>",
|
"start" : "<?php echo $row['timebegin']; ?>",
|
||||||
<?php if ($row['timeend']!='') : ?>
|
<?php if ($row['timeend']!='') : ?>
|
||||||
|
@ -71,23 +89,25 @@ function tmloaded() {
|
||||||
},
|
},
|
||||||
"title" : "<?php echo htmlspecialchars($row['title']); ?>",
|
"title" : "<?php echo htmlspecialchars($row['title']); ?>",
|
||||||
"options" : {
|
"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>",
|
"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: [
|
bandIntervals: [
|
||||||
Timeline.DateTime.MONTH,
|
Timeline.DateTime.MONTH,
|
||||||
Timeline.DateTime.YEAR
|
Timeline.DateTime.DECADE
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
// manipulate the timemap further here if you like
|
|
||||||
var map=tm.map;
|
// set the map to our custom style
|
||||||
map.setCenter(new GLatLng(39,100),7);
|
var gmap = tm.getNativeMap();
|
||||||
}
|
gmap.mapTypes.set("white", styledMapType);
|
||||||
</script>
|
gmap.setMapTypeId("white");
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
|
@ -16,26 +16,28 @@
|
||||||
h3.gs_rt{font-size:110%;}
|
h3.gs_rt{font-size:110%;}
|
||||||
</style>
|
</style>
|
||||||
<?php $md=$this->metadata;if ($md):?>
|
<?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="row">
|
||||||
<div class="span2">
|
<div class="span2">
|
||||||
<?= $this->partial('heihe/navi.phtml'); ?>
|
<?= $this->partial('heihe/navi.phtml'); ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="span6">
|
<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>
|
<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>
|
<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;">
|
<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);?>
|
<?php echo str_replace(array("\r\n", "\n", "\r"),'</p><p>',$md->description);?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
|
||||||
<div>
|
<div>
|
||||||
<?php if ($md->citation) : ?>
|
<?php if ($md->citation) : ?>
|
||||||
<hr />
|
<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>
|
<p><?php echo $this->escape($md->citation);?></p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if ($this->ref) : ?>
|
<?php if ($this->ref) : ?>
|
||||||
|
@ -95,8 +97,8 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if ($this->resources) : ?>
|
<?php if ($this->resources) : ?>
|
||||||
<h4><i class="icon-bolt text-warning"></i>相关资源</h4>
|
<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 href="<?php echo $link->linkage; ?>" title="<?php echo $link->description; ?>">
|
<li><a class="label" href="<?php echo $link->linkage; ?>" title="<?php echo $link->description; ?>">
|
||||||
<?php
|
<?php
|
||||||
if (!empty($link->name))
|
if (!empty($link->name))
|
||||||
echo $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>';
|
echo '<li><a href="/data/tag/key/'.urlencode($cg['keyword']).'"><i class="icon-tag"></i>'.$cg['keyword'].'</a></li>';
|
||||||
endforeach;
|
endforeach;
|
||||||
?></ul>
|
?></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>
|
<div>
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -304,7 +309,7 @@ endforeach;
|
||||||
}?>">数据说明文档</a></li>
|
}?>">数据说明文档</a></li>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if ($this->attachments) : ?>
|
<?php if ($this->attachments) : ?>
|
||||||
<li id="attach"><span>相关文档:</span>
|
<li><span class="label label-success">相关文档:</span>
|
||||||
<?php foreach ($this->attachments as $k=>$a) : ?>
|
<?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>
|
<a href="/service/attach/id/<?php echo $a->id; ?>" title="<?php echo $a->realname; ?>"><img src="/images/document.png"></a>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|
|
@ -12,7 +12,7 @@ $this->breadcrumb('<a href="/water/">黑河综合遥感联合试验</a>');
|
||||||
$this->breadcrumb('快速搜索');
|
$this->breadcrumb('快速搜索');
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$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">
|
<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><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>
|
<li><button type="submit" name="submit" id="submit">搜索</button></li>
|
||||||
|
@ -36,12 +36,14 @@ $this->breadcrumb()->setSeparator(' > ');
|
||||||
<?php if (!empty($this->metadata)) : ?>
|
<?php if (!empty($this->metadata)) : ?>
|
||||||
<?php echo $this->page->getNavigation();
|
<?php echo $this->page->getNavigation();
|
||||||
foreach($this->metadata as $md) : ?>
|
foreach($this->metadata as $md) : ?>
|
||||||
<div class="mditem">
|
<div class="media well well-small">
|
||||||
<hr />
|
<a class="pull-left" href="#">
|
||||||
<div class="thumb"><img src="/service/thumb/id/<?php echo $md['id'];?>" /></div>
|
<img class="media-object" src="/service/thumb/id/<?php echo $md['id'];?>" data-src="holder.js/128x128">
|
||||||
<h2><a href="/water/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a>
|
</a>
|
||||||
</h2>
|
<div class="media-body">
|
||||||
<span><?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?></span>
|
<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>
|
</div>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<hr class="mditem" />
|
<hr class="mditem" />
|
||||||
|
|
|
@ -10,30 +10,40 @@ $this->breadcrumb('<a href="/water/">黑河综合遥感联合试验</a>');
|
||||||
$this->breadcrumb('关键词导航'.(($this->codename)?':'.$this->codename:''));
|
$this->breadcrumb('关键词导航'.(($this->codename)?':'.$this->codename:''));
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$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)) : ?>
|
<?php if (!empty($this->metadata)) : ?>
|
||||||
<div id='metacontent'>
|
<h3>当前浏览:<?php echo $this->codename; ?></h3>
|
||||||
<h1>当前浏览:<?php echo $this->codename; ?></h1>
|
|
||||||
<?php echo $this->page->getNavigation(); ?>
|
<?php echo $this->page->getNavigation(); ?>
|
||||||
<?php foreach($this->metadata as $md) : ?>
|
<?php foreach($this->metadata as $md) : ?>
|
||||||
<div class="mditem">
|
<div class="media well well-small">
|
||||||
<hr />
|
<a class="pull-left" href="#">
|
||||||
<div class="thumb"><img src="/service/thumb/id/<?php echo $md['id'];?>" /></div>
|
<img class="media-object" src="/service/thumb/id/<?php echo $md['id'];?>" data-src="holder.js/128x128">
|
||||||
<h2><a href="/water/<?php echo $md['uuid']; ?>"><?php echo $this->escape($md['title']);?></a>
|
</a>
|
||||||
|
<div class="media-body">
|
||||||
</h2>
|
<h4 class="media-heading"><a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a></h4>
|
||||||
<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="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>
|
</div>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<hr class="mditem" />
|
|
||||||
<?php echo $this->page->getNavigation(); ?>
|
<?php echo $this->page->getNavigation(); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<div id='sidebar'>
|
|
||||||
<div id='leftnavi'>
|
|
||||||
<?= $this->partial('water/navi.phtml'); ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id='right'>
|
|
||||||
<div id='links'>
|
<div id='links'>
|
||||||
<?php
|
<?php
|
||||||
$keytypezh=array('place'=>'地点关键词','theme'=>'主题关键词','discipline'=>'学科关键词','stratum'=>'地层关键词','temporal'=>'时间关键词');
|
$keytypezh=array('place'=>'地点关键词','theme'=>'主题关键词','discipline'=>'学科关键词','stratum'=>'地层关键词','temporal'=>'时间关键词');
|
||||||
|
@ -52,3 +62,4 @@ if (is_array($kcg) && count($kcg)>0 ) :
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
</div>
|
|
@ -3,72 +3,104 @@ $this->headTitle($this->config->title->site);
|
||||||
$this->headTitle($this->config->title->data);
|
$this->headTitle($this->config->title->data);
|
||||||
$this->headTitle('时空导航');
|
$this->headTitle('时空导航');
|
||||||
$this->headTitle()->setSeparator(' - ');
|
$this->headTitle()->setSeparator(' - ');
|
||||||
$this->headLink()->appendStylesheet('/css/water.css');
|
|
||||||
$this->breadcrumb('<a href="/">首页</a>');
|
$this->breadcrumb('<a href="/">首页</a>');
|
||||||
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
|
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
|
||||||
$this->breadcrumb('<a href="/water/">黑河综合遥感联合试验</a>');
|
$this->breadcrumb('<a href="/water/">黑河综合遥感联合试验</a>');
|
||||||
$this->breadcrumb('时空联合导航');
|
$this->breadcrumb('时空联合导航');
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$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->headScript()->appendFile('/js/timeline_var.js');
|
$this->theme->AppendPlus($this,'colorbox');
|
||||||
$this->headScript()->appendFile('/js/timeline_js/timeline-api.js');
|
$this->headScript()->appendFile('/js/timeline_var.js');
|
||||||
$this->headScript()->appendFile('/js/timemap/timemap.js');
|
$this->headScript()->appendFile('/js/timeline_js/timeline-api.js');
|
||||||
$this->headScript()->captureStart();
|
$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;
|
<style>
|
||||||
window.onload=function() {
|
img{max-width:none}
|
||||||
tm = TimeMap.init({
|
</style>
|
||||||
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(); ?>
|
|
||||||
<div id="timemap" style="clear:both;">
|
<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 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);?>
|
<?php echo str_replace(array("\r\n", "\n", "\r"),'</p><p>',$md->description);?>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
|
||||||
<div>
|
<div>
|
||||||
<?php if ($md->citation) : ?>
|
<?php if ($md->citation) : ?>
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -91,8 +90,8 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if ($this->resources) : ?>
|
<?php if ($this->resources) : ?>
|
||||||
<h4><i class="icon-bolt text-warning"></i>相关资源</h4>
|
<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 href="<?php echo $link->linkage; ?>" title="<?php echo $link->description; ?>">
|
<li><a class="label" href="<?php echo $link->linkage; ?>" title="<?php echo $link->description; ?>">
|
||||||
<?php
|
<?php
|
||||||
if (!empty($link->name))
|
if (!empty($link->name))
|
||||||
echo $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>';
|
echo '<li><a href="/data/tag/key/'.urlencode($cg['keyword']).'"><i class="icon-tag"></i>'.$cg['keyword'].'</a></li>';
|
||||||
endforeach;
|
endforeach;
|
||||||
?></ul>
|
?></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>
|
<div>
|
||||||
<hr />
|
<hr />
|
||||||
<h4>数据细节<a class="btn pull-right" href="javascript:void(0);" id="show-list" onclick="getFileList()" title=""><i class="icon-file"></i>文件列表</a></h4>
|
<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