change hiwater code

This commit is contained in:
wlx 2013-05-24 16:24:31 +00:00
parent c546a1b7ea
commit 8ab96d547a
6 changed files with 87 additions and 484 deletions

View File

@ -9,27 +9,27 @@ class HiwaterController extends DataController
//$this->_helper->layout->setLayout('hiwater');
$this->debug = 1;
$acName = $this->_request->getActionName();
if(in_array($acName,array("dem","landuse","core","bdk","eb")))
if(in_array($acName,array("aviation","radiometer","lidar","widas","nearvis","thermal")))
{
$this->view->pageIn = "collapse1";
}
if(in_array($acName,array("forest","dyk","plg")))
else if(in_array($acName,array("forest","dyk","plg")))
{
$this->view->pageIn = "collapse2";
}
if(in_array($acName,array("arid","hzz","yk",'zy','zynoc','lzg','lzs')))
else if(in_array($acName,array("arid","hzz","yk",'zy','zynoc','lzg','lzs')))
{
$this->view->pageIn = "collapse3";
}
if(in_array($acName,array("meteo","autometeo","mobilemeteo","ec",'las','normalmeteo','regionalmeteo','doppler','hydro','airsounding')))
else if(in_array($acName,array("meteo","autometeo","mobilemeteo","ec",'las','normalmeteo','regionalmeteo','doppler','hydro','airsounding')))
{
$this->view->pageIn = "collapse4";
}
if(in_array($acName,array("radiometer","airebone","lidar","widas",'asd')))
else if(in_array($acName,array("radiometer","airebone","lidar","widas",'asd')))
{
$this->view->pageIn = "collapse5";
}
if(in_array($acName,array("satellite")))
else if(in_array($acName,array("satellite")))
{
$this->view->pageIn = "collapse6";
}
@ -91,6 +91,37 @@ class HiwaterController extends DataController
$this->view->offset=$offset+1;
}
function aviationAction()
{
$this->getmd(array('航空遥感','WiDAS'));
$this->_helper->viewRenderer('base');
}
function radiometerAction()
{
$this->getmd(array('航空遥感','PLMR'));
$this->_helper->viewRenderer('base');
}
function lidarAction()
{
$this->getmd(array('','Lidar'));
$this->_helper->viewRenderer('base');
}
function widasAction()
{
$this->getmd(array('','WiDAS'));
$this->_helper->viewRenderer('base');
}
function nearvisAction()
{
$this->getmd(array('航空遥感','CASI'));
$this->_helper->viewRenderer('base');
}
function thermalAction()
{
$this->getmd(array('','热红外高光谱数据'));
$this->_helper->viewRenderer('base');
}
function baseAction()
{
$page=(int)$this->_request->getParam('page');
@ -153,19 +184,6 @@ class HiwaterController extends DataController
$this->view->offset=$offset+1;
}
function economicAction()
{
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
$state=$this->db->query("select count(*) from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and id in (select id from keyword where keytype='theme' and (keyword='人口' or keyword='社会经济'))");
$row=$state->fetchAll();
$sum=$row[0]['count'];
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and id in (select id from keyword where keytype='theme' and (keyword='人口' or keyword='社会经济')) order by timebegin,title limit ? offset ?";
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->offset=$offset+1;
}
function landsurfaceAction()
{
@ -328,302 +346,29 @@ class HiwaterController extends DataController
$page=(int)$this->_request->getParam('page');
if (empty($page)) $page=1;
$offset=$this->limit*($page-1);
$state=$this->db->query("select count(m.*) from normalmetadata m left join datasource d on m.uuid=d.uuid left join source s on d.sourceid=s.id where s.code='hiwater' and m.id in (select id from keyword where keytype='".$type."' and keyword='".$keyword."')");
if (!is_array($keyword))
{
$keyword=array($keyword);
}
$key="(";
foreach($keyword as $k)
{
$key.="'".$k."',";
}
$key=substr($key,0,-1);
$key.=")";
$keyword=$key;
$state=$this->db->query("select count(m.*) from normalmetadata m left join datasource d on m.uuid=d.uuid left join source s on d.sourceid=s.id where s.code='hiwater' and m.id in (select id from keyword where keytype='".$type."' and keyword in ".$keyword.")");
$row=$state->fetchAll();
$sum=$row[0]['count'];
//@todo: add order with title
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and id in (select id from keyword where keytype='".$type."' and keyword='".$keyword."') order by timebegin,title limit ? offset ?";
$sql="select uuid,title from normalmetadata where uuid in (select d.uuid from datasource d left join source s on d.sourceid=s.id where s.code='hiwater') and id in (select id from keyword where keytype='".$type."' and keyword in ".$keyword.") order by timebegin,title limit ? offset ?";
$this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));
$this->view->page=new Pagination($sum,$page,$this->limit);
$this->view->offset=$offset+1;
}
/*
* projectsAction() 数据汇交计划
*
*
*
*
*/
function projectsAction()
{
$ac = $this->_getParam('ac');
$invite = $this->_getParam('invite');
$auth = Zend_Auth::getInstance();
if($auth->hasIdentity())
{
$user = $auth->getIdentity();
$uid = $user->id;
$this->view->user_email = $user_email = $user->email;
}
if(empty($ac) || $ac == "index")
{
$this->_helper->viewRenderer('project-index');
//Search Link
$this->view->searchLink = "/heihe/projects/ac/index/";
$q = $this->_getParam('q');
$wheresql = array();
if(!empty($q))
{
if(!preg_match("/^[\x{4e00}-\x{9fa5}A-Za-z0-9_]+$/u",$q))
{
$this->view->error = "输入的搜索条件有误,只允许输入汉字、数字、字母";
return true;
}
$wheresql[] = " (title LIKE '%$q%' OR
code LIKE '%$q%' OR
name LIKE '%$q%')";
$this->view->searchKeyword = $q;
}
if(count($wheresql)>0)
{
$wheresql = join(" AND ",$wheresql);
}else{
$wheresql = "";
}
if(!empty($wheresql))
{
$wheresql = " WHERE ".$wheresql;
}
$sql = "SELECT * FROM heiheproject $wheresql
ORDER BY id DESC";
$sth = $this->db->query($sql);
$rows = $sth->fetchAll();
foreach ($rows as $k=>$v)
{
$rows[$k]['status'] = $this->replacestatus($v['status']);
}
$paginator = Zend_Paginator::factory($rows);
$paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage(15);
$paginator->setView($this->view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
$this->view->paginator=$paginator;
}//ac == index
if($ac == "submitting")
{
$this->_helper->viewRenderer('project-index');
$sql = "SELECT * FROM heiheproject WHERE status<4";
$sth = $this->db->query($sql);
$rows = $sth->fetchAll();
foreach ($rows as $k=>$v)
{
$rows[$k]['status'] = $this->replacestatus($v['status']);
}
$paginator = Zend_Paginator::factory($rows);
$paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage(15);
$paginator->setView($this->view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
$this->view->paginator=$paginator;
}//ac == submitting 正在提交
if($ac == "unsubmit")
{
$this->_helper->viewRenderer('project-index');
$sql = "SELECT * FROM heiheproject WHERE attachid IS NULL OR attachid=0";
$sth = $this->db->query($sql);
$rows = $sth->fetchAll();
foreach ($rows as $k=>$v)
{
$rows[$k]['status'] = $this->replacestatus($v['status']);
}
$paginator = Zend_Paginator::factory($rows);
$paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage(15);
$paginator->setView($this->view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
$this->view->paginator=$paginator;
}//ac == unsubmit 未提交
if($ac == "submit")
{
$this->_helper->viewRenderer('project-index');
$sql = "SELECT * FROM heiheproject WHERE status=4";
$sth = $this->db->query($sql);
$rows = $sth->fetchAll();
foreach ($rows as $k=>$v)
{
$rows[$k]['status'] = $this->replacestatus($v['status']);
}
$paginator = Zend_Paginator::factory($rows);
$paginator->setCurrentPageNumber($this->_getParam('page'));
$paginator->setItemCountPerPage(15);
$paginator->setView($this->view);
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
$this->view->paginator=$paginator;
}//ac == submit 已提交
if($ac == "upload")
{
$this->_helper->layout->setLayout('layout-iframe');
$this->_helper->viewRenderer('project-upload');
$submit = $this->_getParam('submit');
$pid = $this->_getParam('pid');
if(empty($pid) || !is_numeric($pid))
{
$this->view->error = "参数错误";
return true;
}
$this->view->pid = $pid;
if(empty($uid))
{
$this->view->error = "请先登录";
return true;
}
$sql = "SELECT * FROM heiheproject WHERE id=$pid";
$sth = $this->db->query($sql);
$row = $sth->fetch();
if($row['email']!= $user_email)
{
$this->view->error = "您没有权限进行此操作";
return true;
}
if(!empty($submit) && empty($this->view->error))
{
$files=new files();
$msg = $files -> upload($this->view->config->upload,$_FILES['Filedata'],'heihe');
if(empty($msg['error']))
{
$msg['error']="";
$filename = $msg['db_path'];
$filesize = $msg['file_size'];
$filedesc = $this->_request->getParam('filedesc');
$filetype = $msg['file_type'];
$realname = $msg['realname'];
if(!empty($row['attachid']))
{
$sql = "SELECT * FROM attachments WHERE id={$row['attachid']}";
$sth = $this->db->query($sql);
$attach = $sth->fetch();
$this->db->exec("DELETE FROM attachments WHERE id={$row['attachid']} AND filetype='heihe'");
@unlink($this->view->config->upload.$attach['filename']);
}
$sql = " INSERT INTO attachments (filename,filetype,filedesc,userid,filesize,realname) values
('$filename','heihe','$filedesc','$uid','$filesize','$realname') RETURNING id";
$sth = $this->db->prepare($sql);
$sth->execute();
$att = $sth->fetch(PDO::FETCH_ASSOC);
$msg['attid'] = $attid = $att['id'];
$sql = "UPDATE heiheproject SET attachid=$attid WHERE id=$pid";
$sth = $this->db->exec($sql);
if($sth)
{
$this->view->message = "上传成功";
}else{
@unlink($filename);
$this->view->error = '附件上传失败:写入附件表出错';
return true;
}
}else{
@unlink($filename);
$this->view->error = "附件上传失败".$msg['error'];
return true;
}
}
$sql = "SELECT * FROM heiheproject WHERE id=$pid";
$sth = $this->db->query($sql);
$row = $sth->fetch();
$sql = "SELECT * FROM attachments WHERE id = {$row['attachid']}";
$sth = $this->db->query($sql);
$this->view->att = $sth->fetch();
return true;
}
if(!empty($invite))
{
$this->_helper->viewRenderer('project-invite');
if(!preg_match("/[A-Za-z0-9]/",$invite))
{
$this->view->error = "参数错误!";
return true;
}
if(strlen($invite)!=12)
{
$this->view->error = "参数错误";
return true;
}
$pid = $this->_getParam('pid');
if(!is_numeric($pid))
{
$this->view->error = "参数错误";
return true;
}
$sql = "SELECT * FROM $projectTable WHERE id=$pid";
$sth = $this->db->query($sql);
$row = $sth->fetch();
if(empty($row['expert_name']))
{
$this->view->error = "此项目尚未邀请跟踪专家";
return true;
}
$names = $this->getArray($row['expert_name']);
$emails = $this->getArray($row['expert_email']);
$validations = $this->getArray($row['expert_validation']);
$created = $this->getArray($row['expert_created']);
if(!in_array($validations))
{
$this->view->error = "您不在被邀请的专家名单内";
return true;
}
}//专家邀请链接
}//projectsAction()
//从pgsql读取数组并拆分为php数组
function getArray($str){
if(strlen($str)>3)
@ -650,95 +395,6 @@ class HiwaterController extends DataController
return "{".join(",",$array)."}";
}
}
function replacestatus($status)
{
if($status == 0)
{
return "计划未提交";
}
if($status == 1)
{
return "计划未审核";
}
if($status == 2)
{
return "跟踪专家审核";
}
if($status == 3)
{
return "跟踪专家通过";
}
if($status == 4)
{
return "数据委员会通过";
}
}
function genRandomString($len)
{
$chars = array(
"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k",
"l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v",
"w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G",
"H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R",
"S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2",
"3", "4", "5", "6", "7", "8", "9"
);
$charsLen = count($chars) - 1;
shuffle($chars); // 将数组打乱
$output = "";
for ($i=0; $i<$len; $i++)
{
$output .= $chars[mt_rand(0, $charsLen)];
}
return $output;
}
function chmodr($path, $filemode) {
if (!is_dir($path))
return chmod($path, $filemode);
$dh = opendir($path);
while (($file = readdir($dh)) !== false) {
if($file != '.' && $file != '..') {
$fullpath = $path.'/'.$file;
if(is_link($fullpath))
return FALSE;
elseif(!is_dir($fullpath) && !chmod($fullpath, $filemode))
return FALSE;
elseif(!$this->chmodr($fullpath, $filemode))
return FALSE;
}
}
closedir($dh);
if(chmod($path, $filemode))
return TRUE;
else
return FALSE;
}
//成为作者后的后继处理工作
private function author_first($uuid,$author)
{
$sql="insert into mdversion (xml,ts_created,uuid,changelog,userid)
select x.data,m.ts_created,?,?,? from metadata m left join xml x on m.id=x.id
left join mdversion v on m.uuid=v.uuid
where m.uuid=? and v.changelog is null";
$sth=$this->db->prepare($sql);
try
{
$sth->execute(array($uuid,'初始版本 version 1.0',$author,$uuid));
} catch(Exception $e){
// do nothing here.
// 说明之前已经有对应数据
}
$this->wdb=Zend_Db::factory($this->view->config->geonetwork);
$sql="update metadata set owner=? where uuid=?";
$sth=$this->wdb->prepare($sql);
$sth->execute(array($author,$uuid));
}
}

