44 lines
2.0 KiB
PHTML
Executable File
44 lines
2.0 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->breadcrumb('<a href="/">首页</a>');
|
|
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
|
|
$this->breadcrumb('<a href="/data/category">分类浏览</a>');
|
|
if (!empty($this->codename)) $this->breadcrumb($this->codename);
|
|
$this->breadcrumb()->setSeparator(' > ');
|
|
?>
|
|
<div class="row-fluid">
|
|
<?= $this->partial('data/tools.phtml'); ?>
|
|
</div>
|
|
<div class="row-fluid">
|
|
<h4>数据集类别</h4>
|
|
<ul class="nav nav-pills">
|
|
<?php foreach($this->category as $cg) : ?>
|
|
<li <?php if (!empty($this->metadata)) : if($cg['name'] == $this->codename || $cg['name_zh'] == $this->codename ){?> class="active" <?php } endif; ?>>
|
|
<a href='/data/category/code/<?php echo $cg['code']; ?>'><?php (empty($cg['name_zh']))?print($cg['name']):print($cg['name_zh']); ?>
|
|
<span class="note">(<?php echo $cg['count']; ?>)</span></a></li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
</div>
|
|
<div class="row-fluid">
|
|
<?php if (!empty($this->metadata)) : ?>
|
|
<div id='metacontent'>
|
|
<h4>当前浏览:<?php echo $this->codename; ?></h4>
|
|
<?php echo $this->page->getNavigation(); ?>
|
|
<hr />
|
|
<ul class="unstyled">
|
|
<?php foreach($this->metadata as $md) : ?>
|
|
<li class="well well-small" style="overflow:hidden;">
|
|
<img src="/service/thumb/id/<?php echo $md['id'];?>" class="pull-left img-polaroid img-rounded" style="margin-right:5px" />
|
|
<h3><a href="/data/<?php echo $md['uuid']; ?>"><?php echo $this->escape($md['title']);?></a></h3>
|
|
<p><?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?></p>
|
|
</li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
<?php echo $this->page->getNavigation(); ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|