diff --git a/module/index/js/index.js b/module/index/js/index.js index c0717fdd13..c81e06bc62 100644 --- a/module/index/js/index.js +++ b/module/index/js/index.js @@ -117,6 +117,10 @@ return 'project'; } } + if(moduleName === 'user' && (link.params.fromModule || link.params.$2) == 'my') + { + return 'my'; + } group = window.navGroup[moduleName] || moduleName || urlOrModuleName; return groupsMap[group] ? group : ''; diff --git a/module/issue/model.php b/module/issue/model.php index f8786102f2..4d773e0f43 100644 --- a/module/issue/model.php +++ b/module/issue/model.php @@ -151,16 +151,19 @@ class issueModel extends model * Get user issues. * * @param string $browseType open|assignto|closed|suspended|canceled + * @param string $account * @param string $orderBy * @param object $pager * @access public * @return array */ - public function getUserIssues($type = 'assignedTo', $orderBy = 'id_desc', $pager) + public function getUserIssues($type = 'assignedTo', $account = '', $orderBy = 'id_desc', $pager) { + if(empty($account)) $account = $this->app->user->account; + $issueList = $this->dao->select('*')->from(TABLE_ISSUE) ->where('deleted')->eq('0') - ->andWhere($type)->eq($this->app->user->account)->fi() + ->andWhere($type)->eq($account)->fi() ->beginIF($this->app->rawMethod == 'contribute')->andWhere("status")->in('resolved,canceled,closed')->fi() ->orderBy($orderBy) ->page($pager) diff --git a/module/my/control.php b/module/my/control.php index 1a1f8e3b2e..5191a4e3a0 100644 --- a/module/my/control.php +++ b/module/my/control.php @@ -539,7 +539,7 @@ class my extends control $this->view->orderBy = $orderBy; $this->view->pager = $pager; $this->view->type = $type; - $this->view->issues = $this->loadModel('issue')->getUserIssues($type, $orderBy, $pager); + $this->view->issues = $this->loadModel('issue')->getUserIssues($type, $this->app->user->account, $orderBy, $pager); $this->display(); } @@ -562,7 +562,7 @@ class my extends control $this->view->title = $this->lang->my->risk; $this->view->position[] = $this->lang->my->risk; - $this->view->risks = $this->loadModel('risk')->getUserRisks($type, $orderBy, $pager); + $this->view->risks = $this->loadModel('risk')->getUserRisks($type, $this->app->user->account, $orderBy, $pager); $this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter'); $this->view->orderBy = $orderBy; $this->view->pager = $pager; @@ -571,6 +571,30 @@ class my extends control $this->display(); } + public function team($orderBy = 'id', $recTotal = 0, $recPerPage = 15, $pageID = 1) + { + /* Set the pager. */ + $this->app->loadClass('pager', $static = true); + $pager = new pager($recTotal, $recPerPage, $pageID); + + /* Append id for secend sort. */ + $sort = $this->loadModel('common')->appendOrder($orderBy); + + /* Get users by dept. */ + $user = $this->loadModel('user')->getById($this->app->user->account, 'account'); + $deptID = $user->dept; + $users = $this->loadModel('company')->getUsers('inside', 'bydept', 0, $deptID, $sort, $pager); + foreach($users as $user) unset($user->password); //Remove passwd. + + $this->view->title = $this->lang->my->team; + $this->view->position[] = $this->lang->my->team; + $this->view->users = $users; + $this->view->orderBy = $orderBy; + $this->view->pager = $pager; + + $this->display(); + } + /** * Edit profile * diff --git a/module/my/lang/de.php b/module/my/lang/de.php index b94f0be8ea..f00ad35f0a 100644 --- a/module/my/lang/de.php +++ b/module/my/lang/de.php @@ -19,6 +19,7 @@ $lang->my->issue = 'My Issues'; $lang->my->risk = 'My Risks'; $lang->my->profile = 'Meine Profil'; $lang->my->dynamic = 'Meine Verlauf'; +$lang->my->team = 'My Team'; $lang->my->editProfile = 'Profil bearbeiten'; $lang->my->changePassword = 'Passwort ändern'; $lang->my->unbind = 'Unbind Ranger'; diff --git a/module/my/lang/en.php b/module/my/lang/en.php index eb6f5a37b3..5448ca0898 100644 --- a/module/my/lang/en.php +++ b/module/my/lang/en.php @@ -19,6 +19,7 @@ $lang->my->issue = 'My Issues'; $lang->my->risk = 'My Risks'; $lang->my->profile = 'My Profile'; $lang->my->dynamic = 'My Dynamics'; +$lang->my->team = 'My Team'; $lang->my->editProfile = 'Edit'; $lang->my->changePassword = 'Edit Password'; $lang->my->unbind = 'Unbind from Zdoo'; diff --git a/module/my/lang/fr.php b/module/my/lang/fr.php index 66c73a9ff5..b6d33cbaab 100644 --- a/module/my/lang/fr.php +++ b/module/my/lang/fr.php @@ -19,6 +19,7 @@ $lang->my->issue = 'My Issues'; $lang->my->risk = 'My Risks'; $lang->my->profile = 'Mon Profil'; $lang->my->dynamic = 'Mon Historique'; +$lang->my->team = 'My Team'; $lang->my->editProfile = 'Edit Profil'; $lang->my->changePassword = 'Changer le Mot de Passe'; $lang->my->unbind = 'Dissocier de Zdoo'; diff --git a/module/my/lang/vi.php b/module/my/lang/vi.php index 0bc37fdd9b..1e12400333 100644 --- a/module/my/lang/vi.php +++ b/module/my/lang/vi.php @@ -19,6 +19,7 @@ $lang->my->issue = 'My Issues'; $lang->my->risk = 'My Risks'; $lang->my->profile = 'Hồ sơ của bạn'; $lang->my->dynamic = 'Lịch sử của bạn'; +$lang->my->team = 'My Team'; $lang->my->editProfile = 'Sửa'; $lang->my->changePassword = 'Sửa mật khẩu'; $lang->my->unbind = 'Gỡ kết nối từ Zdoo'; diff --git a/module/my/lang/zh-cn.php b/module/my/lang/zh-cn.php index 2af5730db4..10d40b269f 100644 --- a/module/my/lang/zh-cn.php +++ b/module/my/lang/zh-cn.php @@ -19,6 +19,7 @@ $lang->my->issue = '我的问题'; $lang->my->risk = '我的风险'; $lang->my->profile = '我的档案'; $lang->my->dynamic = '我的动态'; +$lang->my->team = '团队'; $lang->my->editProfile = '修改档案'; $lang->my->changePassword = '修改密码'; $lang->my->unbind = '解除ZDOO绑定'; diff --git a/module/my/lang/zh-tw.php b/module/my/lang/zh-tw.php index ace0e64e43..d8260e8d36 100644 --- a/module/my/lang/zh-tw.php +++ b/module/my/lang/zh-tw.php @@ -19,6 +19,7 @@ $lang->my->issue = '我的問題'; $lang->my->risk = '我的風險'; $lang->my->profile = '我的檔案'; $lang->my->dynamic = '我的動態'; +$lang->my->team = '團隊'; $lang->my->editProfile = '修改檔案'; $lang->my->changePassword = '修改密碼'; $lang->my->unbind = '解除ZDOO綁定'; diff --git a/module/my/view/team.html.php b/module/my/view/team.html.php index c8c8ce4304..ffc690c23b 100644 --- a/module/my/view/team.html.php +++ b/module/my/view/team.html.php @@ -1,14 +1,61 @@ - * @package dashboard - * @version $Id: team.html.php 4129 2013-01-18 01:58:14Z wwccss $ + * @package product + * @version $Id: browse.html.php 5096 2013-07-11 07:02:43Z chencongzhi520@gmail.com $ * @link http://www.zentao.net */ ?> - - + +
+
+
+
+ + + + recTotal}&recPerPage={$pager->recPerPage}";?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
idAB);?>user->realname);?>user->account);?>user->role);?>user->email);?>user->gender);?>user->phone);?>config->isINT) ? common::printOrderLink('skype', $orderBy, $vars, $lang->user->skype) : common::printOrderLink('qq', $orderBy, $vars, $lang->user->qq);?>user->last);?>user->visits);?>
id);?>id&from=my", $user->realname, '', "title='$user->realname'")) echo $user->realname;?>account;?>'>user->roleList, $user->role, '');?>email);?>user->genderList, $user->gender, $user->gender);?>phone;?>config->isINT) ? $user->skype : ($user->qq ? html::a("tencent://message/?uin=$user->qq", $user->qq) : '');?>last) echo date('Y-m-d', $user->last);?>visits;?>
+ + + +
+
+
+ diff --git a/module/risk/model.php b/module/risk/model.php index 5d8ab1ab92..e60986d71f 100644 --- a/module/risk/model.php +++ b/module/risk/model.php @@ -236,16 +236,19 @@ class riskModel extends model * Get user risks. * * @param string $type open|assignto|closed|suspended|canceled + * @param string $account * @param string $orderBy * @param object $pager * @access public * @return object */ - public function getUserRisks($type = 'assignedTo', $orderBy = 'id_desc', $pager) + public function getUserRisks($type = 'assignedTo', $account = '', $orderBy = 'id_desc', $pager) { + if(empty($account)) $account = $this->app->user->account; + $riskList = $this->dao->select('*')->from(TABLE_RISK) ->where('deleted')->eq('0') - ->andWhere($type)->eq($this->app->user->account)->fi() + ->andWhere($type)->eq($account)->fi() ->beginIF($this->app->rawMethod == 'contribute')->andWhere("status")->in('closed,canceled')->fi() ->orderBy($orderBy) ->page($pager) diff --git a/module/user/control.php b/module/user/control.php index c12315cafc..e00fcf4079 100644 --- a/module/user/control.php +++ b/module/user/control.php @@ -32,18 +32,20 @@ class user extends control * View a user. * * @param string $userID + * @param string $fromModule * @access public * @return void */ - public function view($userID) + public function view($userID, $fromModule = 'user') { - $this->locate($this->createLink('user', 'todo', "userID=$userID")); + $this->locate($this->createLink('user', 'todo', "userID=$userID&fromModule=$fromModule")); } /** * Todos of a user. * * @param string $userID + * @param string $fromModule * @param string $type the todo type, today|lastweek|thisweek|all|undone, or a date. * @param string $status * @param string $orderBy @@ -53,7 +55,7 @@ class user extends control * @access public * @return void */ - public function todo($userID, $type = 'today', $status = 'all', $orderBy='date,status,begin', $recTotal = 0, $recPerPage = 20, $pageID = 1) + public function todo($userID, $fromModule = 'user', $type = 'today', $status = 'all', $orderBy='date,status,begin', $recTotal = 0, $recPerPage = 20, $pageID = 1) { /* Set thie url to session. */ $uri = $this->app->getURI(true); @@ -74,13 +76,17 @@ class user extends control $todos = $this->todo->getList($type, $account, $status, 0, $pager, $sort); $date = (int)$type == 0 ? helper::today() : $type; + /* Change the menu when in my module. */ + $this->resetMenu($fromModule); + /* set menus. */ $this->lang->set('menugroup.user', 'company'); - $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid'), $userID); + $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid'), $userID, $fromModule); $this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->todo; $this->view->position[] = $this->lang->user->todo; $this->view->tabID = 'todo'; + $this->view->fromModule = $fromModule; $this->view->date = $date; $this->view->todos = $todos; $this->view->user = $user; @@ -96,6 +102,7 @@ class user extends control * Story of a user. * * @param int $userID + * @param string $fromModule * @param string $type * @param int $recTotal * @param int $recPerPage @@ -103,7 +110,7 @@ class user extends control * @access public * @return void */ - public function story($userID, $type = 'assignedTo', $recTotal = 0, $recPerPage = 20, $pageID = 1) + public function story($userID, $fromModule = 'user', $type = 'assignedTo', $recTotal = 0, $recPerPage = 20, $pageID = 1) { /* Save session. */ $this->session->set('storyList', $this->app->getURI(true)); @@ -118,15 +125,19 @@ class user extends control /* Set menu. */ $this->lang->set('menugroup.user', 'company'); + /* Change the menu when in my module. */ + $this->resetMenu($fromModule); + /* Assign. */ $this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->story; $this->view->position[] = $this->lang->user->story; $this->view->stories = $this->loadModel('story')->getUserStories($account, $type, 'id_desc', $pager); $this->view->users = $this->user->getPairs('noletter'); + $this->view->fromModule = $fromModule; $this->view->type = $type; $this->view->user = $user; $this->view->pager = $pager; - $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid'), $userID); + $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid'), $userID, $fromModule); $this->display(); } @@ -135,6 +146,7 @@ class user extends control * Tasks of a user. * * @param int $userID + * @param string $fromModule * @param string $type * @param int $recTotal * @param int $recPerPage @@ -142,7 +154,7 @@ class user extends control * @access public * @return void */ - public function task($userID, $type = 'assignedTo', $recTotal = 0, $recPerPage = 20, $pageID = 1) + public function task($userID, $fromModule = 'user', $type = 'assignedTo', $recTotal = 0, $recPerPage = 20, $pageID = 1) { /* Save the session. */ $this->session->set('taskList', $this->app->getURI(true)); @@ -156,13 +168,17 @@ class user extends control /* Set the menu. */ $this->lang->set('menugroup.user', 'company'); - $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid'), $userID); + $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid'), $userID, $fromModule); + + /* Change the menu when in my module. */ + $this->resetMenu($fromModule); /* Assign. */ $this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->task; $this->view->position[] = $this->lang->user->task; $this->view->tabID = 'task'; $this->view->tasks = $this->loadModel('task')->getUserTasks($account, $type, 0, $pager); + $this->view->fromModule = $fromModule; $this->view->type = $type; $this->view->user = $user; $this->view->pager = $pager; @@ -174,6 +190,7 @@ class user extends control * User bugs. * * @param int $userID + * @param string $fromModule * @param string $type * @param string $orderBy * @param int $recTotal @@ -182,7 +199,7 @@ class user extends control * @access public * @return void */ - public function bug($userID, $type = 'assignedTo', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1) + public function bug($userID, $fromModule = 'user', $type = 'assignedTo', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1) { /* Save the session. */ $this->session->set('bugList', $this->app->getURI(true)); @@ -196,15 +213,19 @@ class user extends control /* Set menu. */ $this->lang->set('menugroup.user', 'company'); - $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid'), $userID); + $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid'), $userID, $fromModule); /* Load the lang of bug module. */ $this->app->loadLang('bug'); + /* Change the menu when in my module. */ + $this->resetMenu($fromModule); + $this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->bug; $this->view->position[] = $this->lang->user->bug; $this->view->tabID = 'bug'; $this->view->bugs = $this->loadModel('bug')->getUserBugs($account, $type, $orderBy, 0, $pager); + $this->view->fromModule = $fromModule; $this->view->type = $type; $this->view->user = $user; $this->view->users = $this->user->getPairs('noletter'); @@ -217,6 +238,7 @@ class user extends control * User's testtask * * @param int $userID + * @param string $fromModule * @param string $orderBy * @param int $recTotal * @param int $recPerPage @@ -224,7 +246,7 @@ class user extends control * @access public * @return void */ - public function testtask($userID, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1) + public function testtask($userID, $fromModule = 'user', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1) { /* Load pager. */ $this->app->loadClass('pager', $static = true); @@ -235,7 +257,7 @@ class user extends control /* Set menu. */ $this->lang->set('menugroup.user', 'company'); - $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid'), $userID); + $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid'), $userID, $fromModule); /* Save session. */ $this->session->set('testtaskList', $this->app->getURI(true)); @@ -245,11 +267,15 @@ class user extends control /* Append id for secend sort. */ $sort = $this->loadModel('common')->appendOrder($orderBy); + /* Change the menu when in my module. */ + $this->resetMenu($fromModule); + $this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->testTask; $this->view->position[] = $this->lang->user->testTask; $this->view->tasks = $this->loadModel('testtask')->getByUser($account, $pager, $sort); $this->view->users = $this->user->getPairs('noletter'); $this->view->user = $user; + $this->view->fromModule = $fromModule; $this->view->recTotal = $recTotal; $this->view->recPerPage = $recPerPage; $this->view->pageID = $pageID; @@ -262,6 +288,7 @@ class user extends control * User's test case. * * @param int $userID + * @param string $fromModule * @param string $type * @param string $orderBy * @param int $recTotal @@ -270,7 +297,7 @@ class user extends control * @access public * @return void */ - public function testcase($userID, $type = 'case2Him', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1) + public function testcase($userID, $fromModule = 'user', $type = 'case2Him', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1) { /* Save session, load lang. */ $this->session->set('caseList', $this->app->getURI(true)); @@ -289,6 +316,9 @@ class user extends control /* Set menu. */ $this->lang->set('menugroup.user', 'company'); + /* Change the menu when in my module. */ + $this->resetMenu($fromModule); + $cases = array(); if($type == 'case2Him') { @@ -307,39 +337,136 @@ class user extends control $this->view->cases = $cases; $this->view->users = $this->user->getPairs('noletter'); $this->view->tabID = 'test'; + $this->view->fromModule = $fromModule; $this->view->type = $type; $this->view->recTotal = $recTotal; $this->view->recPerPage = $recPerPage; $this->view->pageID = $pageID; $this->view->orderBy = $orderBy; $this->view->pager = $pager; - $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid'), $userID); + $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid'), $userID, $fromModule); $this->display(); } /** - * User projects. + * User executions. * * @param int $userID + * @param string $fromModule + * @param int $recTotal + * @param int $recPerPage + * @param int $pageID * @access public * @return void */ - public function project($userID) + public function execution($userID, $fromModule = 'user', $recTotal = 0, $recPerPage = 20, $pageID = 1) { $user = $this->user->getById($userID, 'id'); $account = $user->account; + /* Load pager. */ + $this->app->loadClass('pager', $static = true); + $pager = pager::init($recTotal, $recPerPage, $pageID); + /* Set the menus. */ $this->loadModel('project'); $this->lang->set('menugroup.user', 'company'); - $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclose|nodeleted|useid'), $userID); + $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclose|nodeleted|useid'), $userID, $fromModule); + + /* Change the menu when in my module. */ + $this->resetMenu($fromModule); $this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->project; $this->view->position[] = $this->lang->user->project; + $this->view->fromModule = $fromModule; $this->view->tabID = 'project'; - $this->view->projects = $this->user->getProjects($account); + $this->view->executions = $this->user->getProjects($account, array('sprint', 'stage'), 'all', $pager); $this->view->user = $user; + $this->view->pager = $pager; + + $this->display(); + } + + /** + * User issues. + * + * @param int $userID + * @param string $fromModule + * @param string $type + * @param string $orderBy + * @param int $recTotal + * @param int $recPerPage + * @param int $pageID + * @access public + * @return void + */ + public function issue($userID, $fromModule = 'user', $type = 'assignedTo', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1) + { + $user = $this->user->getById($userID, 'id'); + $account = $user->account; + + /* Load pager. */ + $this->app->loadClass('pager', $static = true); + $pager = pager::init($recTotal, $recPerPage, $pageID); + + /* Set the menus. */ + $this->lang->set('menugroup.user', 'company'); + $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclose|nodeleted|useid'), $userID, $fromModule); + + /* Change the menu when in my module. */ + $this->resetMenu($fromModule); + + $this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->issue; + $this->view->position[] = $this->lang->user->issue; + $this->view->fromModule = $fromModule; + $this->view->issues = $this->loadModel('issue')->getUserIssues($type, $account, $orderBy, $pager); + $this->view->user = $user; + $this->view->users = $this->loadModel('user')->getPairs('noletter'); + $this->view->type = $type; + $this->view->orderBy = $orderBy; + $this->view->pager = $pager; + + $this->display(); + } + + /** + * User risks. + * + * @param int $userID + * @param string $fromModule + * @param string $type + * @param string $orderBy + * @param int $recTotal + * @param int $recPerPage + * @param int $pageID + * @access public + * @return void + */ + public function risk($userID, $fromModule = 'user', $type = 'assignedTo', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1) + { + $user = $this->user->getById($userID, 'id'); + $account = $user->account; + + /* Load pager. */ + $this->app->loadClass('pager', $static = true); + $pager = pager::init($recTotal, $recPerPage, $pageID); + + /* Set the menus. */ + $this->lang->set('menugroup.user', 'company'); + $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclose|nodeleted|useid'), $userID, $fromModule); + + /* Change the menu when in my module. */ + $this->resetMenu($fromModule); + + $this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->risk; + $this->view->position[] = $this->lang->user->risk; + $this->view->fromModule = $fromModule; + $this->view->risks = $this->loadModel('risk')->getUserRisks($type, $account, $orderBy, $pager); + $this->view->user = $user; + $this->view->type = $type; + $this->view->orderBy = $orderBy; + $this->view->pager = $pager; $this->display(); } @@ -348,24 +475,29 @@ class user extends control * The profile of a user. * * @param int $userID + * @param string $fromModule * @access public * @return void */ - public function profile($userID = '') + public function profile($userID = '', $fromModule = 'user') { if(empty($userID)) $userID = $this->app->user->id; $user = $this->user->getById($userID, 'id'); $account = $user->account; + /* Change the menu when in my module. */ + $this->resetMenu($fromModule); + $this->view->title = "USER #$user->id $user->account/" . $this->lang->user->profile; $this->view->position[] = $this->lang->user->common; $this->view->position[] = $this->lang->user->profile; $this->view->user = $user; + $this->view->fromModule = $fromModule; $this->view->groups = $this->loadModel('group')->getByAccount($account); $this->view->deptPath = $this->dept->getParents($user->dept); $this->view->personalData = $this->user->getPersonalData($user->account); - $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclose|nodeleted|useid'), $userID); + $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclose|nodeleted|useid'), $userID, $fromModule); $this->display(); } @@ -935,22 +1067,23 @@ class user extends control /** * User dynamic. * - * @param string $period * @param int $userID + * @param string $fromModule + * @param string $period * @param int $recTotal * @param string $date * @param string $direction next|pre * @access public * @return void */ - public function dynamic($period = 'today', $userID = '', $recTotal = 0, $date = '', $direction = 'next') + public function dynamic($userID = '', $fromModule = 'user', $period = 'today', $recTotal = 0, $date = '', $direction = 'next') { $user = $this->user->getById($userID, 'id'); $account = $user->account; /* set menus. */ $this->lang->set('menugroup.user', 'company'); - $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid'), $userID); + $this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid'), $userID, $fromModule); /* Save session. */ $uri = $this->app->getURI(true); @@ -974,6 +1107,9 @@ class user extends control $sort = $this->loadModel('common')->appendOrder($orderBy); $date = empty($date) ? '' : date('Y-m-d', $date); + /* Change the menu when in my module. */ + $this->resetMenu($fromModule); + $actions = $this->loadModel('action')->getDynamic($account, $period, $sort, $pager, 'all', 'all', $date, $direction); $this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->dynamic; @@ -984,11 +1120,28 @@ class user extends control $this->view->users = $this->loadModel('user')->getPairs('noletter'); $this->view->pager = $pager; $this->view->user = $user; + $this->view->fromModule = $fromModule; $this->view->dateGroups = $this->action->buildDateGroup($actions, $direction, $period); $this->view->direction = $direction; $this->display(); } + /** + * Reset menu when from my module. + * + * @param string $fromModule + * @access public + * @return void + */ + public function resetMenu($fromModule = 'user') + { + if($fromModule == 'my') + { + $this->lang->admin->menu = $this->lang->my->menu; + $this->lang->noMenuModule[] = 'user'; + } + } + /** * Get user for ajax * diff --git a/module/user/js/common.js b/module/user/js/common.js index 58195a8692..d90e45b6c7 100644 --- a/module/user/js/common.js +++ b/module/user/js/common.js @@ -19,19 +19,19 @@ $(document).ready(function() }); }); -function switchAccount(account, method) +function switchAccount(account, method, fromModule) { if(method == 'dynamic') { - link = createLink('user', method, 'period=' + period + '&account=' + account); + link = createLink('user', method, 'account=' + account + '&fromModule=' + fromModule + '&period=' + period); } else if(method == 'todo') { - link = createLink('user', method, 'account=' + account + '&type=' + type); + link = createLink('user', method, 'account=' + account + '&fromModule=' + fromModule + '&type=' + type); } else { - link = createLink('user', method, 'account=' + account); + link = createLink('user', method, 'account=' + account + '&fromModule=' + fromModule); } location.href=link; } diff --git a/module/user/js/todo.js b/module/user/js/todo.js index 6fb71fec92..341c8ec0ec 100644 --- a/module/user/js/todo.js +++ b/module/user/js/todo.js @@ -1,6 +1,6 @@ function changeDate(date) { - location.href = createLink('user', 'todo', 'userID=' + userID + '&type=' + date.replace(/\-/g, '')); + location.href = createLink('user', 'todo', 'userID=' + userID + 'from=' + from + '&type=' + date.replace(/\-/g, '')); } $(function() diff --git a/module/user/lang/de.php b/module/user/lang/de.php index 24ad776292..a954df83bb 100644 --- a/module/user/lang/de.php +++ b/module/user/lang/de.php @@ -51,6 +51,7 @@ $lang->user->newPassword = 'New Password'; $lang->user->verifyPassword = 'Ihr Login Passwort'; $lang->user->resetPassword = 'Passwort vergessen?'; $lang->user->score = 'Score'; +$lang->user->name = 'Name'; $lang->user->legendBasic = 'Basic Information'; $lang->user->legendContribution = 'Contribution'; @@ -89,17 +90,19 @@ $lang->user->confirmDeleteTemplate = 'Do you want to delete this template?'; $lang->user->setPublicTemplate = 'Set as Public Template'; $lang->user->tplContentNotEmpty = 'Vorlageninhalt darf nicht leer sein!'; -$lang->user->profile = 'Profil'; -$lang->user->project = $lang->executionCommon; -$lang->user->task = 'Aufgaben'; -$lang->user->bug = 'Bugs'; -$lang->user->test = 'Tests'; -$lang->user->testTask = 'Testaufgaben'; -$lang->user->testCase = 'Testfälle'; -$lang->user->schedule = 'Schedule'; -$lang->user->todo = 'Todos'; -$lang->user->story = 'Story'; -$lang->user->dynamic = 'Verlauf'; +$lang->user->profile = 'Profil'; +$lang->user->project = $lang->executionCommon; +$lang->user->task = 'Aufgaben'; +$lang->user->bug = 'Bugs'; +$lang->user->test = 'Tests'; +$lang->user->testTask = 'Testaufgaben'; +$lang->user->testCase = 'Testfälle'; +$lang->user->issue = 'Issue'; +$lang->user->risk = 'Risk'; +$lang->user->schedule = 'Schedule'; +$lang->user->todo = 'Todos'; +$lang->user->story = 'Story'; +$lang->user->dynamic = 'Verlauf'; $lang->user->openedBy = 'Geöffnet'; $lang->user->assignedTo = 'Zugeordnet'; diff --git a/module/user/lang/en.php b/module/user/lang/en.php index 35d448dd64..72b30d0975 100644 --- a/module/user/lang/en.php +++ b/module/user/lang/en.php @@ -51,6 +51,7 @@ $lang->user->newPassword = 'New Password'; $lang->user->verifyPassword = 'Password'; $lang->user->resetPassword = 'Forgot Password?'; $lang->user->score = 'Score'; +$lang->user->name = 'Name'; $lang->user->legendBasic = 'Basic Information'; $lang->user->legendContribution = 'Contribution'; @@ -89,17 +90,19 @@ $lang->user->confirmDeleteTemplate = 'Do you want to delete this template?'; $lang->user->setPublicTemplate = 'Set as Public Template'; $lang->user->tplContentNotEmpty = 'The template content cannot be empty!'; -$lang->user->profile = 'Profile'; -$lang->user->project = $lang->executionCommon . 's'; -$lang->user->task = 'Tasks'; -$lang->user->bug = 'Bugs'; -$lang->user->test = 'Test'; -$lang->user->testTask = 'Requests'; -$lang->user->testCase = 'Cases'; -$lang->user->schedule = 'Schedule'; -$lang->user->todo = 'Todos'; -$lang->user->story = 'Stories'; -$lang->user->dynamic = 'Dynamics'; +$lang->user->profile = 'Profile'; +$lang->user->project = $lang->executionCommon . 's'; +$lang->user->task = 'Tasks'; +$lang->user->bug = 'Bugs'; +$lang->user->test = 'Test'; +$lang->user->testTask = 'Requests'; +$lang->user->testCase = 'Cases'; +$lang->user->issue = 'Issue'; +$lang->user->risk = 'Risk'; +$lang->user->schedule = 'Schedule'; +$lang->user->todo = 'Todos'; +$lang->user->story = 'Stories'; +$lang->user->dynamic = 'Dynamics'; $lang->user->openedBy = 'CreatedBy%s'; $lang->user->assignedTo = 'AssignedTo%s'; diff --git a/module/user/lang/fr.php b/module/user/lang/fr.php index dffaad87d0..931a68125f 100644 --- a/module/user/lang/fr.php +++ b/module/user/lang/fr.php @@ -51,6 +51,7 @@ $lang->user->newPassword = 'Nouveau Password'; $lang->user->verifyPassword = 'Mot de Passe'; $lang->user->resetPassword = 'Password oublié ?'; $lang->user->score = 'Score'; +$lang->user->name = 'Name'; $lang->user->legendBasic = 'Informations de Base'; $lang->user->legendContribution = 'Contribution'; @@ -89,17 +90,19 @@ $lang->user->confirmDeleteTemplate = 'Voulez-vous vraiment supprimer ce modèle $lang->user->setPublicTemplate = 'Définir comme Modèle Public'; $lang->user->tplContentNotEmpty = 'Le contenu du modèle ne peut pas être vide !'; -$lang->user->profile = 'Profil'; -$lang->user->project = $lang->executionCommon . 's'; -$lang->user->task = 'Tâches'; -$lang->user->bug = 'Bugs'; -$lang->user->test = 'Test'; -$lang->user->testTask = 'Recettes'; -$lang->user->testCase = 'CasTests'; -$lang->user->schedule = 'Agenda'; -$lang->user->todo = 'Todo List'; -$lang->user->story = 'Stories'; -$lang->user->dynamic = 'Historique'; +$lang->user->profile = 'Profil'; +$lang->user->project = $lang->executionCommon . 's'; +$lang->user->task = 'Tâches'; +$lang->user->bug = 'Bugs'; +$lang->user->test = 'Test'; +$lang->user->testTask = 'Recettes'; +$lang->user->testCase = 'CasTests'; +$lang->user->issue = 'Issue'; +$lang->user->risk = 'Risk'; +$lang->user->schedule = 'Agenda'; +$lang->user->todo = 'Todo List'; +$lang->user->story = 'Stories'; +$lang->user->dynamic = 'Historique'; $lang->user->openedBy = 'Créé par %s'; $lang->user->assignedTo = 'Assigné à %s'; diff --git a/module/user/lang/vi.php b/module/user/lang/vi.php index 0a7ae9b0b0..a8921aee89 100644 --- a/module/user/lang/vi.php +++ b/module/user/lang/vi.php @@ -51,6 +51,7 @@ $lang->user->newPassword = 'Mật khẩu mới'; $lang->user->verifyPassword = 'Mật khẩu'; $lang->user->resetPassword = 'Quên mật khẩu?'; $lang->user->score = 'Điểm'; +$lang->user->name = 'Name'; $lang->user->legendBasic = 'Thông tin cơ bản'; $lang->user->legendContribution = 'Đóng góp'; @@ -96,6 +97,8 @@ $lang->user->bug = 'Bugs'; $lang->user->test = 'Test'; $lang->user->testTask = 'Yêu cầu'; $lang->user->testCase = 'Tình huống'; +$lang->user->issue = 'Issue'; +$lang->user->risk = 'Risk'; $lang->user->schedule = 'Lịch trình'; $lang->user->todo = 'Việc làm'; $lang->user->story = 'Câu chuyện'; diff --git a/module/user/lang/zh-cn.php b/module/user/lang/zh-cn.php index cfa3427c57..4eb5573a59 100644 --- a/module/user/lang/zh-cn.php +++ b/module/user/lang/zh-cn.php @@ -51,6 +51,7 @@ $lang->user->newPassword = '新密码'; $lang->user->verifyPassword = '您的密码'; $lang->user->resetPassword = '忘记密码'; $lang->user->score = '积分'; +$lang->user->name = '名称'; $lang->user->legendBasic = '基本资料'; $lang->user->legendContribution = '个人贡献'; @@ -89,17 +90,19 @@ $lang->user->confirmDeleteTemplate = '您确认要删除该模板吗?'; $lang->user->setPublicTemplate = '设为公共模板'; $lang->user->tplContentNotEmpty = '模板内容不能为空!'; -$lang->user->profile = '档案'; -$lang->user->project = $lang->executionCommon; -$lang->user->task = '任务'; -$lang->user->bug = 'Bug'; -$lang->user->test = '测试'; -$lang->user->testTask = '测试单'; -$lang->user->testCase = '测试用例'; -$lang->user->schedule = '日程'; -$lang->user->todo = '待办'; -$lang->user->story = $lang->productSRCommon; -$lang->user->dynamic = '动态'; +$lang->user->profile = '档案'; +$lang->user->project = $lang->executionCommon; +$lang->user->task = '任务'; +$lang->user->bug = 'Bug'; +$lang->user->test = '测试'; +$lang->user->testTask = '测试单'; +$lang->user->testCase = '测试用例'; +$lang->user->issue = '问题'; +$lang->user->risk = '风险'; +$lang->user->schedule = '日程'; +$lang->user->todo = '待办'; +$lang->user->story = $lang->productSRCommon; +$lang->user->dynamic = '动态'; $lang->user->openedBy = '由%s创建'; $lang->user->assignedTo = '指派给%s'; diff --git a/module/user/lang/zh-tw.php b/module/user/lang/zh-tw.php index a612a84fea..8226a8bb49 100644 --- a/module/user/lang/zh-tw.php +++ b/module/user/lang/zh-tw.php @@ -49,6 +49,7 @@ $lang->user->newPassword = '新密碼'; $lang->user->verifyPassword = '您的密碼'; $lang->user->resetPassword = '忘記密碼'; $lang->user->score = '積分'; +$lang->user->name = '名稱'; $lang->user->legendBasic = '基本資料'; $lang->user->legendContribution = '個人貢獻'; @@ -87,17 +88,19 @@ $lang->user->confirmDeleteTemplate = '您確認要刪除該模板嗎?'; $lang->user->setPublicTemplate = '設為公共模板'; $lang->user->tplContentNotEmpty = '模板內容不能為空!'; -$lang->user->profile = '檔案'; -$lang->user->project = $lang->executionCommon; -$lang->user->task = '任務'; -$lang->user->bug = 'Bug'; -$lang->user->test = '測試'; -$lang->user->testTask = '測試單'; -$lang->user->testCase = '測試用例'; -$lang->user->schedule = '日程'; -$lang->user->todo = '待辦'; -$lang->user->story = $lang->productSRCommon; -$lang->user->dynamic = '動態'; +$lang->user->profile = '檔案'; +$lang->user->project = $lang->executionCommon; +$lang->user->task = '任務'; +$lang->user->bug = 'Bug'; +$lang->user->test = '測試'; +$lang->user->testTask = '測試單'; +$lang->user->testCase = '測試用例'; +$lang->user->issue = '問題'; +$lang->user->risk = '風險'; +$lang->user->schedule = '日程'; +$lang->user->todo = '待辦'; +$lang->user->story = $lang->productSRCommon; +$lang->user->dynamic = '動態'; $lang->user->openedBy = '由%s創建'; $lang->user->assignedTo = '指派給%s'; diff --git a/module/user/model.php b/module/user/model.php index 822eb0061c..31b1345da4 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -18,17 +18,18 @@ class userModel extends model * * @param array $users * @param string $account + * @param string $fromModule * @access public * @return html */ - public function setUserList($users, $account) + public function setUserList($users, $account, $fromModule = 'user') { if(!isset($users[$account])) { $user = $this->getById($account); if($user and $user->deleted) $users[$account] = zget($user, 'realname', $account); } - return html::select('account', $users, $account, "onchange=\"switchAccount(this.value, '{$this->app->getMethodName()}')\" class='form-control chosen'"); + return html::select('account', $users, $account, "onchange=\"switchAccount(this.value, '{$this->app->getMethodName()}', '{$fromModule}')\" class='form-control chosen'"); } /** diff --git a/module/user/view/bug.html.php b/module/user/view/bug.html.php index 6dbf3375f4..cccf0deb0f 100644 --- a/module/user/view/bug.html.php +++ b/module/user/view/bug.html.php @@ -19,16 +19,16 @@ user->thirdPerson, $user->gender); $active = $type == 'assignedTo' ? 'active' : ''; - echo "
  • " . html::a(inlink('bug', "userID={$user->id}&type=assignedTo"), sprintf($lang->user->assignedTo, $that)) . "
  • "; + echo "
  • " . html::a(inlink('bug', "userID={$user->id}&fromModule=$fromModule&type=assignedTo"), sprintf($lang->user->assignedTo, $that)) . "
  • "; $active = $type == 'openedBy' ? 'active' : ''; - echo "
  • " . html::a(inlink('bug', "userID={$user->id}&type=openedBy"), sprintf($lang->user->openedBy, $that)) . "
  • "; + echo "
  • " . html::a(inlink('bug', "userID={$user->id}&fromModule=$fromModule&type=openedBy"), sprintf($lang->user->openedBy, $that)) . "
  • "; $active = $type == 'resolvedBy' ? 'active' : ''; - echo "
  • " . html::a(inlink('bug', "userID={$user->id}&type=resolvedBy"), sprintf($lang->user->resolvedBy, $that)) . "
  • "; + echo "
  • " . html::a(inlink('bug', "userID={$user->id}&fromModule=$fromModule&type=resolvedBy"), sprintf($lang->user->resolvedBy, $that)) . "
  • "; $active = $type == 'closedBy' ? 'active' : ''; - echo "
  • " . html::a(inlink('bug', "userID={$user->id}&type=closedBy"), sprintf($lang->user->closedBy, $that)) . "
  • "; + echo "
  • " . html::a(inlink('bug', "userID={$user->id}&fromModule=$fromModule&type=closedBy"), sprintf($lang->user->closedBy, $that)) . "
  • "; ?> diff --git a/module/user/view/dynamic.html.php b/module/user/view/dynamic.html.php index 22fa97a7f2..b045ae67fd 100644 --- a/module/user/view/dynamic.html.php +++ b/module/user/view/dynamic.html.php @@ -25,7 +25,7 @@ $active = 'btn-active-text'; $label .= " {$pager->recTotal}"; } - echo html::a(inlink('dynamic', "type=$period&userID={$user->id}"), $label, '', "class='btn btn-link $active' id='{$period}'") + echo html::a(inlink('dynamic', "userID={$user->id}&fromModule=$fromModule&type=$period"), $label, '', "class='btn btn-link $active' id='{$period}'") ?> diff --git a/module/user/view/featurebar.html.php b/module/user/view/featurebar.html.php index 588ea0ba66..93b7494302 100755 --- a/module/user/view/featurebar.html.php +++ b/module/user/view/featurebar.html.php @@ -10,35 +10,43 @@ $label = "{$lang->user->schedule}"; $active = $methodName == 'todo' ? ' btn-active-text' : ''; - common::printLink('user', 'todo', "userID={$user->id}", $label, '', "class='btn btn-link $active'"); + common::printLink('user', 'todo', "userID={$user->id}&fromModule=$fromModule", $label, '', "class='btn btn-link $active'"); $label = "{$lang->user->story}"; $active = $methodName == 'story' ? ' btn-active-text' : ''; - common::printLink('user', 'story', "userID={$user->id}", $label, '', "class='btn btn-link $active'"); + common::printLink('user', 'story', "userID={$user->id}&fromModule=$fromModule", $label, '', "class='btn btn-link $active'"); $label = "{$lang->user->task}"; $active = $methodName == 'task' ? ' btn-active-text' : ''; - common::printLink('user', 'task', "userID={$user->id}", $label, '', "class='btn btn-link $active'"); + common::printLink('user', 'task', "userID={$user->id}&fromModule=$fromModule", $label, '', "class='btn btn-link $active'"); $label = "{$lang->user->bug}"; $active = $methodName == 'bug' ? ' btn-active-text' : ''; - common::printLink('user', 'bug', "userID={$user->id}", $label, '', "class='btn btn-link $active'"); + common::printLink('user', 'bug', "userID={$user->id}&fromModule=$fromModule", $label, '', "class='btn btn-link $active'"); $label = "{$lang->user->test}"; $active = ($methodName == 'testtask' or $methodName == 'testcase')? ' btn-active-text' : ''; - common::printLink('user', 'testtask', "userID={$user->id}", $label, '', "class='btn btn-link $active'"); + common::printLink('user', 'testtask', "userID={$user->id}&fromModule=$fromModule", $label, '', "class='btn btn-link $active'"); + + $label = "{$lang->user->issue}"; + $active = ($methodName == 'issue' or $methodName == 'issue')? ' btn-active-text' : ''; + common::printLink('user', 'issue', "userID={$user->id}&fromModule=$fromModule", $label, '', "class='btn btn-link $active'"); + + $label = "{$lang->user->risk}"; + $active = ($methodName == 'risk' or $methodName == 'risk')? ' btn-active-text' : ''; + common::printLink('user', 'risk', "userID={$user->id}&fromModule=$fromModule", $label, '', "class='btn btn-link $active'"); $label = "{$lang->user->dynamic}"; $active = $methodName == 'dynamic' ? ' btn-active-text' : ''; - common::printLink('user', 'dynamic', "type=today&userID={$user->id}", $label, '', "class='btn btn-link $active'"); + common::printLink('user', 'dynamic', "userID={$user->id}&fromModule=$fromModule&type=today", $label, '', "class='btn btn-link $active'"); - $label = "{$lang->user->project}"; - $active = $methodName == 'project' ? ' btn-active-text' : ''; - common::printLink('user', 'project', "userID={$user->id}", $label, '', "class='btn btn-link $active'"); + $label = "{$lang->execution->common}"; + $active = $methodName == 'execution' ? ' btn-active-text' : ''; + common::printLink('user', 'execution', "userID={$user->id}&fromModule=$fromModule", $label, '', "class='btn btn-link $active'"); $label = "{$lang->user->profile}"; $active = $methodName == 'profile' ? ' btn-active-text' : ''; - common::printLink('user', 'profile', "userID={$user->id}", $label, '', "class='btn btn-link $active'"); + common::printLink('user', 'profile', "userID={$user->id}&fromModule=$fromModule", $label, '', "class='btn btn-link $active'"); ?> diff --git a/module/user/view/profile.html.php b/module/user/view/profile.html.php index dee103f1ec..0177895419 100644 --- a/module/user/view/profile.html.php +++ b/module/user/view/profile.html.php @@ -19,7 +19,7 @@

    user->profile;?>

    - createLink('user', 'edit', "userID=$user->id"), html::icon('pencil') . ' ' . $lang->user->editProfile, '', "class='btn btn-primary'"); ?> + createLink('user', 'edit', "userID=$user->id"), html::icon('pencil') . ' ' . $lang->user->editProfile, '', "class='btn btn-primary'"); ?>
    diff --git a/module/user/view/project.html.php b/module/user/view/project.html.php deleted file mode 100644 index 966d334ef7..0000000000 --- a/module/user/view/project.html.php +++ /dev/null @@ -1,55 +0,0 @@ - - * @package dashboard - * @version $Id: project.html.php 4129 2013-01-18 01:58:14Z wwccss $ - * @link http://www.zentao.net - */ -?> - - - -
    -
    - - - - - - - - - - - - - - - - - createLink('project', 'browse', "projectID=$project->id");?> - - - - - - - delay)):?> - - - - - - - - - - -
    idAB;?>project->code;?>project->name;?>project->begin;?>project->end;?>statusAB;?>team->role;?>team->join;?>team->hours;?>
    id);?>code;?>name);?>begin;?>end;?>project->delayed;?>processStatus('project', $project);?>role;?>join;?>hours;?>
    -
    -
    - diff --git a/module/user/view/story.html.php b/module/user/view/story.html.php index 88ad8a268d..c20c025b0a 100644 --- a/module/user/view/story.html.php +++ b/module/user/view/story.html.php @@ -19,16 +19,16 @@ user->thirdPerson, $user->gender); $active = $type == 'assignedTo' ? 'active' : ''; - echo "
  • " . html::a(inlink('story', "userID={$user->id}&type=assignedTo"), sprintf($lang->user->assignedTo, $that)) . "
  • "; + echo "
  • " . html::a(inlink('story', "userID={$user->id}&fromModule=$fromModule&type=assignedTo"), sprintf($lang->user->assignedTo, $that)) . "
  • "; $active = $type == 'openedBy' ? 'active' : ''; - echo "
  • " . html::a(inlink('story', "userID={$user->id}&type=openedBy"), sprintf($lang->user->openedBy, $that)) . "
  • "; + echo "
  • " . html::a(inlink('story', "userID={$user->id}&fromModule=$fromModule&type=openedBy"), sprintf($lang->user->openedBy, $that)) . "
  • "; $active = $type == 'reviewedBy' ? 'active' : ''; - echo "
  • " . html::a(inlink('story', "userID={$user->id}&type=reviewedBy"), sprintf($lang->user->reviewedBy ,$that)) . "
  • "; + echo "
  • " . html::a(inlink('story', "userID={$user->id}&fromModule=$fromModule&type=reviewedBy"), sprintf($lang->user->reviewedBy ,$that)) . "
  • "; $active = $type == 'closedBy' ? 'active' : ''; - echo "
  • " . html::a(inlink('story', "userID={$user->id}&type=closedBy"), sprintf($lang->user->closedBy ,$that)) . "
  • "; + echo "
  • " . html::a(inlink('story', "userID={$user->id}&fromModule=$fromModule&type=closedBy"), sprintf($lang->user->closedBy ,$that)) . "
  • "; ?> diff --git a/module/user/view/task.html.php b/module/user/view/task.html.php index cf5a259a56..b70464b6f9 100644 --- a/module/user/view/task.html.php +++ b/module/user/view/task.html.php @@ -19,19 +19,19 @@ user->thirdPerson, $user->gender); $active = $type == 'assignedTo' ? 'active' : ''; - echo "
  • " . html::a(inlink('task', "userID={$user->id}&type=assignedTo"), sprintf($lang->user->assignedTo, $that)) . "
  • "; + echo "
  • " . html::a(inlink('task', "userID={$user->id}&fromModule=$fromModule&type=assignedTo"), sprintf($lang->user->assignedTo, $that)) . "
  • "; $active = $type == 'openedBy' ? 'active' : ''; - echo "
  • " . html::a(inlink('task', "userID={$user->id}&type=openedBy"), sprintf($lang->user->openedBy, $that)) . "
  • "; + echo "
  • " . html::a(inlink('task', "userID={$user->id}&fromModule=$fromModule&type=openedBy"), sprintf($lang->user->openedBy, $that)) . "
  • "; $active = $type == 'finishedBy' ? 'active' : ''; - echo "
  • " . html::a(inlink('task', "userID={$user->id}&type=finishedBy"), sprintf($lang->user->finishedBy, $that)) . "
  • "; + echo "
  • " . html::a(inlink('task', "userID={$user->id}&fromModule=$fromModule&type=finishedBy"), sprintf($lang->user->finishedBy, $that)) . "
  • "; $active = $type == 'closedBy' ? 'active' : ''; - echo "
  • " . html::a(inlink('task', "userID={$user->id}&type=closedBy"), sprintf($lang->user->closedBy, $that)) . "
  • "; + echo "
  • " . html::a(inlink('task', "userID={$user->id}&fromModule=$fromModule&type=closedBy"), sprintf($lang->user->closedBy, $that)) . "
  • "; $active = $type == 'canceledBy' ? 'active' : ''; - echo "
  • " . html::a(inlink('task', "userID={$user->id}&type=canceledBy"), sprintf($lang->user->canceledBy, $that)) . "
  • "; + echo "
  • " . html::a(inlink('task', "userID={$user->id}&fromModule=$fromModule&type=canceledBy"), sprintf($lang->user->canceledBy, $that)) . "
  • "; ?> diff --git a/module/user/view/testcase.html.php b/module/user/view/testcase.html.php index 28e1aedc63..8e2b027e9f 100755 --- a/module/user/view/testcase.html.php +++ b/module/user/view/testcase.html.php @@ -17,12 +17,12 @@ @@ -30,7 +30,7 @@
    id}&type=$type&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; + $vars = "userID={$user->id}&fromModule=$fromModule&type=$type&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; $this->app->loadLang('testtask'); ?> diff --git a/module/user/view/testtask.html.php b/module/user/view/testtask.html.php index fe5bc14ef6..f3648490f7 100755 --- a/module/user/view/testtask.html.php +++ b/module/user/view/testtask.html.php @@ -17,16 +17,16 @@
    - id}&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?> + id}&fromModule=$fromModule&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?> diff --git a/module/user/view/todo.html.php b/module/user/view/todo.html.php index b5f7237456..7389c045e5 100644 --- a/module/user/view/todo.html.php +++ b/module/user/view/todo.html.php @@ -14,6 +14,7 @@ id);?> +
    idAB);?>
    - id}&type=$type&status=$status&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}"; ?> + id}&fromModule=$fromModule&type=$type&status=$status&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}"; ?>
    idAB);?>