* Modify user module bug.
This commit is contained in:
@@ -25,6 +25,7 @@ class user extends control
|
||||
$this->loadModel('company')->setMenu();
|
||||
$this->loadModel('dept');
|
||||
$this->loadModel('todo');
|
||||
$this->loadModel('execution');
|
||||
$this->app->loadLang('project');
|
||||
$this->app->loadModuleConfig($this->moduleName);//Finish task #5118.(Fix bug #2271)
|
||||
}
|
||||
@@ -385,7 +386,7 @@ class user extends control
|
||||
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->execution;
|
||||
$this->view->position[] = $this->lang->user->execution;
|
||||
$this->view->tabID = 'project';
|
||||
$this->view->executions = $this->user->getProjects($account, array('sprint', 'stage'), 'all', $pager);
|
||||
$this->view->executions = $this->user->getProjects($account, 'execution', 'all', $pager);
|
||||
$this->view->user = $user;
|
||||
$this->view->pager = $pager;
|
||||
|
||||
|
||||
@@ -1018,7 +1018,7 @@ class userModel extends model
|
||||
* Get projects a user participated.
|
||||
*
|
||||
* @param string $account
|
||||
* @param string $type
|
||||
* @param string $type project|execution
|
||||
* @param string $status
|
||||
* @access public
|
||||
* @return array
|
||||
@@ -1049,7 +1049,7 @@ class userModel extends model
|
||||
$hours = array();
|
||||
$emptyHour = array('totalConsumed' => 0, 'totalLeft' => 0, 'progress' => 0, 'waitTasks' => 0, 'assignedToMeTasks' => 0);
|
||||
$searchField = $type == 'project' ? 'project' : 'execution';
|
||||
$tasks = $this->dao->select('id, project, project, consumed, `left`, status, assignedTo')
|
||||
$tasks = $this->dao->select('id, project, execution, consumed, `left`, status, assignedTo')
|
||||
->from(TABLE_TASK)
|
||||
->where('parent')->lt(1)
|
||||
->andWhere($searchField)->in($projectIdList)->fi()
|
||||
|
||||
@@ -22,15 +22,15 @@
|
||||
<th class="text-left"><?php echo $lang->user->name;?></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->project->begin;?></th>
|
||||
<th class='w-date'><?php echo $lang->project->end;?></th>
|
||||
<th class='w-date'><?php echo $lang->execution->begin;?></th>
|
||||
<th class='w-date'><?php echo $lang->execution->end;?></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($executions as $execution):?>
|
||||
<?php $executionLink = $this->createLink('project', 'view', "projectID=$execution->id", '', false, $execution->project);?>
|
||||
<?php $executionLink = $this->createLink('execution', 'view', "executionID=$execution->id", '', false, $execution->project);?>
|
||||
<tr>
|
||||
<td><?php echo html::a($executionLink, $execution->id);?></td>
|
||||
<td>
|
||||
@@ -38,9 +38,9 @@
|
||||
<?php echo html::a($executionLink, $execution->name);?>
|
||||
</td>
|
||||
<?php if(isset($execution->delay)):?>
|
||||
<td class='project-delay'><?php echo $lang->project->delayed;?></td>
|
||||
<td class='project-delay'><?php echo $lang->execution->delayed;?></td>
|
||||
<?php else:?>
|
||||
<td class='project-<?php echo $execution->status?>'><?php echo $this->processStatus('project', $execution);?></td>
|
||||
<td class='project-<?php echo $execution->status?>'><?php echo $this->processStatus('execution', $execution);?></td>
|
||||
<?php endif;?>
|
||||
<td><?php echo $execution->role;?></td>
|
||||
<td><?php echo $execution->begin;?></td>
|
||||
|
||||
@@ -56,15 +56,15 @@
|
||||
<tr class='text-left'>
|
||||
<td><?php echo html::a($this->createLink('task', 'view', "taskID=$task->id", '', false, $task->project), sprintf('%03d', $task->id));?></td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->task->priList, $task->pri, $task->pri);?>'><?php echo $task->pri == '0' ? '' : zget($lang->task->priList, $task->pri, $task->pri)?></span></td>
|
||||
<td class='text-left nobr'><?php echo html::a($this->createLink('project', 'browse', "projectid=$task->projectID", '', false, $task->project), $task->projectName);?></td>
|
||||
<td class='text-left nobr'><?php echo html::a($this->createLink('execution', 'browse', "projectid=$task->projectID", '', false, $task->project), $task->projectName);?></td>
|
||||
<td class='text-left nobr'>
|
||||
<?php if(!empty($task->team)) echo '<span class="label label-badge label-light">' . $this->lang->task->multipleAB . '</span> ';?>
|
||||
<?php if($task->parent > 0) echo '<span class="label label-badge label-light">' . $this->lang->task->childrenAB . '</span> ';?>
|
||||
<?php echo html::a($this->createLink('task', 'view', "taskID=$task->id", '', false, $task->project), $task->name, null, "style='color: $task->color'");?>
|
||||
</td>
|
||||
<td class='hours' title="<?php echo $task->estimate . ' ' . $lang->project->workHour;?>"><?php echo $task->estimate . ' ' . $lang->project->workHourUnit;?></td>
|
||||
<td class='hours' title="<?php echo $task->consumed . ' ' . $lang->project->workHour;?>"><?php echo $task->consumed . ' ' . $lang->project->workHourUnit;?></td>
|
||||
<td class='hours' title="<?php echo $task->left . ' ' . $lang->project->workHour;?>"><?php echo $task->left . ' ' . $lang->project->workHourUnit;?></td>
|
||||
<td class='hours' title="<?php echo $task->estimate . ' ' . $lang->execution->workHour;?>"><?php echo $task->estimate . ' ' . $lang->execution->workHourUnit;?></td>
|
||||
<td class='hours' title="<?php echo $task->consumed . ' ' . $lang->execution->workHour;?>"><?php echo $task->consumed . ' ' . $lang->execution->workHourUnit;?></td>
|
||||
<td class='hours' title="<?php echo $task->left . ' ' . $lang->execution->workHour;?>"><?php echo $task->left . ' ' . $lang->execution->workHourUnit;?></td>
|
||||
<td class=<?php if(isset($task->delay)) echo 'delayed';?>><?php if(substr($task->deadline, 0, 4) > 0) echo $task->deadline;?></td>
|
||||
<td class='<?php echo $task->status;?>'><?php echo $this->processStatus('task', $task);?></td>
|
||||
</tr>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<tr>
|
||||
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th> <?php common::printOrderLink('name', $orderBy, $vars, $lang->testtask->name);?></th>
|
||||
<th> <?php common::printOrderLink('project', $orderBy, $vars, $lang->testtask->project);?></th>
|
||||
<th> <?php common::printOrderLink('project', $orderBy, $vars, $lang->testtask->execution);?></th>
|
||||
<th> <?php common::printOrderLink('build', $orderBy, $vars, $lang->testtask->build);?></th>
|
||||
<th class='w-100px'><?php common::printOrderLink('begin', $orderBy, $vars, $lang->testtask->begin);?></th>
|
||||
<th class='w-100px'><?php common::printOrderLink('end', $orderBy, $vars, $lang->testtask->end);?></th>
|
||||
@@ -41,7 +41,7 @@
|
||||
<tr>
|
||||
<td><?php echo html::a($this->createLink('testtask', 'view', "taskID=$task->id", '', false, $task->project), sprintf('%03d', $task->id));?></td>
|
||||
<td class='text-left nobr'><?php echo html::a($this->createLink('testtask', 'view', "taskID=$task->id", '', false, $task->project), $task->name);?></td>
|
||||
<td class='nobr'><?php echo $task->projectName?></td>
|
||||
<td class='nobr'><?php echo $task->executionName?></td>
|
||||
<td class='nobr'><?php $task->build == 'trunk' ? print($lang->trunk) : print(html::a($this->createLink('build', 'view', "buildID=$task->build", '', false, $task->project), $task->buildName));?></td>
|
||||
<td><?php echo $task->begin?></td>
|
||||
<td><?php echo $task->end?></td>
|
||||
|
||||
Reference in New Issue
Block a user