* Finish task #64972,64973.
This commit is contained in:
@@ -115,7 +115,7 @@ class action extends control
|
||||
$preferredType = $preferredType + $toPreferredType;
|
||||
}
|
||||
|
||||
/* Get the project name of executions. */
|
||||
/* Get the projects name of executions. */
|
||||
if($browseType == 'execution')
|
||||
{
|
||||
$this->app->loadLang('execution');
|
||||
@@ -124,6 +124,24 @@ class action extends control
|
||||
$this->view->projectList = $this->loadModel('project')->getByIdList($projectIdList, 'all');
|
||||
}
|
||||
|
||||
/* Get the products name of story. */
|
||||
if($browseType == 'story')
|
||||
{
|
||||
$this->app->loadLang('project');
|
||||
$storyIdList = array();
|
||||
foreach($trashes as $trash) $storyIdList[] = $trash->objectID;
|
||||
$this->view->productList = $this->loadModel('story')->getByList($storyIdList, 'story');
|
||||
}
|
||||
|
||||
/* Get the executions name of task. */
|
||||
if($browseType == 'task')
|
||||
{
|
||||
$this->app->loadLang('task');
|
||||
$this->app->loadLang('project');
|
||||
$executionIdList = array();
|
||||
foreach($trashes as $trash) $executionIdList[] = $trash->execution;
|
||||
$this->view->executionList = $this->loadModel('execution')->getByIdList($executionIdList);
|
||||
}
|
||||
/* Title and position. */
|
||||
$this->view->title = $this->lang->action->trash;
|
||||
$this->view->position[] = $this->lang->action->trash;
|
||||
|
||||
@@ -85,6 +85,12 @@
|
||||
<?php if($config->systemMode == 'new' and $currentObjectType == 'execution'):?>
|
||||
<th class='w-250px'><?php echo $this->lang->execution->project;?></th>
|
||||
<?php endif;?>
|
||||
<?php if($currentObjectType == 'story'):?>
|
||||
<th class='w-250px'><?php echo $this->lang->project->product;?></th>
|
||||
<?php endif;?>
|
||||
<?php if($currentObjectType == 'task'):?>
|
||||
<th class='w-250px'><?php echo $this->lang->task->execution;?></th>
|
||||
<?php endif;?>
|
||||
<th class='c-user'><?php common::printOrderLink('actor', $orderBy, $vars, $lang->action->actor);?></th>
|
||||
<th class='c-full-date'><?php common::printOrderLink('date', $orderBy, $vars, $lang->action->date);?></th>
|
||||
<th class='c-actions'><?php echo $lang->actions;?></th>
|
||||
@@ -146,6 +152,22 @@
|
||||
<?php endif;?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<?php if($currentObjectType == 'story'):?>
|
||||
<td class="flex" title="<?php echo $productList[$action->objectID]->productTitle;?>">
|
||||
<span class="text-ellipsis"><?php echo $productList[$action->objectID]->productTitle;?></span>
|
||||
<?php if($productList[$action->objectID]->deleted):?>
|
||||
<span class='label label-danger'><?php echo $this->lang->project->deleted;?></span>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<?php if($currentObjectType == 'task'):?>
|
||||
<td class="flex" title="<?php echo $executionList[$action->execution]->name;?>">
|
||||
<span class="text-ellipsis"><?php echo $executionList[$action->execution]->name;?></span>
|
||||
<?php if($executionList[$action->execution]->deleted):?>
|
||||
<span class='label label-danger'><?php echo $this->lang->project->deleted;?></span>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
<td><?php echo zget($users, $action->actor);?></td>
|
||||
<td><?php echo $action->date;?></td>
|
||||
<td>
|
||||
|
||||
@@ -1308,7 +1308,7 @@ class executionModel extends model
|
||||
*/
|
||||
public function getByIdList($executionIdList = array())
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_EXECUTION)->where('id')->in($executionIdList)->andWhere('deleted')->eq(0)->fetchAll('id');
|
||||
return $this->dao->select('*')->from(TABLE_EXECUTION)->where('id')->in($executionIdList)->fetchAll('id');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -91,11 +91,10 @@ class storyModel extends model
|
||||
*/
|
||||
public function getByList($storyIdList = 0, $type = 'story')
|
||||
{
|
||||
return $this->dao->select('t1.*, t2.spec, t2.verify, t3.name as productTitle')
|
||||
return $this->dao->select('t1.*, t2.spec, t2.verify, t3.name as productTitle, t3.deleted')
|
||||
->from(TABLE_STORY)->alias('t1')
|
||||
->leftJoin(TABLE_STORYSPEC)->alias('t2')->on('t1.id=t2.story')
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product=t3.id')
|
||||
->where('t1.deleted')->eq(0)
|
||||
->andWhere('t1.version=t2.version')
|
||||
->beginIF($storyIdList)->andWhere('t1.id')->in($storyIdList)->fi()
|
||||
->beginIF(!$storyIdList)->andWhere('t1.type')->eq($type)->fi()
|
||||
|
||||
Reference in New Issue
Block a user