Merge branch 'master' into cyy_optimize
This commit is contained in:
@@ -516,7 +516,10 @@ class execution extends control
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$recTotal = count($tasks2Imported);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
|
||||
$tasks2ImportedList = array_chunk($tasks2Imported, $pager->recPerPage, true);
|
||||
$tasks2ImportedList = empty($tasks2ImportedList) ? $tasks2ImportedList : $tasks2ImportedList[$pageID - 1];
|
||||
$tasks2ImportedList = $this->loadModel('task')->processTasks($tasks2ImportedList);
|
||||
|
||||
/* Save session. */
|
||||
$this->app->session->set('taskList', $this->app->getURI(true), 'execution');
|
||||
@@ -525,7 +528,7 @@ class execution extends control
|
||||
$this->view->pager = $pager;
|
||||
$this->view->position[] = html::a(inlink('browse', "executionID=$toExecution"), $execution->name);
|
||||
$this->view->position[] = $this->lang->execution->importTask;
|
||||
$this->view->tasks2Imported = empty($tasks2ImportedList) ? $tasks2ImportedList : $tasks2ImportedList[$pageID - 1];
|
||||
$this->view->tasks2Imported = $tasks2ImportedList;
|
||||
$this->view->executions = $executions;
|
||||
$this->view->executionID = $execution->id;
|
||||
$this->view->fromExecution = $fromExecution;
|
||||
|
||||
@@ -39,4 +39,3 @@ $(function()
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='table-footer'>
|
||||
<div class="table-statistic"><?php echo strpos(',all,undone,', ",$status,") !== false ? sprintf($lang->project->allSummary, count($projectStats), $waitCount, $doingCount, $suspendedCount, $closedCount) : sprintf($lang->project->summary, count($projectStats));?></div>
|
||||
<div class="table-statistic"><?php echo $status == 'all' ? sprintf($lang->project->allSummary, count($projectStats), $waitCount, $doingCount, $suspendedCount, $closedCount) : sprintf($lang->project->summary, count($projectStats));?></div>
|
||||
<?php echo $pager->show('left', 'pagerjs');?>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -11,7 +11,7 @@ $(function()
|
||||
var statistics = summary;
|
||||
var checkedStatistics = checkedSummary.replace('%total%', checkedTotal);
|
||||
|
||||
if(browseType == 'all' || browseType == 'unclosed')
|
||||
if(browseType == 'all')
|
||||
{
|
||||
var checkedWait = $checkedRows.filter("[data-status=wait]").length;
|
||||
var checkedDoing = $checkedRows.filter("[data-status=doing]").length;
|
||||
|
||||
@@ -91,7 +91,7 @@ $closedCount = 0;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="table-statistic"><?php echo strpos(',all,unclosed,', ",$browseType,") !== false ? sprintf($lang->project->allSummary, count($projectStats), $waitCount, $doingCount, $suspendedCount, $closedCount) : sprintf($lang->project->summary, count($projectStats));?></div>
|
||||
<div class="table-statistic"><?php echo $browseType == 'all' ? sprintf($lang->project->allSummary, count($projectStats), $waitCount, $doingCount, $suspendedCount, $closedCount) : sprintf($lang->project->summary, count($projectStats));?></div>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -1176,6 +1176,7 @@ class project extends control
|
||||
/* Process the openedBuild and resolvedBuild fields. */
|
||||
$bugs = $this->bug->getProjectBugs($projectID, $productID, $branchID, $build, $type, $param, $sort, '', $pager);
|
||||
$bugs = $this->bug->processBuildForBugs($bugs);
|
||||
$bugs = $this->bug->checkDelayedBugs($bugs);
|
||||
|
||||
/* Get story and task id list. */
|
||||
$storyIdList = $taskIdList = array();
|
||||
|
||||
@@ -146,7 +146,7 @@ $closedCount = 0;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="table-statistic"><?php echo strpos(',all,undone,', ",$browseType,") !== false ? sprintf($lang->project->allSummary, count($projectStats), $waitCount, $doingCount, $suspendedCount, $closedCount) : sprintf($lang->project->summary, count($projectStats));?></div>
|
||||
<div class="table-statistic"><?php echo $browseType == 'all' ? sprintf($lang->project->allSummary, count($projectStats), $waitCount, $doingCount, $suspendedCount, $closedCount) : sprintf($lang->project->summary, count($projectStats));?></div>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
</form>
|
||||
@@ -174,7 +174,7 @@ $(function()
|
||||
var statistics = summary;
|
||||
var checkedStatistics = checkedSummary.replace('%total%', checkedTotal);
|
||||
|
||||
if(browseType == 'all' || browseType == 'undone')
|
||||
if(browseType == 'all')
|
||||
{
|
||||
var checkedWait = $checkedRows.filter("[data-status=wait]").length;
|
||||
var checkedDoing = $checkedRows.filter("[data-status=doing]").length;
|
||||
|
||||
@@ -42,22 +42,20 @@
|
||||
<thead>
|
||||
<tr class='colhead'>
|
||||
<th class='c-id'><?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
<th class='c-pri' title='<?php echo $lang->pri;?>'><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='c-execution'><?php common::printOrderLink('execution', $orderBy, $vars, $lang->task->execution);?></th>
|
||||
<th><?php common::printOrderLink('name', $orderBy, $vars, $lang->task->name);?></th>
|
||||
<th class='c-pri' title='<?php echo $lang->pri;?>'><?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
|
||||
<th class='c-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
|
||||
<th class='c-execution'><?php common::printOrderLink('execution', $orderBy, $vars, $lang->task->execution);?></th>
|
||||
<th class='c-deadline text-center'><?php common::printOrderLink('deadline', $orderBy, $vars, $lang->task->deadlineAB);?></th>
|
||||
<th class='c-hour hours'><?php common::printOrderLink('estimate', $orderBy, $vars, $lang->task->estimateAB);?></th>
|
||||
<th class='c-hour hours'><?php common::printOrderLink('consumed', $orderBy, $vars, $lang->task->consumedAB);?></th>
|
||||
<th class='c-hour hours'><?php common::printOrderLink('left', $orderBy, $vars, $lang->task->leftAB);?></th>
|
||||
<th class='c-deadline text-center'><?php common::printOrderLink('deadline', $orderBy, $vars, $lang->task->deadlineAB);?></th>
|
||||
<th class='c-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($tasks as $task):?>
|
||||
<tr class='text-left'>
|
||||
<td><?php echo html::a($this->createLink('task', 'view', "taskID=$task->id"), sprintf('%03d', $task->id));?></td>
|
||||
<td><span class='label-pri label-pri-<?php echo $task->pri;?>'><?php echo zget($lang->task->priList, $task->pri, $task->pri);?></span></td>
|
||||
<td class='text-left nobr' title="<?php echo $task->executionName?>"><?php echo html::a($this->createLink('execution', 'browse', "executionID=$task->executionID"), $task->executionName);?></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> ';?>
|
||||
@@ -67,11 +65,13 @@
|
||||
?>
|
||||
<?php echo html::a($this->createLink('task', 'view', "taskID=$task->id", '', $onlybody, $task->project), $task->name, null, "class='$class' data-width='80%' style='color: $task->color' title='$task->name'");?>
|
||||
</td>
|
||||
<td><span class='label-pri label-pri-<?php echo $task->pri;?>'><?php echo zget($lang->task->priList, $task->pri, $task->pri);?></span></td>
|
||||
<td class='<?php echo $task->status;?>'><?php echo $this->processStatus('task', $task);?></td>
|
||||
<td class='text-left nobr' title="<?php echo $task->executionName?>"><?php echo html::a($this->createLink('execution', 'browse', "executionID=$task->executionID"), $task->executionName);?></td>
|
||||
<td class="deadline text-center <?php if(isset($task->delay)) echo 'delayed';?>"><?php if(substr($task->deadline, 0, 4) > 0) echo '<span>' . $task->deadline . '</span>';?></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="deadline text-center <?php if(isset($task->delay)) echo 'delayed';?>"><?php if(substr($task->deadline, 0, 4) > 0) echo '<span>' . $task->deadline . '</span>';?></td>
|
||||
<td class='<?php echo $task->status;?>'><?php echo $this->processStatus('task', $task);?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
|
||||
@@ -46,8 +46,14 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$waitCount = 0;
|
||||
$doingCount = 0;
|
||||
?>
|
||||
<?php foreach($todos as $todo):?>
|
||||
<tr class='text-left'>
|
||||
<?php if($todo->status == 'wait') $waitCount ++;?>
|
||||
<?php if($todo->status == 'doing') $doingCount ++;?>
|
||||
<td><?php echo $todo->id;?></td>
|
||||
<td class='text-left'>
|
||||
<?php echo ($todo->private and $this->app->user->account != $todo->account) ? $todo->name : html::a($this->createLink('todo', 'view', "id=$todo->id&from=company", '', true), $todo->name, '', "class='iframe'");?>
|
||||
@@ -64,7 +70,10 @@
|
||||
</table>
|
||||
|
||||
<?php if($todos):?>
|
||||
<div class="table-footer"><?php $pager->show('right', 'pagerjs');?></div>
|
||||
<div class="table-footer">
|
||||
<div class="table-statistic"><?php echo sprintf($lang->todo->summary, count($todos), $waitCount, $doingCount);?></div>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user