From d7ede5d7c9db52723b2182aa2965705f748e44a3 Mon Sep 17 00:00:00 2001 From: "guotao@cnezsoft.com" Date: Sun, 13 Mar 2011 01:09:41 +0000 Subject: [PATCH] + bug #139 --- module/my/control.php | 4 ++++ module/my/view/profile.html.php | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/module/my/control.php b/module/my/control.php index bf5dbf29b3..d99325c638 100644 --- a/module/my/control.php +++ b/module/my/control.php @@ -21,6 +21,7 @@ class my extends control { parent::__construct(); $this->loadModel('user'); + $this->loadModel('dept'); $this->my->setMenu(); } @@ -304,6 +305,9 @@ class my extends control public function profile() { if($this->app->user->account == 'guest') die(js::alert('guest') . js::locate('back')); + $user = $this->user->getById($this->app->user->account); + $deptPath = $this->dept->getParents($user->dept); + $this->view->deptPath = $deptPath; $this->view->header->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->profile; $this->view->position[] = $this->lang->my->profile; $this->view->user = $this->user->getById($this->app->user->id); diff --git a/module/my/view/profile.html.php b/module/my/view/profile.html.php index 978f54bf78..608819c5ee 100644 --- a/module/my/view/profile.html.php +++ b/module/my/view/profile.html.php @@ -14,6 +14,26 @@ + + + + +
my->profile;?>
user->dept;?> + $dept) + { + if($dept->name) echo $dept->name; + if(isset($deptPath[$key + 1])) echo $lang->arrow; + } + } + ?> +
user->account;?> account;?>