View File

@ -3,33 +3,26 @@ $this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/water.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->breadcrumb('<a href="/heihe/">'.$this->config->title->heihe.'</a>');
$this->breadcrumb('基础数据');
$this->breadcrumb()->setSeparator(' > ');
$this->nav[] = array('link'=>"/water",'title'=>'黑河生态水文遥感试验');
?>
<?= $this->render('breadcrumbs.phtml'); ?>
<div class="row">
<div class="span3">
<?= $this->partial('hiwater/navi.phtml'); ?>
</div>
<div class="span9">
<div><?= $this->breadcrumb() ?> </div>
<div id="intro">
<p>
基础数据指为流域生态-水文研究提供各种自然、生态、水文、社会经济等本底信息的数据,同时还包括了主要的几次科学试验数据、模型数据集等。
</p>
<p>
基础数据主要包括了流域基础地理数据、流域各种专题数据、水文水资源数据、流域科学试验数据、航空遥感和卫星遥感数据、模型数据、社会经济数据等。
</p>
<?php if ($this->info) : ?>
<div class="well">
<?php if(!empty($this->info['body'])) echo $this->info['body'];?>
</div>
<?php endif; ?>
<hr />
<?php if ($this->metadata) : ?>
<?php echo $this->page->getNavigation(); ?>
<div id="mdlist">
<ol start="<?php echo $this->offset; ?>">
<?php foreach($this->metadata as $md) : ?>
<li><a href="/heihe/view/uuid/<?php echo $md['uuid']; ?>"><?php echo $md['title']; ?></a></li>
<li><a href="/hiwater/view/uuid/<?php echo $md['uuid']; ?>"><?php echo $md['title']; ?></a></li>
<?php endforeach; ?>
</ol>
</div>

