* Adjust for story action in browse page in execution tab.

This commit is contained in:
wangyidong
2023-06-26 18:27:10 +08:00
parent 92ec698fea
commit 7e73e32b18
3 changed files with 107 additions and 191 deletions
+4 -13
View File
@@ -356,24 +356,15 @@ foreach($setting as $col)
/* DataTable data. */
$data = array();
$actionMenus = array('submitreview', 'recall', 'recalledchange', 'review', 'dropdown', 'createTask', 'batchCreateTask', 'divider', 'storyEstimate', 'testcase', 'unlink');
$options = array('storyTasks' => $storyTasks, 'storyBugs' => $storyBugs, 'storyCases' => $storyCases, 'modules' => $modules, 'plans' => (isset($plans) ? $plans : array()), 'users' => $users, 'execution' => $execution, 'actionMenus' => $actionMenus);
foreach($stories as $story)
{
$story->taskCount = $storyTasks[$story->id];
$story->actions = $this->story->buildActionButtonList($story, 'browse');
$story->plan = isset($story->planTitle) ? $story->planTitle : $plans[$story->plan];
$data[] = $story;
$data[] = $this->story->formatStoryForList($story, $options);
if(!isset($story->children)) continue;
/* Children. */
foreach($story->children as $key => $child)
{
$child->taskCount = $storyTasks[$child->id];
$child->actions = $this->story->buildActionButtonList($child, 'browse', $execution);
$data[] = $child;
}
foreach($story->children as $key => $child) $data[] = $this->story->formatStoryForList($child, $options);
}
jsVar('cases', $storyCases);