* Use function processStatus to get status of a record.

This commit is contained in:
liugang
2019-07-30 11:09:44 +08:00
parent 5075275b61
commit 2bf5424cb0
10 changed files with 19 additions and 25 deletions
+3 -9
View File
@@ -27,9 +27,7 @@
<td class='text-left'><?php echo html::a($this->createLink('task', 'view', "taskID=$task->id"), $task->name, '_blank');?></td>
<td><?php echo $users[$task->assignedTo];?></td>
<td>
<span class='status-task status-<?php echo $task->status?>'>
<?php echo $lang->task->statusList[$task->status];?>
</span>
<span class='status-task status-<?php echo $task->status?>'><?php echo $this->processStatus('task', $task);?></span>
</td>
<td><?php echo $task->consumed;?></td>
<td><?php echo $task->left;?></td>
@@ -59,9 +57,7 @@
<td><?php echo $bug->id;?></td>
<td class='text-left'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title, '_blank');?></td>
<td>
<span class='status-bug status-<?php echo $bug->status?>'>
<?php echo $lang->bug->statusList[$bug->status];?>
</span>
<span class='status-bug status-<?php echo $bug->status?>'><?php echo $this->processStatus('bug', $bug);?></span>
</td>
<td><?php echo $users[$bug->openedBy];?></td>
<td><?php echo $users[$bug->resolvedBy];?></td>
@@ -89,9 +85,7 @@
<td><?php echo $case->id;?></td>
<td class='text-left'><?php echo html::a($this->createLink('testcase', 'view', "caseID=$case->id"), $case->title, '_blank');?></td>
<td>
<span class='status-case status-<?php echo $case->status?>'>
<?php echo $lang->testcase->statusList[$case->status];?>
</span>
<span class='status-case status-<?php echo $case->status?>'><?php echo $this->processStatus('testcase', $case);?></span>
</td>
<td><?php echo $users[$case->openedBy];?></td>
<td><?php echo $users[$case->lastEditedBy];?></td>
+1 -1
View File
@@ -33,7 +33,7 @@
<tr class='text-center'>
<td><?php echo $storyID . html::hidden("storyIDList[$storyID]", $storyID);?></td>
<td class='text-left'><?php echo $story->title;?></td>
<td class='story-<?php echo $story->status;?>'><?php echo $lang->story->statusList[$story->status];?></td>
<td class='story-<?php echo $story->status;?>'><?php echo $this->processStatus('story', $story);?></td>
<td>
<?php if($story->status == 'draft') unset($this->lang->story->reasonList['cancel']);?>
<table class='w-p100'>
+1 -1
View File
@@ -119,7 +119,7 @@ foreach(explode(',', $showFields) as $field)
<td <?php echo zget($visibleFields, 'pri', "class='hidden'")?>><?php echo html::select("pris[$storyID]", $priList, $story->pri, 'class=form-control');?></td>
<td class='text-left<?php echo zget($visibleFields, 'assignedTo', ' hidden')?>'><?php echo html::select("assignedTo[$storyID]", $users, $story->assignedTo, "class='form-control chosen'");?></td>
<td <?php echo zget($visibleFields, 'source', "class='hidden'")?>><?php echo html::select("sources[$storyID]", $sourceList, $story->source, 'class=form-control');?></td>
<td class='story-<?php echo $story->status;?>'><?php echo $lang->story->statusList[$story->status];?></td>
<td class='story-<?php echo $story->status;?>'><?php echo $this->processStatus('story', $story);?></td>
<td <?php echo zget($visibleFields, 'stage', "class='hidden'")?>><?php echo html::select("stages[$storyID]", $stageList, $story->stage, 'class="form-control"' . ($story->status == 'draft' ? ' disabled="disabled"' : ''));?></td>
<td class='text-left<?php echo zget($visibleFields, 'closedBy', ' hidden')?>'><?php echo html::select("closedBys[$storyID]", $users, $story->closedBy, "class='form-control" . ($story->status == 'closed' ? " chosen'" : "' disabled='disabled'"));?></td>
+8 -8
View File
@@ -10,14 +10,14 @@
<table class='table table-fixed'>
<thead>
<tr class='text-center'>
<th class='w-40px'> <?php echo $lang->idAB;?></th>
<th class='w-p30'> <?php echo $lang->bug->title;?></th>
<th class='w-pri'> <?php echo $lang->priAB;?></th>
<th class='w-type'> <?php echo $lang->bug->type;?></th>
<th class='w-40px'><?php echo $lang->idAB;?></th>
<th class='w-p30'> <?php echo $lang->bug->title;?></th>
<th class='w-pri'> <?php echo $lang->priAB;?></th>
<th class='w-type'><?php echo $lang->bug->type;?></th>
<th class='w-40px'><?php echo $lang->statusAB;?></th>
<th class='w-user'> <?php echo $lang->bug->assignedTo;?></th>
<th class='w-50px'> <?php echo $lang->bug->resolvedBy;?></th>
<th class='w-50px'> <?php echo $lang->bug->resolution;?></th>
<th class='w-user'><?php echo $lang->bug->assignedTo;?></th>
<th class='w-50px'><?php echo $lang->bug->resolvedBy;?></th>
<th class='w-50px'><?php echo $lang->bug->resolution;?></th>
</tr>
</thead>
<tbody>
@@ -27,7 +27,7 @@
<td class='text-left' title="<?php echo $bug->title?>"><?php echo $bug->title;?></td>
<td><span class='<?php echo 'pri' . zget($lang->bug->priList, $bug->pri, $bug->pri)?>'><?php echo $bug->pri == '0' ? '' : zget($lang->bug->priList, $bug->pri, $bug->pri);?></span></td>
<td><?php echo $lang->bug->typeList[$bug->type];?></td>
<td><?php echo $lang->bug->statusList[$bug->status];?></td>
<td><?php echo $this->processStatus('bug',$bug);?></td>
<td><?php echo zget($users, $bug->assignedTo, $bug->assignedTo);?></td>
<td><?php echo zget($users, $bug->resolvedBy, $bug->resolvedBy);?></td>
<td><?php echo $lang->bug->resolutionList[$bug->resolution];?></td>
+1 -1
View File
@@ -27,7 +27,7 @@
<td class='text-left' title="<?php echo $case->title?>"><?php echo $case->title;?></td>
<td><span class='<?php echo 'pri' . zget($lang->testcase->priList, $case->pri, $case->pri)?>'><?php echo $case->pri == '0' ? '' : zget($lang->case->priList, $case->pri, $case->pri);?></span></td>
<td><?php echo $lang->testcase->typeList[$case->type];?></td>
<td><?php echo $lang->testcase->statusList[$case->status];?></td>
<td><?php echo $this->processStatus('testcase', $case);?></td>
<td><?php echo zget($users, $case->lastRunner, $case->lastRunner);?></td>
<td><?php if(!helper::isZeroDate($case->lastRunDate)) echo date(DT_MONTHTIME1, strtotime($case->lastRunDate));?></td>
<td><?php echo $case->lastRunResult ? $lang->testcase->resultList[$case->lastRunResult] : '';?></td>
+1 -1
View File
@@ -123,7 +123,7 @@
</tr>
<tr>
<th><?php echo $lang->story->status;?></th>
<td><span class='story-<?php echo $story->status;?>'><?php echo $lang->story->statusList[$story->status];?></span></td>
<td><span class='story-<?php echo $story->status;?>'><?php echo $this->processStatus('story', $story);?></span></td>
</tr>
<?php if($story->status != 'draft'):?>
<tr>
+1 -1
View File
@@ -61,7 +61,7 @@
<td><?php echo html::a($this->createLink('product', 'browse', "productID=$story2Link->product&branch=$story2Link->branch"), $products[$story2Link->product], '_blank');?></td>
<td class='text-left nobr' title="<?php echo $story2Link->title?>"><?php echo html::a($storyLink, $story2Link->title, '_blank');?></td>
<td><?php echo $story2Link->planTitle;?></td>
<td><?php echo zget($lang->story->statusList, $story2Link->status);?></td>
<td><?php echo $this->processStatus('story', $story2Link);?></td>
<td><?php echo zget($lang->story->stageList, $story2Link->stage);?></td>
<td><?php echo zget($users, $story2Link->openedBy);?></td>
<td><?php echo $story2Link->estimate;?></td>
+1 -1
View File
@@ -30,7 +30,7 @@ include '../../common/view/chart.html.php';
<td><?php echo $task->id;?></td>
<td class='text-left' title="<?php echo $task->name?>"><?php echo $task->name;?></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><?php echo $lang->task->statusList[$task->status];?></td>
<td><?php echo $this->processStatus('task', $task);?></td>
<td><?php echo zget($users, $task->assignedTo, $task->assignedTo);?></td>
<td><?php echo $task->estimate;?></td>
<td><?php echo $task->consumed;?></td>
+1 -1
View File
@@ -195,7 +195,7 @@
</tr>
<tr>
<th><?php echo $lang->story->status;?></th>
<td><span class='status-story status-<?php echo $story->status?>'><span class="label label-dot"></span> <?php echo $lang->story->statusList[$story->status];?></span></td>
<td><span class='status-story status-<?php echo $story->status?>'><span class="label label-dot"></span> <?php echo $this->processStatus('story', $story);?></span></td>
</tr>
<tr>
<th><?php echo $lang->story->stage;?></th>
+1 -1
View File
@@ -63,7 +63,7 @@
<td><?php echo $users[$story->openedBy];?></td>
<td><?php echo $users[$story->assignedTo];?></td>
<td><?php echo $story->estimate;?></td>
<td><span class='status-story status-<?php echo $story->status;?>'><?php echo zget($lang->story->statusList, $story->status);?></span></td>
<td><span class='status-story status-<?php echo $story->status;?>'><?php echo $this->processStatus('story', $story);?></span></td>
<td><?php echo zget($lang->story->stageList, $story->stage);?></td>
<td class='c-actions'>
<?php