* Adjust code.
This commit is contained in:
@@ -845,7 +845,7 @@ class block extends control
|
||||
$this->app->loadLang('task');
|
||||
$this->app->loadLang('story');
|
||||
|
||||
/* Set program status and count. */
|
||||
/* Set project status and count. */
|
||||
$status = isset($this->params->type) ? $this->params->type : 'all';
|
||||
$count = isset($this->params->count) ? (int)$this->params->count : 15;
|
||||
|
||||
@@ -873,8 +873,10 @@ class block extends control
|
||||
{
|
||||
if($project->model == 'scrum')
|
||||
{
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = pager::init(0, 3, 1);
|
||||
$project->progress = $project->allStories == 0 ? 0 : round($project->doneStories / $project->allStories, 3) * 100;
|
||||
$project->executions = $this->project->getStats($projectID, 'all', 0, 0, 30, 'id_asc');
|
||||
$project->executions = $this->project->getStats($projectID, 'all', 0, 0, 30, 'id_asc', $pager);
|
||||
}
|
||||
elseif($project->model == 'waterfall' and isset($this->config->maxVersion))
|
||||
{
|
||||
|
||||
@@ -108,7 +108,7 @@ $(function()
|
||||
<?php foreach($projects as $project):?>
|
||||
<li <?php if($project->id == $selected) echo "class='active' id='activeProject'";?> projectID='<?php echo $project->id;?>'>
|
||||
<a href="###" data-target="#tab3Content<?php echo $project->id;?>" data-toggle="tab"><?php echo $project->name;?></a>
|
||||
<?php echo html::a(helper::createLink('program', 'index', "projectID=$project->id"), "<i class='icon-arrow-right text-primary'></i>", '', "class='btn-view' title={$lang->project->index}");?>
|
||||
<?php echo html::a(helper::createLink('project', 'index', "projectID=$project->id"), "<i class='icon-arrow-right text-primary'></i>", '', "class='btn-view' title={$lang->project->index}");?>
|
||||
</li>
|
||||
<?php endforeach;?>
|
||||
<li class='switch-icon next'><a><i class='icon icon-arrow-right'></i></a></li>
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($doingProjects as $execution):?>
|
||||
<?php foreach($doingExecutions as $execution):?>
|
||||
<tr data-url="<?php echo $this->createLink('doc', 'objectLibs', "type=execution&objectID={$execution->id}")?>">
|
||||
<td class="c-name"><i class="icon icon-folder text-yellow"></i> <?php echo $execution->name;?></td>
|
||||
<td class="c-datetime"><?php echo formatTime($execution->begin);?></td>
|
||||
|
||||
@@ -1337,13 +1337,14 @@ class projectModel extends model
|
||||
->orderBy('date desc')
|
||||
->fetchGroup('execution', 'name');
|
||||
|
||||
$this->loadModel('execution');
|
||||
foreach($burns as $executionID => $executionBurns)
|
||||
{
|
||||
/* If executionBurns > $itemCounts, split it, else call processBurnData() to pad burns. */
|
||||
$begin = $executions[$executionID]->begin;
|
||||
$end = $executions[$executionID]->end;
|
||||
if(helper::isZeroDate($begin)) $begin = $executions[$executionID]->openedDate;
|
||||
$executionBurns = $this->loadModel('execution')->processBurnData($executionBurns, $itemCounts, $begin, $end);
|
||||
$executionBurns = $this->execution->processBurnData($executionBurns, $itemCounts, $begin, $end);
|
||||
|
||||
/* Shorter names. */
|
||||
foreach($executionBurns as $executionBurn)
|
||||
@@ -1384,8 +1385,8 @@ class projectModel extends model
|
||||
}
|
||||
|
||||
/* In the case of the waterfall model, calculate the sub-stage. */
|
||||
$execution = $this->loadModel('execution')->getById($this->session->project);
|
||||
if($execution and $execution->model == 'waterfall')
|
||||
$project = $this->getByID($this->session->project);
|
||||
if($project and $project->model == 'waterfall')
|
||||
{
|
||||
foreach($parents as $id => $execution)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user