update data index
This commit is contained in:
parent
4b359fb331
commit
465a5a3f95
|
@ -50,69 +50,69 @@ $this->headLink()->appendStylesheet('/static-sanji/css/data-index.css');
|
|||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="data-nav">
|
||||
<div class="title">数据导航</div>
|
||||
<div class="container">
|
||||
<?php
|
||||
function genDataSetCol($type, $list){
|
||||
$content = "";
|
||||
foreach ($list as $cg){
|
||||
if($type == 'category'){
|
||||
$name = empty($cg['name_zh']) ? $cg['name'] : $cg['name_zh'];
|
||||
$content .= '<a class="btn a-btn btn-default col-sm-3" href="/data/category/code/'.$cg['code'].'">'.$name.'</a>';
|
||||
}else{
|
||||
$content .= '<a class="btn a-btn btn-default col-sm-3" href="/data/series/'. $cg['id']. '">'.$cg['name'].'</a>';
|
||||
}
|
||||
|
||||
}
|
||||
return '<div class="col-sm-6">'. $content . '</div>';
|
||||
}
|
||||
?>
|
||||
<?php $index = 1; ?>
|
||||
<div class="title-left"><a href="/data/category">数据集类别</a></div>
|
||||
<?php foreach($this->category as $cg) : ?>
|
||||
<?php
|
||||
if($index == 1) $arr = array();
|
||||
|
||||
$arr[] = $cg;
|
||||
$index ++;
|
||||
|
||||
if($index > 4) {
|
||||
echo genDataSetCol('category', $arr);
|
||||
$index = 1;
|
||||
}
|
||||
?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="title-left"><a href="/data/series">数据集序列</a></div>
|
||||
<?php $index = 1; ?>
|
||||
<?php foreach($this->serie as $cg) : ?>
|
||||
<?php
|
||||
if($index == 1) $arr = array();
|
||||
|
||||
$arr[] = $cg;
|
||||
$index ++;
|
||||
|
||||
if($index > 4) {
|
||||
echo genDataSetCol('series', $arr);
|
||||
$index = 1;
|
||||
}
|
||||
?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="data-nav">-->
|
||||
<!-- <div class="title">数据导航</div>-->
|
||||
<!-- <div class="container">-->
|
||||
<!-- --><?php
|
||||
// function genDataSetCol($type, $list){
|
||||
// $content = "";
|
||||
// foreach ($list as $cg){
|
||||
// if($type == 'category'){
|
||||
// $name = empty($cg['name_zh']) ? $cg['name'] : $cg['name_zh'];
|
||||
// $content .= '<a class="btn a-btn btn-default col-sm-3" href="/data/category/code/'.$cg['code'].'">'.$name.'</a>';
|
||||
// }else{
|
||||
// $content .= '<a class="btn a-btn btn-default col-sm-3" href="/data/series/'. $cg['id']. '">'.$cg['name'].'</a>';
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// return '<div class="col-sm-6">'. $content . '</div>';
|
||||
// }
|
||||
// ?>
|
||||
<!-- --><?php //$index = 1; ?>
|
||||
<!-- <div class="title-left"><a href="/data/category">数据集类别</a></div>-->
|
||||
<!-- --><?php //foreach($this->category as $cg) : ?>
|
||||
<!-- --><?php
|
||||
// if($index == 1) $arr = array();
|
||||
//
|
||||
// $arr[] = $cg;
|
||||
// $index ++;
|
||||
//
|
||||
// if($index > 4) {
|
||||
// echo genDataSetCol('category', $arr);
|
||||
// $index = 1;
|
||||
// }
|
||||
// ?>
|
||||
<!-- --><?php //endforeach; ?>
|
||||
<!-- </div>-->
|
||||
<!-- <div class="container">-->
|
||||
<!-- <div class="title-left"><a href="/data/series">数据集序列</a></div>-->
|
||||
<!-- --><?php //$index = 1; ?>
|
||||
<!-- --><?php //foreach($this->serie as $cg) : ?>
|
||||
<!-- --><?php
|
||||
// if($index == 1) $arr = array();
|
||||
//
|
||||
// $arr[] = $cg;
|
||||
// $index ++;
|
||||
//
|
||||
// if($index > 4) {
|
||||
// echo genDataSetCol('series', $arr);
|
||||
// $index = 1;
|
||||
// }
|
||||
// ?>
|
||||
<!-- --><?php //endforeach; ?>
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="special-nav">
|
||||
<div class="title">特色导航</div>
|
||||
<div class="container">
|
||||
<div class="col-sm-12">
|
||||
<form method="get" action="/search" id="search" class="form-search">
|
||||
<div class="input-append">
|
||||
<input type="text" value="" id="q" name="q" class="span2 search-query" placeholder="全文搜索">
|
||||
<button type="submit" class="btn"><i class="icon-search"></i>搜索</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<!-- <div class="col-sm-12">-->
|
||||
<!-- <form method="get" action="/search" id="search" class="form-search">-->
|
||||
<!-- <div class="input-append">-->
|
||||
<!-- <input type="text" value="" id="q" name="q" class="span2 search-query" placeholder="全文搜索">-->
|
||||
<!-- <button type="submit" class="btn"><i class="icon-search"></i>搜索</button>-->
|
||||
<!-- </div>-->
|
||||
<!-- </form>-->
|
||||
<!-- </div>-->
|
||||
<div class="col-sm-12">
|
||||
<a class="btn splBtn btn-default col-sm-2" href="/search/advance">高级搜索</a>
|
||||
<a class="btn splBtn btn-default col-sm-2" href="/data/browse">数据列表浏览</a>
|
||||
|
|
Loading…
Reference in New Issue