View File

@ -4,31 +4,23 @@
$this->headTitle('全部浏览');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/water.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->breadcrumb('浏览');
$this->breadcrumb()->setSeparator(' > ');
$this->nav[] = array('link'=>"/water",'title'=>'黑河生态水文遥感试验');
?>
<?= $this->render('breadcrumbs.phtml'); ?>
<div class="row">
<div class="span3">
<?= $this->partial('hiwater/navi.phtml'); ?>
</div>
<div class="span9">
<div>
<?= $this->partial('data/tools.phtml'); ?>
</div>
<?php echo $this->page->getNavigation(); ?>
<?php foreach($this->metadata as $md) : ?>
<?php echo $this->page->getNavigation(); ?>
<hr />
<div class="mditem">
<div class="thumb"><img src="/service/thumb/id/<?php echo $md['id'];?>" /></div>
<h2><a href="/data/<?php echo $md['uuid'];?>"><?php echo $this->escape($md['title']);?></a>
<a href="/data/xml/id/<?php echo $md['id'];?>" title="XML模式查看"><img src="/images/xml.gif" /></a>
<a href="/data/map/id/<?php echo $md['id']; ?>" title="查看数据空间范围"><img src="/images/map.gif" /></a>
</h2>
<div class="summary"><?php echo str_replace(array("\r\n", "\n", "\r"),'<br />',mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']));?></div>
<div class="mdlist">
<ol start="<?php echo $this->offset; ?>">
<?php foreach($this->metadata as $md) : ?>
<li><a href="/hiwater/view/uuid/<?php echo $md['uuid']; ?>" title="<?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?>"><?php echo $md['title']; ?></a></li>
<?php endforeach; ?>
</ol>
</div>
<?php endforeach; ?>
<hr />
<?php echo $this->page->getNavigation(); ?>
</div>

View File

@ -3,13 +3,9 @@ $this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/water.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
$this->breadcrumb($this->config->title->heihe);
$this->breadcrumb()->setSeparator(' > ');
$this->nav[] = array('link'=>"/water",'title'=>'黑河生态水文遥感试验');
?>
<style>.next:hover{cursor:pointer;}</style>
<?= $this->render('breadcrumbs.phtml'); ?>
<div class="row">
<div class="span3">
<?= $this->partial('hiwater/navi.phtml'); ?>
@ -21,36 +17,5 @@ $this->breadcrumb()->setSeparator(' > ');
<tr><td><?php if(!empty($this->info['body'])) echo $this->info['body'];?></td></tr>
</table>
</div>
<div id="heihe_ad">
<h2>已整理数据展示</h2>
<ul id="heihe_list">
<?php foreach($this->meatdata as $md) : ?>
<li>
<a href="/heihe/view/uuid/<?php echo $md['uuid']; ?>"><span><?php echo $md['title']; ?></span>
<img src="/service/thumb/id/<?php echo $md['id']; ?>" alt="Data Thumbnail" title="<?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?>" />
</a>
</li>
<?php endforeach; ?>
</ul>
<img class="next" src="/images/next.png" onclick="changetlist()" />
</div>
</div>
</div>
<script type="text/javascript" language="javascript">
function changetlist(){
$.getJSON("/service/mdjson/source/heihe", function(data){
$('#heihe_list').html('');
if(data.length>0)
{
$.each(data, function(key, val) {
var a = '<a href="/data/'+val['uuid']+'"><span>'+val['title']+'</span>';
var img = '<img src="/service/thumb/id/'+val['id']+'" alt="Data Thumbnail" title="'+val['description']+'" />';
$('<li/>', {
//"class":'list_img',
"html": a+img+'</a>'
}).appendTo('#heihe_list');
});
}
});
}
</script>

View File

@ -22,18 +22,19 @@
</div>
<div class="accordion-group heihe-accordion-title">
<div class="accordion-heading" id="Nav-water-cold">
<a href="/hiwater/core" title="查看详细" class="pull-right detail-link"><i class="icon-search"></i></a>
<a href="/hiwater/aviation" title="查看详细" class="detail-link pull-right"><i class="icon-arrow-right"></i></a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#side_accordion" href="#collapse1">
航空遥感原始数据
航空遥感数据
</a>
</div>
<div id="collapse1" class="accordion-body collapse">
<div class="accordion-inner">
<ul class="nav nav-list heihe-subnav">
<li id="Nav-hiwater-dem"><a href="/hiwater/dem"><i class="icon-chevron-right"></i>微波辐射计</a></li>
<li id="Nav-hiwater-landuse"><a href="/hiwater/landuse"><i class="icon-chevron-right"></i>激光雷达</a></li>
<li id="Nav-hiwater-soil"><a href="/hiwater/soil"><i class="icon-chevron-right"></i>WiDAS</a></li>
<li id="Nav-hiwater-meteo"><a href="/hiwater/meteo"><i class="icon-chevron-right"></i>成像光谱仪</a></li>
<li id="Nav-hiwater-radiometer"><a href="/hiwater/radiometer"><i class="icon-chevron-right"></i>微波辐射计</a></li>
<li id="Nav-hiwater-lidar"><a href="/hiwater/lidar"><i class="icon-chevron-right"></i>激光雷达</a></li>
<li id="Nav-hiwater-widas"><a href="/hiwater/widas"><i class="icon-chevron-right"></i>WiDAS</a></li>
<li id="Nav-hiwater-nearvis"><a href="/hiwater/nearvis"><i class="icon-chevron-right"></i>可见光和近红外成像光谱仪</a></li>
<li id="Nav-hiwater-thermal"><a href="/hiwater/thermal"><i class="icon-chevron-right"></i>热红外成像光谱仪</a></li>
</ul>
</div>
</div>
@ -52,6 +53,7 @@
<li id="Nav-water-plg"><i class="icon-chevron-right"></i><a href="/hiwater/plg">植被类型图</a></li>
<li id="Nav-water-plg"><i class="icon-chevron-right"></i><a href="/hiwater/plg">植被结构参数</a></li>
<li id="Nav-water-plg"><i class="icon-chevron-right"></i><a href="/hiwater/plg">数字高程模型</a></li>
<li id="Nav-water-plg"><i class="icon-chevron-right"></i><a href="/hiwater/plg">数字表面模型</a></li>
<li id="Nav-water-plg"><i class="icon-chevron-right"></i><a href="/hiwater/plg">地表温度</a></li>
<li id="Nav-water-plg"><i class="icon-chevron-right"></i><a href="/hiwater/plg">地表土壤水分</a></li>
</ul>
@ -62,14 +64,14 @@
<div class="accordion-heading" id="Nav-water-cold">
<a href="/hiwater/arid" title="查看详细" class="pull-right detail-link"><i class="icon-search"></i></a>
<a class="accordion-toggle" data-toggle="collapse" data-parent="#side_accordion" href="#collapse3">
水文气象观测试验
流域水文气象观测网
</a>
</div>
<div id="collapse3" class="accordion-body collapse">
<div class="accordion-inner">
<ul class="nav nav-list heihe-subnav">
<li id="Nav-water-hzz"><i class="icon-chevron-right"></i><a href="/hiwater/hzz">超级气象站</a></li>
<li id="Nav-water-yk"><i class="icon-chevron-right"></i><a href="/hiwater/yk">普通气象站</a></li>
<li id="Nav-water-hzz"><i class="icon-chevron-right"></i><a href="/hiwater/hzz">自动气象站观测</a></li>
<li id="Nav-water-yk"><i class="icon-chevron-right"></i><a href="/hiwater/yk">涡动相关观测</a></li>
<li id="Nav-water-zy"><i class="icon-chevron-right"></i><a href="/hiwater/zy">联合研究站</a></li>
<li id="Nav-water-zynoc"><i class="icon-chevron-right"></i><a href="/hiwater/zynoc">寒旱所定位站</a></li>
<li id="Nav-water-lzg"><i class="icon-chevron-right"></i><a href="/hiwater/lzg">业务气象站</a></li>

View File

@ -1,30 +1,25 @@
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('全部浏览');
$this->headTitle('缩略图浏览');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/water.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->breadcrumb('<a href="/heihe/">'.$this->config->title->heihe.'</a>');
$this->breadcrumb('缩略图浏览');
$this->breadcrumb()->setSeparator(' > ');
$this->nav[] = array('link'=>"/water",'title'=>'黑河生态水文遥感试验');
$this->theme->AppendPlus($this,'colorbox');
$this->theme->AppendPlus($this,'masonry');
?>
<?= $this->render('breadcrumbs.phtml'); ?>
<div class="row">
<div class="span3">
<?= $this->partial('hiwater/navi.phtml'); ?>
</div>
<div class="span9">
<div><?= $this->breadcrumb() ?> </div>
<?php echo $this->page->getNavigation(); ?>
<hr />
<div>
<ul class="thumb water-thumb unstyled" id="container">
<?php foreach($this->metadata as $md) : ?>
<li class="items">
<h4><a href="/heihe/view/uuid/<?php echo $md['uuid'];?>"><?= $this->escape($md['title']);?></a></h4>
<h4><a href="/hiwater/view/uuid/<?php echo $md['uuid'];?>"><?= $this->escape($md['title']);?></a></h4>
<a href="/service/bigthumb/uuid/<?= $md['uuid'] ?>" class="thumbnail colorbox">
<img src="/service/thumb/id/<?php echo $md['id'];?>" alt="">
</a>
@ -33,7 +28,7 @@ $this->theme->AppendPlus($this,'masonry');
<?php echo mb_strlen($md['description'])>120?$this->escape(mb_substr($md['description'],0,120,'UTF-8').'...'):$this->escape($md['description']);?>
</p>
</div>
<span class="pull-right"><a href="/data/<?php echo $md['uuid'];?>" class="btn"><i class="icon-zoom-in"></i>查看</a></span>
<span class="pull-right"><a href="/hiwater/view/uuid/<?php echo $md['uuid'];?>" class="btn"><i class="icon-zoom-in"></i>查看</a></span>
</li>
<?php endforeach; ?>
</ul>