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