修复导航条和顶部菜单问题

This commit is contained in:
wlx 2014-06-17 09:00:27 +00:00
parent 0628d9724e
commit 33229f30a9
3 changed files with 6 additions and 1 deletions

View File

@ -10,6 +10,10 @@ class VisualController extends Zend_Controller_Action
{ {
$this->view->config = Zend_Registry::get('config'); $this->view->config = Zend_Registry::get('config');
$this->db=Zend_Registry::get('db'); $this->db=Zend_Registry::get('db');
$this->view->nav = array(
array('link'=>'/','title'=>'<i class="icon-home"></i>'),
array('link'=>'/data','title'=>$this->view->config->title->data),
);
if(view::User() === false) if(view::User() === false)
{ {

View File

@ -8,6 +8,7 @@ $this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/data">数据与服务</a>'); $this->breadcrumb('<a href="/data">数据与服务</a>');
$this->breadcrumb('数据可视化'); $this->breadcrumb('数据可视化');
$this->breadcrumb()->setSeparator(' > '); $this->breadcrumb()->setSeparator(' > ');
$this->nav[] = array('link'=>"/data/visual",'title'=>'可视化数据列表');
?> ?>
<div class="row"> <div class="row">
<div class="span12"> <div class="span12">

View File

@ -2,7 +2,7 @@ function extractPageName(hrefString)
{ {
var arr = hrefString.split('/'); var arr = hrefString.split('/');
var result=(arr.length<3) ? hrefString : arr[3].toLowerCase(); var result=(arr.length<3) ? hrefString : arr[3].toLowerCase();
if (result=='water' || result=='heihe' || result=='glacier' || result=='yrnmr' || result=='hiwater') result='data'; if (result=='visual' || result=='heihe') result='data';
if (result=='admin' && arr.length>=4) result+="/"+arr[4]; if (result=='admin' && arr.length>=4) result+="/"+arr[4];
return result; return result;
} }