westdc-zf1/application/default/views/scripts/data/category.phtml

44 lines
2.2 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(' > ');
$this->headScript()->appendFile('/js/jquery.masonry.min.js');
?>
<div id="category">
<div id="category_nav" class="full clear">
<div class="title fleft">
数据集类别
</div>
<div class="categorys fright clear">
<ul>
<?php foreach($this->category as $cg) : ?>
<li><a href='/data/category/code/<?php echo $cg['code']; ?>'><?php (empty($cg['name_zh']))?print($cg['name']):print($cg['name_zh']); ?></a><span class="note">(<?php echo $cg['count']; ?>)</span></li>
<?php endforeach; ?>
</ul>
</div>
<div class="clearfix"></div>
<div class="datalist clear mt12">
<ul id="datalist">
<?php if($this->metadata) : foreach($this->metadata as $md) : ?>
<li id="data_<?php echo $md['uuid']; ?>" class="databox box-shadow">
<div class="subject text-shadow"><a href="/data/<?php echo $md['uuid']; ?>"><?php echo $this->escape($md['title']);?></a><div class="more"><a href="/data/<?php echo $md['uuid']; ?>">查看详细</a></div></div>
<div class="data_content clear">
<div class="thumb box-shadow"><img src="/service/thumb/id/<?php echo $md['id'];?>" /></div>
<div class="description"><?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?></div>
</div>
</li>
<?php endforeach;endif; ?>
</ul>
</div>
<div class="page">
<?php if ($this->page) echo $this->page->getNavigation(); ?>
</div>
</div>
</div>