From 97ea3adcab0c8a6c57f2ee63a0343165324019cb Mon Sep 17 00:00:00 2001 From: wangchunsheng Date: Sat, 12 Dec 2009 04:15:34 +0000 Subject: [PATCH] * adjust the UI. --- trunk/module/common/control.php | 97 ++++++++++++++++++ trunk/module/common/footer.html.php | 31 +----- trunk/module/common/header.html.php | 68 +------------ trunk/module/common/lang/zh-cn.php | 13 ++- trunk/module/my/view/header.html.php | 75 -------------- trunk/module/my/view/todo.html.php | 142 ++++++++++++++++----------- trunk/www/theme/default/style.css | 94 +++++++++--------- trunk/www/theme/firefox.css | 5 +- 8 files changed, 245 insertions(+), 280 deletions(-) diff --git a/trunk/module/common/control.php b/trunk/module/common/control.php index f2642323f7..eae8b0b96f 100644 --- a/trunk/module/common/control.php +++ b/trunk/module/common/control.php @@ -97,6 +97,103 @@ EOT; return false; } + /* 打印顶部的条形区域。*/ + public static function printTopBar() + { + global $lang, $app; + if(isset($app->user)) echo $app->user->realname . ' '; + if(isset($app->user) and $app->user->account != 'guest') + { + echo html::a(helper::createLink('my', 'index'), $lang->myControl); + echo html::a(helper::createLink('user', 'logout'), $lang->logout); + } + else + { + echo html::a(helper::createLink('user', 'login'), $lang->login); + } + echo html::a('http://www.zentao.cn', $lang->zentaoSite, '_blank'); + echo $lang->sponser; + } + + /* 打印主菜单。*/ + public static function printMainmenu($moduleName) + { + global $lang; + echo "\n"; + } + + /* 打印模块的菜单。*/ + public static function printModuleMenu($moduleName) + { + global $lang; + if(!isset($lang->$moduleName->menu)) {echo ""; return;} + $submenus = $lang->$moduleName->menu; + echo "\n"; + } + + /* 打印面包屑导航。*/ + public static function printBreadMenu($moduleName, $position) + { + global $lang; + $mainMenu = $moduleName; + if(isset($lang->menugroup->$moduleName)) $mainMenu = $lang->menugroup->$moduleName; + list($menuLabel, $module, $method) = explode('|', $lang->menu->index); + echo html::a(helper::createLink($module, $method), $lang->zentaoMS) . $lang->arrow; + if($moduleName != 'index') + { + list($menuLabel, $module, $method) = explode('|', $lang->menu->$mainMenu); + echo html::a(helper::createLink($module, $method), $menuLabel); + } + else + { + echo $lang->index->common; + } + if(empty($position)) return; + echo $lang->arrow; + foreach($position as $key => $link) + { + echo $link; + if(isset($position[$key + 1])) echo $lang->arrow; + } + } + /** * 设置当前访问的公司信息。 * diff --git a/trunk/module/common/footer.html.php b/trunk/module/common/footer.html.php index 48f9efff0d..ad185745fd 100644 --- a/trunk/module/common/footer.html.php +++ b/trunk/module/common/footer.html.php @@ -1,35 +1,12 @@ - +