* Finish task #8797.

This commit is contained in:
holan20180123
2020-12-22 16:07:13 +08:00
parent 4563840ba7
commit 9c73a943f5
8 changed files with 16 additions and 18 deletions
+1 -1
View File
@@ -281,7 +281,7 @@ $lang->my->workMenu->issue = 'Issue|my|work|mode=issue';
$lang->my->workMenu->risk = 'Risk|my|work|mode=risk';
$lang->my->contributeMenu = new stdclass();
$lang->my->contributeMenu->execution = 'Execution|my|contribute|mode=execution';
$lang->my->contributeMenu->execution = 'Execution|my|contribute|mode=execution&type=undone';
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
$lang->my->contributeMenu->story = 'Story|my|contribute|mode=story';
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
+1 -1
View File
@@ -281,7 +281,7 @@ $lang->my->workMenu->issue = 'Issue|my|work|mode=issue';
$lang->my->workMenu->risk = 'Risk|my|work|mode=risk';
$lang->my->contributeMenu = new stdclass();
$lang->my->contributeMenu->execution = 'Execution|my|contribute|mode=execution';
$lang->my->contributeMenu->execution = 'Execution|my|contribute|mode=execution&type=undone';
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
$lang->my->contributeMenu->story = 'Story|my|contribute|mode=story';
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
+1 -1
View File
@@ -281,7 +281,7 @@ $lang->my->workMenu->issue = 'Issue|my|work|mode=issue';
$lang->my->workMenu->risk = 'Risk|my|work|mode=risk';
$lang->my->contributeMenu = new stdclass();
$lang->my->contributeMenu->execution = 'Execution|my|contribute|mode=execution';
$lang->my->contributeMenu->execution = 'Execution|my|contribute|mode=execution&type=undone';
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
$lang->my->contributeMenu->story = 'Story|my|contribute|mode=story';
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
+1 -1
View File
@@ -281,7 +281,7 @@ $lang->my->workMenu->issue = 'Issue|my|work|mode=issue';
$lang->my->workMenu->risk = 'Risk|my|work|mode=risk';
$lang->my->contributeMenu = new stdclass();
$lang->my->contributeMenu->execution = 'Execution|my|contribute|mode=execution';
$lang->my->contributeMenu->execution = 'Execution|my|contribute|mode=execution&type=undone';
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
$lang->my->contributeMenu->story = 'Story|my|contribute|mode=story';
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
+1 -1
View File
@@ -281,7 +281,7 @@ $lang->my->workMenu->issue = '问题|my|work|mode=issue';
$lang->my->workMenu->risk = '风险|my|work|mode=risk';
$lang->my->contributeMenu = new stdclass();
$lang->my->contributeMenu->execution = '执行|my|contribute|mode=execution';
$lang->my->contributeMenu->execution = '执行|my|contribute|mode=execution&type=undone';
$lang->my->contributeMenu->task = '任务|my|contribute|mode=task';
$lang->my->contributeMenu->story = '需求|my|contribute|mode=story';
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
+5 -4
View File
@@ -442,7 +442,8 @@ class my extends control
/**
* My executions.
* @param string $status undone|done
* @param string $type undone|done
* @param string $orderBy
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
@@ -450,7 +451,7 @@ class my extends control
* @access public
* @return void
*/
public function execution($status = 'undone', $recTotal = 0, $recPerPage = 15, $pageID = 1)
public function execution($type = 'undone', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 15, $pageID = 1)
{
$this->app->loadLang('project');
@@ -461,8 +462,8 @@ class my extends control
$this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->execution;
$this->view->position[] = $this->lang->my->execution;
$this->view->tabID = 'project';
$this->view->executions = $this->user->getProjects($this->app->user->account, 'execution', $status, $pager);
$this->view->status = $status;
$this->view->executions = $this->user->getProjects($this->app->user->account, 'execution', $type, $pager);
$this->view->type = $type;
$this->view->pager = $pager;
$this->view->mode = 'execution';
+4 -4
View File
@@ -16,8 +16,8 @@
<div class="btn-toolbar pull-left">
<?php
$recTotalLabel = " <span class='label label-light label-badge'>{$pager->recTotal}</span>";
echo html::a(inlink('execution', "type=undone"), "<span class='text'>{$lang->my->executionMenu->undone}</span>" . ($status == 'undone' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($status == 'undone' ? ' btn-active-text' : '') . "'");
echo html::a(inlink('execution', "type=done"), "<span class='text'>{$lang->my->executionMenu->done}</span>" . ($status == 'done' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($status == 'done' ? ' btn-active-text' : '') . "'");
echo html::a(inlink('contribute', "mode=execution&type=undone"), "<span class='text'>{$lang->my->executionMenu->undone}</span>" . ($type == 'undone' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'undone' ? ' btn-active-text' : '') . "'");
echo html::a(inlink('contribute', "mode=execution&type=done"), "<span class='text'>{$lang->my->executionMenu->done}</span>" . ($type == 'done' ? $recTotalLabel : ''), '', "class='btn btn-link" . ($type == 'done' ? ' btn-active-text' : '') . "'");
?>
</div>
</div>
@@ -63,8 +63,8 @@
<?php if(isset($execution->delay)):?>
<span class="status-project status-delayed" title='<?php echo $lang->project->delayed;?>'> <?php echo $lang->project->delayed;?></span>
<?php else:?>
<?php $statusName = $this->processStatus('project', $execution);?>
<span class="status-project status-<?php echo $execution->status?>" title='<?php echo $statusName;?>'> <?php echo $statusName;?></span>
<?php $typeName = $this->processStatus('project', $execution);?>
<span class="status-project status-<?php echo $execution->status?>" title='<?php echo $typeName;?>'> <?php echo $typeName;?></span>
<?php endif;?>
</td>
<td><?php echo $execution->role;?></td>
+2 -5
View File
@@ -999,11 +999,8 @@ class userModel extends model
$hour = (object)$emptyHour;
foreach($projectTasks as $task)
{
if($task->status == 'wait')
{
$hour->waitTasks += 1;
$hour->totalConsumed += $task->consumed;
}
if($task->status == 'wait') $hour->waitTasks += 1;
if($task->status != 'cancel') $hour->totalConsumed += $task->consumed;
if($task->status != 'cancel' and $task->status != 'closed') $hour->totalLeft += $task->left;
}
$hours[$projectID] = $hour;