* Finish task #9002.

This commit is contained in:
holan20180123
2021-01-13 15:04:11 +08:00
parent 2756ad7ab2
commit c9f0612924
31 changed files with 399 additions and 186 deletions
+4
View File
@@ -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 : '';
+5 -2
View File
@@ -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)
+26 -2
View File
@@ -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
*
+1
View File
@@ -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';
+1
View File
@@ -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';
+1
View File
@@ -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';
+1
View File
@@ -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';
+1
View File
@@ -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绑定';
+1
View File
@@ -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綁定';
+52 -5
View File
@@ -1,14 +1,61 @@
<?php
/**
* The team view file of dashboard module of ZenTaoPMS.
* The browse view file of product dept of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @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
*/
?>
<?php include './header.html.php';?>
<?php include './footer.html.php';?>
<?php
include '../../common/view/header.html.php';
?>
<div id='mainContent' class='main-row fade'>
<div class='main-col'>
<div class="cell" id="queryBox" data-module='user'></div>
<form class='main-table table-user' data-ride='table' method='post' data-nested='true' data-checkable='false' id='userListForm'>
<table class='table has-sort-head' id='userList'>
<thead>
<tr>
<?php $vars = "orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
<th class='c-id'><?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
<th><?php common::printOrderlink('realname', $orderBy, $vars, $lang->user->realname);?></th>
<th><?php common::printOrderLink('account', $orderBy, $vars, $lang->user->account);?></th>
<th class="w-90px"><?php common::printOrderLink('role', $orderBy, $vars, $lang->user->role);?></th>
<th class="c-url"><?php common::printOrderLink('email', $orderBy, $vars, $lang->user->email);?></th>
<th class="c-type"><?php common::printOrderLink('gender', $orderBy, $vars, $lang->user->gender);?></th>
<th><?php common::printOrderLink('phone', $orderBy, $vars, $lang->user->phone);?></th>
<th><?php !empty($this->config->isINT) ? common::printOrderLink('skype', $orderBy, $vars, $lang->user->skype) : common::printOrderLink('qq', $orderBy, $vars, $lang->user->qq);?></th>
<th class="c-date"><?php common::printOrderLink('last', $orderBy, $vars, $lang->user->last);?></th>
<th class="w-90px"><?php common::printOrderLink('visits', $orderBy, $vars, $lang->user->visits);?></th>
</tr>
</thead>
<tbody>
<?php foreach($users as $user):?>
<tr>
<td class='c-id'><?php printf('%03d', $user->id);?></td>
<td><?php if(!common::printLink('user', 'view', "userID=$user->id&from=my", $user->realname, '', "title='$user->realname'")) echo $user->realname;?></td>
<td><?php echo $user->account;?></td>
<td class="w-90px" title='<?php echo zget($lang->user->roleList, $user->role, '');?>'><?php echo zget($lang->user->roleList, $user->role, '');?></td>
<td class="c-url" title="<?php echo $user->email;?>"><?php echo html::mailto($user->email);?></td>
<td class="c-type"><?php echo zget($lang->user->genderList, $user->gender, $user->gender);?></td>
<td><?php echo $user->phone;?></td>
<td><?php echo !empty($this->config->isINT) ? $user->skype : ($user->qq ? html::a("tencent://message/?uin=$user->qq", $user->qq) : '');?></td>
<td class='c-date'><?php if($user->last) echo date('Y-m-d', $user->last);?></td>
<td class='c-num text-center'><?php echo $user->visits;?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<?php if($users):?>
<div class='table-footer'>
<?php $pager->show('right', 'pagerjs');?>
</div>
<?php endif;?>
</form>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+5 -2
View File
@@ -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)
+176 -23
View File
@@ -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
*
+4 -4
View File
@@ -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;
}
+1 -1
View File
@@ -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()
+14 -11
View File
@@ -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';
+14 -11
View File
@@ -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';
+14 -11
View File
@@ -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';
+3
View File
@@ -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';
+14 -11
View File
@@ -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';
+14 -11
View File
@@ -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';
+3 -2
View File
@@ -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'");
}
/**
+4 -4
View File
@@ -19,16 +19,16 @@
<?php
$that = zget($lang->user->thirdPerson, $user->gender);
$active = $type == 'assignedTo' ? 'active' : '';
echo "<li class='$active'>" . html::a(inlink('bug', "userID={$user->id}&type=assignedTo"), sprintf($lang->user->assignedTo, $that)) . "</li>";
echo "<li class='$active'>" . html::a(inlink('bug', "userID={$user->id}&fromModule=$fromModule&type=assignedTo"), sprintf($lang->user->assignedTo, $that)) . "</li>";
$active = $type == 'openedBy' ? 'active' : '';
echo "<li class='$active'>" . html::a(inlink('bug', "userID={$user->id}&type=openedBy"), sprintf($lang->user->openedBy, $that)) . "</li>";
echo "<li class='$active'>" . html::a(inlink('bug', "userID={$user->id}&fromModule=$fromModule&type=openedBy"), sprintf($lang->user->openedBy, $that)) . "</li>";
$active = $type == 'resolvedBy' ? 'active' : '';
echo "<li class='$active'>" . html::a(inlink('bug', "userID={$user->id}&type=resolvedBy"), sprintf($lang->user->resolvedBy, $that)) . "</li>";
echo "<li class='$active'>" . html::a(inlink('bug', "userID={$user->id}&fromModule=$fromModule&type=resolvedBy"), sprintf($lang->user->resolvedBy, $that)) . "</li>";
$active = $type == 'closedBy' ? 'active' : '';
echo "<li class='$active'>" . html::a(inlink('bug', "userID={$user->id}&type=closedBy"), sprintf($lang->user->closedBy, $that)) . "</li>";
echo "<li class='$active'>" . html::a(inlink('bug', "userID={$user->id}&fromModule=$fromModule&type=closedBy"), sprintf($lang->user->closedBy, $that)) . "</li>";
?>
</ul>
</nav>
+1 -1
View File
@@ -25,7 +25,7 @@
$active = 'btn-active-text';
$label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";
}
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}'")
?>
<?php endforeach;?>
</div>
+18 -10
View File
@@ -10,35 +10,43 @@
$label = "<span class='text'>{$lang->user->schedule}</span>";
$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 = "<span class='text'>{$lang->user->story}</span>";
$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 = "<span class='text'>{$lang->user->task}</span>";
$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 = "<span class='text'>{$lang->user->bug}</span>";
$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 = "<span class='text'>{$lang->user->test}</span>";
$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 = "<span class='text'>{$lang->user->issue}</span>";
$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 = "<span class='text'>{$lang->user->risk}</span>";
$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 = "<span class='text'>{$lang->user->dynamic}</span>";
$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 = "<span class='text'>{$lang->user->project}</span>";
$active = $methodName == 'project' ? ' btn-active-text' : '';
common::printLink('user', 'project', "userID={$user->id}", $label, '', "class='btn btn-link $active'");
$label = "<span class='text'>{$lang->execution->common}</span>";
$active = $methodName == 'execution' ? ' btn-active-text' : '';
common::printLink('user', 'execution', "userID={$user->id}&fromModule=$fromModule", $label, '', "class='btn btn-link $active'");
$label = "<span class='text'>{$lang->user->profile}</span>";
$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'");
?>
</div>
</div>
+1 -1
View File
@@ -19,7 +19,7 @@
<div class='main-header'>
<h2><?php echo $lang->user->profile;?></h2>
<div class='actions pull-right'>
<?php if(common::hasPriv('user', 'edit')) echo html::a($this->createLink('user', 'edit', "userID=$user->id"), html::icon('pencil') . ' ' . $lang->user->editProfile, '', "class='btn btn-primary'"); ?>
<?php if($fromModule == 'user' and common::hasPriv('user', 'edit')) echo html::a($this->createLink('user', 'edit', "userID=$user->id"), html::icon('pencil') . ' ' . $lang->user->editProfile, '', "class='btn btn-primary'"); ?>
</div>
</div>
<div class='row'>
-55
View File
@@ -1,55 +0,0 @@
<?php
/**
* The project view file of dashboard module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package dashboard
* @version $Id: project.html.php 4129 2013-01-18 01:58:14Z wwccss $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/tablesorter.html.php';?>
<?php include './featurebar.html.php';?>
<div id='mainContent'>
<div class='main-table'>
<table class='table has-sort-head table-fixed tablesorter'>
<thead>
<tr class='colhead'>
<th class='w-id'><?php echo $lang->idAB;?></th>
<th class='w-100px'><?php echo $lang->project->code;?></th>
<th class="text-left"><?php echo $lang->project->name;?></th>
<th class='w-date'><?php echo $lang->project->begin;?></th>
<th class='w-date'><?php echo $lang->project->end;?></th>
<th class='w-status'><?php echo $lang->statusAB;?></th>
<th class='w-user'><?php echo $lang->team->role;?></th>
<th class='w-date'><?php echo $lang->team->join;?></th>
<th class='w-110px'><?php echo $lang->team->hours;?></th>
</tr>
</thead>
<tbody>
<?php foreach($projects as $project):?>
<?php $projectLink = $this->createLink('project', 'browse', "projectID=$project->id");?>
<tr>
<td><?php echo html::a($projectLink, $project->id);?></td>
<td><?php echo $project->code;?></td>
<td><?php echo html::a($projectLink, $project->name);?></td>
<td><?php echo $project->begin;?></td>
<td><?php echo $project->end;?></td>
<?php if(isset($project->delay)):?>
<td class='project-delay'><?php echo $lang->project->delayed;?></td>
<?php else:?>
<td class='project-<?php echo $project->status?>'><?php echo $this->processStatus('project', $project);?></td>
<?php endif;?>
<td><?php echo $project->role;?></td>
<td><?php echo $project->join;?></td>
<td><?php echo $project->hours;?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+4 -4
View File
@@ -19,16 +19,16 @@
<?php
$that = zget($lang->user->thirdPerson, $user->gender);
$active = $type == 'assignedTo' ? 'active' : '';
echo "<li class='$active'>" . html::a(inlink('story', "userID={$user->id}&type=assignedTo"), sprintf($lang->user->assignedTo, $that)) . "</li>";
echo "<li class='$active'>" . html::a(inlink('story', "userID={$user->id}&fromModule=$fromModule&type=assignedTo"), sprintf($lang->user->assignedTo, $that)) . "</li>";
$active = $type == 'openedBy' ? 'active' : '';
echo "<li class='$active'>" . html::a(inlink('story', "userID={$user->id}&type=openedBy"), sprintf($lang->user->openedBy, $that)) . "</li>";
echo "<li class='$active'>" . html::a(inlink('story', "userID={$user->id}&fromModule=$fromModule&type=openedBy"), sprintf($lang->user->openedBy, $that)) . "</li>";
$active = $type == 'reviewedBy' ? 'active' : '';
echo "<li class='$active'>" . html::a(inlink('story', "userID={$user->id}&type=reviewedBy"), sprintf($lang->user->reviewedBy ,$that)) . "</li>";
echo "<li class='$active'>" . html::a(inlink('story', "userID={$user->id}&fromModule=$fromModule&type=reviewedBy"), sprintf($lang->user->reviewedBy ,$that)) . "</li>";
$active = $type == 'closedBy' ? 'active' : '';
echo "<li class='$active'>" . html::a(inlink('story', "userID={$user->id}&type=closedBy"), sprintf($lang->user->closedBy ,$that)) . "</li>";
echo "<li class='$active'>" . html::a(inlink('story', "userID={$user->id}&fromModule=$fromModule&type=closedBy"), sprintf($lang->user->closedBy ,$that)) . "</li>";
?>
</ul>
</nav>
+5 -5
View File
@@ -19,19 +19,19 @@
<?php
$that = zget($lang->user->thirdPerson, $user->gender);
$active = $type == 'assignedTo' ? 'active' : '';
echo "<li class='$active'>" . html::a(inlink('task', "userID={$user->id}&type=assignedTo"), sprintf($lang->user->assignedTo, $that)) . "</li>";
echo "<li class='$active'>" . html::a(inlink('task', "userID={$user->id}&fromModule=$fromModule&type=assignedTo"), sprintf($lang->user->assignedTo, $that)) . "</li>";
$active = $type == 'openedBy' ? 'active' : '';
echo "<li class='$active'>" . html::a(inlink('task', "userID={$user->id}&type=openedBy"), sprintf($lang->user->openedBy, $that)) . "</li>";
echo "<li class='$active'>" . html::a(inlink('task', "userID={$user->id}&fromModule=$fromModule&type=openedBy"), sprintf($lang->user->openedBy, $that)) . "</li>";
$active = $type == 'finishedBy' ? 'active' : '';
echo "<li class='$active'>" . html::a(inlink('task', "userID={$user->id}&type=finishedBy"), sprintf($lang->user->finishedBy, $that)) . "</li>";
echo "<li class='$active'>" . html::a(inlink('task', "userID={$user->id}&fromModule=$fromModule&type=finishedBy"), sprintf($lang->user->finishedBy, $that)) . "</li>";
$active = $type == 'closedBy' ? 'active' : '';
echo "<li class='$active'>" . html::a(inlink('task', "userID={$user->id}&type=closedBy"), sprintf($lang->user->closedBy, $that)) . "</li>";
echo "<li class='$active'>" . html::a(inlink('task', "userID={$user->id}&fromModule=$fromModule&type=closedBy"), sprintf($lang->user->closedBy, $that)) . "</li>";
$active = $type == 'canceledBy' ? 'active' : '';
echo "<li class='$active'>" . html::a(inlink('task', "userID={$user->id}&type=canceledBy"), sprintf($lang->user->canceledBy, $that)) . "</li>";
echo "<li class='$active'>" . html::a(inlink('task', "userID={$user->id}&fromModule=$fromModule&type=canceledBy"), sprintf($lang->user->canceledBy, $that)) . "</li>";
?>
</ul>
</nav>
+4 -4
View File
@@ -17,12 +17,12 @@
<ul class='nav nav-default'>
<?php
$that = zget($lang->user->thirdPerson, $user->gender);
echo "<li id='testtaskTab'>" . html::a($this->createLink('user', 'testtask', "userID={$user->id}"), sprintf($lang->user->testTask2Him, $that)) . "</li>";
echo "<li id='testtaskTab'>" . html::a($this->createLink('user', 'testtask', "userID={$user->id}&fromModule=$fromModule"), sprintf($lang->user->testTask2Him, $that)) . "</li>";
$active = $type == 'case2Him' ? 'active' : '';
echo "<li class='$active'>" . html::a($this->createLink('user', 'testcase', "userID={$user->id}&type=case2Him"), sprintf($lang->user->case2Him, $that)) . "</li>";
echo "<li class='$active'>" . html::a($this->createLink('user', 'testcase', "userID={$user->id}&fromModule=$fromModule&type=case2Him"), sprintf($lang->user->case2Him, $that)) . "</li>";
$active = $type == 'caseByHim' ? 'active' : '';
echo "<li class='$active'>" . html::a($this->createLink('user', 'testcase', "userID={$user->id}&type=caseByHim"), sprintf($lang->user->caseByHim, $that)) . "</li>";
echo "<li class='$active'>" . html::a($this->createLink('user', 'testcase', "userID={$user->id}&fromModule=$fromModule&type=caseByHim"), sprintf($lang->user->caseByHim, $that)) . "</li>";
?>
</ul>
</nav>
@@ -30,7 +30,7 @@
<div class='main-table'>
<table class='table has-sort-head'>
<?php
$vars = "userID={$user->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');
?>
<thead>
+4 -4
View File
@@ -17,16 +17,16 @@
<ul class='nav nav-default'>
<?php
$that = zget($lang->user->thirdPerson, $user->gender);
echo "<li class='active'>" . html::a($this->createLink('user', 'testtask', "userID={$user->id}"), sprintf($lang->user->testTask2Him, $that)) . "</li>";
echo "<li>" . html::a($this->createLink('user', 'testcase', "userID={$user->id}&type=case2Him"), sprintf($lang->user->case2Him, $that)) . "</li>";
echo "<li>" . html::a($this->createLink('user', 'testcase', "userID={$user->id}&type=caseByHim"), sprintf($lang->user->caseByHim, $that)) . "</li>";
echo "<li class='active'>" . html::a($this->createLink('user', 'testtask', "userID={$user->id}&fromModule=$fromModule"), sprintf($lang->user->testTask2Him, $that)) . "</li>";
echo "<li>" . html::a($this->createLink('user', 'testcase', "userID={$user->id}&fromModule=$fromModule&type=case2Him"), sprintf($lang->user->case2Him, $that)) . "</li>";
echo "<li>" . html::a($this->createLink('user', 'testcase', "userID={$user->id}&fromModule=$fromModule&type=caseByHim"), sprintf($lang->user->caseByHim, $that)) . "</li>";
?>
</ul>
</nav>
<div class='main-table'>
<table class='table has-sort-head'>
<?php $vars = "userID={$user->id}&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
<?php $vars = "userID={$user->id}&fromModule=$fromModule&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
<thead>
<tr>
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
+3 -2
View File
@@ -14,6 +14,7 @@
<?php include "../../common/view/datepicker.html.php"; ?>
<?php include './featurebar.html.php';?>
<?php js::set('userID', $user->id);?>
<?php js::set('fromModule', $fromModule);?>
<?php js::set('type', $type);?>
<div id='mainContent'>
<nav id='contentNav'>
@@ -22,7 +23,7 @@
foreach($lang->todo->periods as $period => $label)
{
$active = $type == $period ? 'active' : '';
$vars = "userID={$user->id}&date=$period";
$vars = "userID={$user->id}&fromModule=$fromModule&date=$period";
if($period == 'before') $vars .= "&status=undone";
echo "<li id='$period' class='$active'>" . html::a(inlink('todo', $vars), $label) . '</li> ';
}
@@ -32,7 +33,7 @@
<form method='post' target='hiddenwin' action='<?php echo $this->createLink('todo', 'import2Today');?>' data-ride='table' id='todoform' class='main-table table-todo'>
<table class='table has-sort-head table-fixed'>
<?php $vars = "userID={$user->id}&type=$type&status=$status&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}"; ?>
<?php $vars = "userID={$user->id}&fromModule=$fromModule&type=$type&status=$status&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}"; ?>
<thead>
<tr class='colhead'>
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>