westdc-zf1/application/default/views/scripts/glacier/view.phtml

497 lines
21 KiB
PHTML
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle($this->metadata->title);
$this->headTitle()->setSeparator(' - ');
$this->theme->AppendPlus($this,'google_map_v3');
$this->theme->AppendPlus($this,'colorbox');
if(!empty($this->dataService)) {
$this->theme->AppendModel($this,"dataservice");
}
?>
<style>
h3.gs_rt{font-size:110%;}
#file-list li:hover {background-color: #f5f5f5;}
#file-list li li:hover {background-color: #dedede;}
#file-list li li li:hover {background-color: #eeeeee;}
</style>
<?= $this->render('breadcrumbs.phtml'); ?>
<?php $md=$this->metadata;if ($md):?>
<h3><?php echo $this->escape($md->title);
if ($md->title_en) echo '<br />'.$this->escape($md->title_en);
echo '<a href="http://westdc.westgis.ac.cn/data/'.$md->uuid.'"><img src="/images/china.png" alt="Chinese Version"></a>';?>
</h3>
<hr />
<div class="row">
<div class="span8">
<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>
<div>
<?php if ($md->citation) : ?>
<hr />
<h4><i class="icon-quote-left muted"></i>Citation<a class="btn btn-danger pull-right" href="/archives/help/platform/archive-107.html" ><i class="icon-comment"></i>Help</a></h4>
<p><?php if (empty($md->datadoi) || !strpos($md->citation,$md->datadoi)) : ?>
<span class="label label-info">Paper Cite</span>
<?php endif; echo $this->escape($md->citation);
if (strpos($md->citation,$md->datadoi)) : ?>
(Download: <a href="/service/ris/lang/en/uuid/<?php echo $md->uuid; ?>">RIS</a> |
<a href="/service/bibtex/lang/en/uuid/<?php echo $md->uuid; ?>">Bibtex</a>)
<?php endif; ?>
</p>
<?php if (!empty($md->datadoi) && !strpos($md->citation,$md->datadoi)) : ?>
<p><span class="label label-info">Dataset Cite</span>
<?php echo str_replace('"','',substr($md->author_en,1,-1)).'. '.$md->title.'. '.$md->publisher_en.', '.(empty($md->ts_published)?$md->publish_year:date('Y',strtotime($md->ts_published))).'. doi:'.$md->doi; ?>
(Download: <a href="/service/ris/lang/en/uuid/<?php echo $md->uuid; ?>">RIS</a> |
<a href="/service/bibtex/lang/en/uuid/<?php echo $md->uuid; ?>">Bibtex</a>)</p>
<?php endif; endif; ?>
<?php if ($this->ref) : ?>
<hr />
<h4><i class="icon-eye-open text-success"></i>Related publications (Recommended by Author)</h4>
<ol>
<?php foreach($this->ref as $ref) :
echo '<li>'.$ref->reference;
echo '<a href="/knowledge/paper/id/'.$ref->id.'"><i class="icon-info-sign text-success"></i>Detail</a>';
if (empty($ref->link))
{
if(!empty($ref->attid))
echo ' <a href="/service/attach/id/'.$ref->attid.'"><i class="icon-download text-success"></i>Download</a>';
}else{
echo ' <a href="'.$ref->link.'"><i class="icon-download text-success"></i>Download</a>';
}
echo "</li>";
endforeach;
?>
</ol>
<?php endif; if ($this->themeref) :?>
<hr />
<h4><i class="icon-eye-open text-success"></i>Special Publications</h4>
<ol>
<?php foreach($this->themeref as $ref) :
echo '<li>'.$ref->reference;
echo '<a href="/knowledge/paper/id/'.$ref->id.'"><i class="icon-info-sign text-success"></i>Detail</a>';
if (empty($ref->link))
{
if(!empty($ref->attid))
echo ' | <a href="/service/attach/id/'.$ref->attid.'"><i class="icon-download text-success"></i>Download</a>';
}else{
echo ' | <a href="'.$ref->link.'"><i class="icon-download text-success"></i>Download</a>';
}
echo "</li>";
endforeach;
?>
</ol>
<?php endif; if ($this->userref) : ?>
<hr />
<h4><i class="icon-eye-open text-success"></i>Cited By</h4>
<ol>
<?php foreach($this->userref as $ref) :
echo '<li>'.$ref->reference;
echo '<a href="/knowledge/paper/id/'.$ref->id.'"><i class="icon-info-sign text-success"></i>Detail</a>';
if (empty($ref->link))
{
if(!empty($ref->attid))
echo ' <a href="/service/attach/id/'.$ref->attid.'"><i class="icon-download text-success"></i>Download</a>';
}else{
echo ' <a href="'.$ref->link.'"><i class="icon-download text-success"></i>Download</a>';
}
echo "</li>";
endforeach;
if (count($this->userref)==15)
{
echo '<a class="btn btn-success pull-right" href="/knowledge/user/uuid/'.$md->uuid.'" ><i class="icon-info-sign"></i>More</a>';
}
?>
</ol>
<?php endif; ?>
<hr />
<h4><i class="icon-legal text-warning"></i>Limitations</h4>
<?php
if ($this->uselimits) :
foreach($this->uselimits as $uselimit) :
echo '<p>'.str_replace(array("\r\n", "\n", "\r"),'</p><p>',$this->escape($uselimit->uselimit)).'</p>';
endforeach;
?>
<?php endif; ?>
<?php if($this->data_archives){ ?>
<h4>Dataset News</h4>
<ul>
<?php
foreach($this->data_archives as $v){?>
<li><a href="<?= $v['url']['archive_url']?>"><?= $v['title']?></a></li>
<?php } ?>
</ul>
<hr />
<?php }?>
<?php if ($md->suppinfo || $this->fund) : ?>
<h4><i class="icon-money text-info"></i>Fund</h4>
<?php if(!empty($this->fund)) : ?>
<ul>
<?php foreach($this->fund as $k=>$v) : ?>
<li><?= $v['fund_type_en'] ?>(No. <?= $v['fund_id']?>)</li>
<?php endforeach; ?>
</ul>
<?php elseif(!empty($md->suppinfo)) : ?>
<?php echo '<p>'.str_replace(array("\r\n", "\n", "\r"),'</p><p>',$this->escape($md->suppinfo)).'</p>';?>
<?php endif; ?>
<hr />
<?php endif; ?>
<?php if ($this->resources) : ?>
<h4><i class="icon-bolt text-warning"></i>Online Resources</h4>
<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;
elseif (!empty($link->description))
echo $link->description;
else
echo $link->linkage;
?></a></li>
<?php endforeach; ?>
</ul>
<hr />
<?php endif; ?>
</div>
<div>
<?php
$keywords = array();
foreach($this->keys as $cg){
if($cg['keytype']=="theme")
$keywords[]=$cg['keyword'];
}
$ev = join(" ",$keywords);
?>
<div class="tabbable"> <!-- Only required for left/right tabs -->
<ul class="nav nav-tabs">
<li class="active"><a href="#related" data-toggle="tab" id="related_t">Related Dataset</a></li>
<li><a href="#literature" data-toggle="tab" id="literature_t">Related Literatures</a></li>
<li><a href="#gsearch" data-toggle="tab" id="gsearch_t">Searching</a></li>
<li><a href="#recommend" data-toggle="tab" id="recommend_t">Recommendation</a></li>
</ul>
<div class="tab-content">
<div id="related" class="tab-pane active">
</div>
<div id="literature" class="tab-pane">
<div id="literature-list">
</div>
</div>
<div id="gsearch" class="tab-pane">
<ul id="searchlist" class="unstyled well well-small"></ul>
</div>
<div id="recommend" class="tab-pane">
</div>
</div>
</div>
<!--
<hr />
<div id="comments">
<?php if ($md->status>0 and $md->status<5) : ?>
<p class="strong">This data is not published yet. You are invited to review this dataset, to make the data released as soon as possible.<a class="btn btn-primary" href="/review/review/uuid/<?php echo $md->uuid; ?>">评审</a></p>
<?php else : ?>
<h4>Comment</h4>
<div id="allcomments">
<div id="loading"><img src="/images/loading.gif" />Loading</div>
</div>
<?php
$auth = Zend_Auth::getInstance();
if($auth->hasIdentity())
{
$user = $auth->getIdentity();
$name = $user->realname;
$email = $user->email;
}else
{
$name = "";
$email = "";
}
?>
<form class="form-horizontal" id="postcommentform">
<div class="control-group">
<label class="control-label">Name</label>
<div class="controls">
<input type="text" name="author" value="<?php echo $name;?>" />
</div>
</div>
<div class="control-group">
<label class="control-label">Email</label>
<div class="controls">
<input type="text" name="email" value="<?php echo $email;?>" />
</div>
</div>
<div class="control-group">
<label class="control-label">Website</label>
<div class="controls">
<input type="text" name="url" value="" /> <span class="help-block">e.g. http://westdc.westgis.ac.cn/</span>
</div>
</div>
<div class="control-group">
<label class="control-label">Content</label>
<div class="controls">
<textarea name="content" class="span5"></textarea>
</div>
</div>
<div class="control-group">
<label class="control-label">Captcha</label>
<div class="controls">
<img id="imgcode" style="margin-bottom:-10px;cursor:pointer;border:0px;" src="/service/imgcode/" onClick="this.src=this.src+'?'"><input type="text" name="vdcode" id="vdcode" maxlength="4" value="" />
</div>
</div>
<div class="control-group">
<div class="controls">
<input type="hidden" name="mdtitle" value="<?php echo $md->title;?>" />
<input type="hidden" name="uuid" value="<?php echo $md->uuid;?>" />
<a class="btn btn-primary" id="postcomment" href="javascript:;" onclick="postcomment();">Submit</a><button type="reset" id="reset" class="btn">Reset</button><span id="returninfo"></span>
</div>
</div>
</form>
<div id="infobox"></div>
<?php endif; ?>
</div> -->
</div>
</div>
<div class="span4">
<ul class="well well-small inline unstyled">
<li><a href="/data/category"><i class="icon-th text-warning"></i>Category: </a></li>
<?php foreach($this->category as $cat): ?>
<li><a href="/data/category/code/<?php echo $cat->code;?>"><i class="icon-th-large"></i><?php echo $this->escape($cat->name);?></a></li>
<?php endforeach; ?>
</ul>
<?php
$kw=array('discipline'=>'Discipline','place'=>'Place','theme'=>'Theme','temporal'=>'Temporal','stratum'=>'Stratum');
$kt='';
$i=0;
foreach($this->keys as $cg) :
if ($kt==$cg['keytype']) :
$i+=1;
else :
if (!empty($kt)) echo '</ul>';
$kt=$cg['keytype'];
$i=0;
endif;
if ($i==0) {
?>
<ul class="well well-small inline unstyled">
<li><a href="/data/tag/keytype/<?php echo $kt; ?>"><i class="icon-tags text-warning"></i><?php echo $kw[$kt]; ?></a></li>
<?
}
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>Information<a class="btn pull-right" href="javascript:void(0);" id="show-list" title="" rel="<?= $md->uuid;?>"><i class="icon-file"></i>File list</a></h4>
<ul class="inline unstyled well">
<?php if ($md->fileformat) : ?>
<li><strong>File Format: </strong><?php echo $md->fileformat; ?></li>
<?php endif; ?>
<li><strong>Size: </strong><?php echo $md->filesize; ?>MB</li>
<?php if ($this->downloaded>9) :?>
<li><strong>Downloaded: </strong><?php echo $this->downloaded; ?></li>
<?php endif; ?>
<li><strong>Viewed: </strong><?php echo $this->viewed; ?></li>
<!--
<?php if ($md->projection) : ?>
<li id="projection" title="<?= $this->projection; ?>">数据投影:
<?php
$p=explode(" ",$this->projection);
$p=explode("=",$p[0]);
if (!empty($p[1]))
echo $p[1];
else
{
if (is_numeric($md->projection)) echo 'EPSG_CODE_';
echo $md->projection;
}
?></li>
<?php endif; ?>
-->
<?php if (!empty($md->timebegin)) : ?>
<li id="datatimes"><strong>Temporal Range: </strong><?php echo date('Y-m-d',strtotime($md->timebegin));if (!empty($md->timeend)) echo " to ".date('Y-m-d',strtotime($md->timeend)); ?></li>
<?php endif; ?>
<?php if ($this->attachments) : ?>
<li id="attach"><span>Documents: </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; ?>
<a href="/service/attach/zip/<?php echo $md->uuid; ?>"><img src="/images/zip_icon.gif" title="打包下载"/></a>
</li>
<?php endif; ?>
<li id="datatype"><strong>Sharing: </strong><?php if ($md->datatype) print "Offline"; else print "Online";?> </li>
</ul>
<div id="linkurl">
<?php if ($md->status>0 and $md->status<5) : ?>
<a href="/review/review/uuid/<?php echo $md->uuid; ?>" class="btn btn-primary btn-large btn-block" title="You are invited to review this dataset.">Reviewing</a>
<?php else : if (!$md->datatype) : ?>
<a href="/data/todownload/?uuid=<?= $md->uuid?>" class="btn btn-primary btn-large btn-block" title="Download">
Download
</a>
<?php else: ?>
<?php
if(!empty($this->dataService)) { ?>
<?php if($this->dataService['service_type'] == 2) { ?>
<a href="javascript:void(0);" class="btn btn-primary btn-large btn-block" title="Select the subset" onclick="westdc.dataservice.choiceData('<?= $md->uuid ?>',this);">
<?php }else if($this->dataService['service_type'] == 3) {?>
<a href="#selectDataWindow" role="button" class="btn btn-primary btn-large btn-block" data-toggle="modal">
<?php } ?>
<?php }else{ ?>
<a href="/data/order/uuid/<?php echo $md->uuid; ?>" class="btn btn-primary btn-large btn-block" title="Free of Charge!">
<?php } ?>
Put in the Basket
</a>
<?php endif;endif; ?>
</div>
</div>
<hr />
<h4>Google Maps</h4>
<div id='watermap' style="width:100%;height:300px;"></div>
<hr />
<h4>Contacts</h4>
<div id="authors">
<ul class="unstyled">
<?php
$party_zh=array('resourceProvider'=>'Resource Provider','custodian'=>'Custodian','owner'=>'Owner','user'=>'User','distributor'=>'Distributor','originator'=>'Originator','pointOfContact'=>'Point Of Contact','principalInvestigator'=>'Principal Investigator','processor'=>'Processor','publisher'=>'Publisher','author'=>'Author');
$r='';
$i=0;
foreach($this->authors as $k=>$author) :
if ($author->role!=$r)
{
$r=$author->role;
$i=0;
if ($k>0) echo '</li>';
echo '<li>'.$party_zh[$author->role].'';
}
if ($i>0) echo '';
$i+=1;
if (!empty($author->email) && $r!='principalInvestigator')
echo '<a href="mailto:'.$author->email.'">';
echo '<strong title="'.$author->organisation.'">';
if (!empty($author->individual))
echo $author->individual;
else
echo $author->organisation;
echo '</strong>';
if (!empty($author->email)) echo '</a>';
if ($k+1==count($this->authors)) echo '</li>';
endforeach;
?>
</ul>
<hr />
<ul class="unstyled">
<li>Last update: <?php print date('Y-m-d',strtotime($md->ts_created)); ?></li>
<li><strong>Download Metadata:</strong>
<a href="/service/pdf/uuid/<?php echo $md->uuid; ?>"><img src="/images/pdf_icon.gif" alt="Adobe PDF" title="Adobe PDF"></a>
<a href="/service/odt/uuid/<?php echo $md->uuid; ?>"><img src="/images/odt_icon.gif" alt="OpenOffice odt" title="OpenOffice odt"></a>
<a href="/service/doc/uuid/<?php echo $md->uuid; ?>"><img src="/images/doc_icon.gif" alt="Word doc" title="Word doc"></a>
<a href="/service/xml/uuid/<?php echo $md->uuid;?>"><img src="/images/xml_icon.gif" alt="XML" title="XML"></a>
</li>
<!--<li><a href="/data/detail/id/<?php echo $md->id;?>">详细元数据</a></li>-->
<?php if($this->version->c>0):?>
<li id="dataversion">Version: <a href="javascript:void(0);" onclick="dataVersion('<?php echo $md->uuid;?>')" title=""><?= $this->version->c ?><img src="/images/list_extensions.gif" style="vertical-align:middle" /></a></li>
<?php endif;?>
</ul>
</div>
<hr />
</div>
</div>
<script src="/js/metadata-view.js"></script>
<script type="text/javascript" charset="utf-8">
$(function() {
google.maps.event.addDomListener(window, 'load', initialize);
$(".colorbox").colorbox({photo:"true"});
$('.googlesearch').click(function(){googleSearch('<?php echo $ev;?>');});
$('.bingsearch').click(function(){bingSearch('<?php echo $ev;?>');});
$('.cnkiSearch').click(function(){cnkiSearch('<?php echo $ev;?>');});
$('.scholar').click(function(){scholarSearch('<?php echo $ev;?>');});
$('#related_t').click(function(){related(1);});
$('#recommend_t').click(function(){recommend(0);});
$('#literature_t').click(function(){scholarSearch('<?php echo $ev;?>');$('.literatures').parent('li').addClass('active')});
$('.literatures').click(function(){literature(1);});
ajaxpage(0);
related(1);
$('.lit-nav-btn').each(function(index, element) {
$(this).click(function(){
$('.lit-nav').children('li').each(function(index, element) {
$(this).removeClass('active');
});
$(this).parent('li').addClass('active');
});
});
$('#gsearch_t').click(function(){
if($('#searchlist').children('li').length<1)
{
googleSearch('<?php echo $ev;?>');
}
});
$('#show-list').click(function(e) {
method.filelist.get($(this).attr('rel'));
});
});
//ajax literature
function literature(page){
literature_get(page,'<?= $md->uuid; ?>');
}
//ajax related
function related(page){
related_get(page,'<?= $md->uuid; ?>');
}
//ajax recommend
function recommend(page){
recommend_get(page,'<?= $md->uuid; ?>');
}
function getFileList(){
getFileList_h('<?php echo $md->uuid;?>');
}
function ajaxpage(page){
ajaxpage_get(page,'<?= $md->uuid; ?>');
}
var map = null;
var mapElementID = "watermap";
var bounds = null;
var rectangle = null;
var zoomlevel = 1;
var bound = {
lat:<?= ($md->south+$md->north)/2; ?>,
lng:<?= ($md->east+$md->west)/2; ?>,
zoom:<?php if ($md->north==$md->south) { ?> 10 <?php }else {?> 16 <?php }?>,
east:<?= $md->east; ?>,
west:<?= $md->west; ?>,
south:<?= $md->south; ?>,
north:<?= $md->north; ?>
}
</script>
<?php else: ?>
<p>Cannot find the metadata.</p>
<?php endif;?>
<?php if(!empty($this->dataService)) { ?>
<?php if($this->dataService['service_type'] == 2) { ?>
<?php $this->theme->AppendPlus($this,'datepicker'); ?>
<script src="/js/lib/custom/models/dataservice.js"></script>
<?php }else if($this->dataService['service_type'] == 3) {?>
<?php $this->theme->AppendPlus($this,'datepicker'); ?>
<script src="/js/lib/custom/models/dataservice.geodata.js"></script>
<?php } ?>
<?php } ?>
<?php if(!empty($this->dataService)) { ?>
<?php if($this->dataService['service_type'] == 2) { ?>
<?php }else if($this->dataService['service_type'] == 3) {?>
<?= $this->partial('glacier/view-glacier-selection.phtml',array('uuid'=>$md->uuid)); ?>
<?php } ?>
<?php } ?>