57 lines
2.3 KiB
PHTML
Executable File
57 lines
2.3 KiB
PHTML
Executable File
<?php
|
|
$this->headTitle($this->config->title->site);
|
|
$this->headTitle($this->config->title->data);
|
|
|
|
$this->headTitle('快速搜索');
|
|
if (!empty($this->codename)) $this->headTitle($this->codename);
|
|
$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(' > ');
|
|
?>
|
|
<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>
|
|
<li><button type="button" onclick="location.href='/water/tag'">关键词导航</button></li>
|
|
<li><button type="button" onclick="location.href='/water/timeline'">时间轴导航</button></li>
|
|
<li><button type="button" onclick="location.href='/water/timemap'">时空联合导航</button></li>
|
|
</form></ul>
|
|
<script>
|
|
function myfocus(element) {
|
|
if (element.value == element.defaultValue) {
|
|
element.value = '';
|
|
}
|
|
}
|
|
function myblur(element) {
|
|
if (element.value == '') {
|
|
element.value = element.defaultValue;
|
|
}
|
|
}
|
|
</script>
|
|
</div>
|
|
<?php if (!empty($this->metadata)) : ?>
|
|
<?php echo $this->page->getNavigation();
|
|
foreach($this->metadata as $md) : ?>
|
|
<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();
|
|
else :
|
|
?>
|
|
<div class="mditem">
|
|
<hr />
|
|
您的搜索结果为空,请尝试缩小关键词进行查询。
|
|
</div>
|
|
<?php endif; ?> |