49 lines
1.7 KiB
PHTML
Executable File
49 lines
1.7 KiB
PHTML
Executable File
<?php
|
|
$this->headTitle('元数据');
|
|
$this->headTitle('搜索');
|
|
if (!empty($this->codename)) $this->headTitle($this->codename);
|
|
$this->headTitle()->setSeparator(' - ');
|
|
$this->headLink()->appendStylesheet('/css/metadata.css');
|
|
$this->breadcrumb('<a href="/">首页</a>');
|
|
$this->breadcrumb('<a href="/metadata">数据产品与服务</a>');
|
|
$this->breadcrumb('<a href="/metadata/search">搜索</a>');
|
|
$this->breadcrumb()->setSeparator(' > ');
|
|
?>
|
|
<div id='tools'>
|
|
<?= $this->partial('metadata/tools.phtml'); ?>
|
|
</div>
|
|
<script type="text/javascript">
|
|
function showadvance(){
|
|
var ad=document.getElementById('advance');
|
|
if ("block"==ad.style.display) {
|
|
ad.style.display='none';
|
|
} else {
|
|
ad.style.display='block';
|
|
}
|
|
}
|
|
</script>
|
|
<div class="form">
|
|
<form><input type="text" name="key" value="<?php echo $this->key; ?>">
|
|
<input type="submit" value="搜索" />
|
|
<input type="button" value="高级搜索" onClick="showadvance();"/>
|
|
<div id="advance" style="display:none;">
|
|
<input type="text" name="keyword">
|
|
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<?php if (!empty($this->metadata)) : ?>
|
|
<?php echo $this->page->getNavigation();
|
|
foreach($this->metadata as $md) : ?>
|
|
<hr />
|
|
<div class="mditem">
|
|
<img src="/metadata/thumb/id/<?php echo $md['id'];?>" />
|
|
<h2><?php echo $this->escape($md['title']);?> <a href="<?php echo $this->url(array('controller'=>'metadata',
|
|
'action'=>'view', 'id'=>$md['id']));?>">View</a>
|
|
<a href="<?php echo $this->url(array('controller'=>'metadata',
|
|
'action'=>'delete', 'id'=>$md['id']));?>">Delete</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; endif?>
|