* Code for task#81187.

This commit is contained in:
xieqiyu
2022-12-28 13:40:27 +08:00
parent 5cfe9f1418
commit 260e043338
2 changed files with 23 additions and 23 deletions
+11 -18
View File
@@ -5109,13 +5109,22 @@ class storyModel extends model
elseif($id == 'stage')
{
$style .= 'overflow: visible;';
$maxStage = $story->stage;
$maxStagePos = 0;
$stageList = join(',', array_keys($this->lang->story->stageList));
if(isset($storyStages[$story->id]))
{
foreach($storyStages[$story->id] as $storyBranch => $storyStage)
{
if(isset($branches[$storyBranch])) $title .= $branches[$storyBranch] . ": " . $this->lang->story->stageList[$storyStage->stage] . "\n";
if(strpos($stageList, $storyStage->stage) !== false and strpos($stageList, $storyStage->stage) > $maxStagePos)
{
$maxStage = $storyStage->stage;
$maxStagePos = strpos($stageList, $storyStage->stage);
}
}
}
$title .= $this->lang->story->stageList[$maxStage];
}
elseif($id == 'feedbackBy')
{
@@ -5210,23 +5219,7 @@ class storyModel extends model
echo $story->estimate . $this->config->hourUnit;
break;
case 'stage':
if(isset($storyStages[$story->id]) and !empty($branches))
{
echo "<div class='dropdown dropdown-hover'>";
echo $this->lang->story->stageList[$story->stage];
echo "<span class='caret'></span>";
echo "<ul class='dropdown-menu pull-right'>";
foreach($storyStages[$story->id] as $storyBranch => $storyStage)
{
if(isset($branches[$storyBranch])) echo '<li class="text-ellipsis">' . $branches[$storyBranch] . ": " . $this->lang->story->stageList[$storyStage->stage] . '</li>';
}
echo "</ul>";
echo '</div>';
}
else
{
echo $this->lang->story->stageList[$story->stage];
}
echo $this->lang->story->stageList[$maxStage];
break;
case 'taskCount':
$tasksLink = helper::createLink('story', 'tasks', "storyID=$story->id", '', 'class="iframe"');
+12 -5
View File
@@ -302,14 +302,21 @@
<th><?php echo $lang->story->stage;?></th>
<td>
<?php
$maxStage = $story->stage;
$maxStagePos = 0;
$stageList = join(',', array_keys($this->lang->story->stageList));
if($story->stages and $branches)
{
foreach($story->stages as $branch => $stage) if(isset($branches[$branch])) echo $branches[$branch] . ' : ' . $lang->story->stageList[$stage] . '<br />';
}
else
{
echo $lang->story->stageList[$story->stage];
foreach($story->stages as $branch => $stage)
{
if(strpos($stageList, $stage) !== false and strpos($stageList, $stage) > $maxStagePos)
{
$maxStage = $stage;
$maxStagePos = strpos($stageList, $stage);
}
}
}
echo $lang->story->stageList[$maxStage];
?>
</td>
</tr>