* fix bug 20029

This commit is contained in:
Zongjun Lan
2022-03-02 15:04:12 +08:00
parent f4970f502d
commit 5979f32712
5 changed files with 18 additions and 4 deletions
@@ -112,7 +112,7 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
$tab = $isProjectStory ? 'project' : 'product';
$class = common::hasPriv('story', 'export') ? '' : "class=disabled";
$misc = common::hasPriv('story', 'export') ? "data-toggle='modal' data-type='iframe' class='export' data-app='$tab'" : "class=disabled";
$link = common::hasPriv('story', 'export') ? $this->createLink('story', 'export', "productID=$productID&orderBy=$orderBy&projectID=0&browseType=$browseType&type=$storyType") : '#';
$link = common::hasPriv('story', 'export') ? $this->createLink('story', 'export', "productID=$productID&orderBy=$orderBy&executionID=$projectID&browseType=$browseType&type=$storyType") : '#';
echo "<li $class>" . html::a($link, $lang->story->export, '', $misc) . "</li>";
?>
</ul>
@@ -191,7 +191,7 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
<?php endif;?>
<?php echo $moduleTree;?>
<div class="text-center">
<?php if($productID) common::printLink('tree', 'browse', "rootID=$productID&view=story&currentModuleID=0&branch=$branchID", $lang->tree->manageMenu, '', "class='btn btn-info btn-wide'");?>
<?php if($productID) common::printLink('tree', 'browse', "rootID=$productID&view=story&currentModuleID=0&branch=$branchID&from=&projectID=$projectID", $lang->tree->manageMenu, '', "class='btn btn-info btn-wide'");?>
<hr class="space-sm" />
</div>
</div>
@@ -0,0 +1,11 @@
<?php
helper::importControl('tree');
class myTree extends tree
{
public function browse($rootID, $view, $currentModuleID = 0, $branch = 0, $from = '', $projectID = 0)
{
$this->view->projectID = $projectID;
$this->view->projectName = $this->dao->findById($projectID)->from(TABLE_PROJECT)->fetch('name');
return parent::browse($rootID, $view, $currentModuleID, $branch, $from);
}
}
@@ -0,0 +1,3 @@
<script>
$("#childrenForm a:first").text('<?php echo $projectName; ?>');
</script>
+1 -1
View File
@@ -138,7 +138,7 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
$tab = $isProjectStory ? 'project' : 'product';
$class = common::hasPriv('story', 'export') ? '' : "class=disabled";
$misc = common::hasPriv('story', 'export') ? "data-toggle='modal' data-type='iframe' class='export' data-app='$tab'" : "class=disabled";
$link = common::hasPriv('story', 'export') ? $this->createLink('story', 'export', "productID=$productID&orderBy=$orderBy&projectID=0&browseType=$browseType&type=$storyType") : '#';
$link = common::hasPriv('story', 'export') ? $this->createLink('story', 'export', "productID=$productID&orderBy=$orderBy&projectID=0&executionID=0&browseType=$browseType&type=$storyType") : '#';
echo "<li $class>" . html::a($link, $lang->story->export, '', $misc) . "</li>";
?>
</ul>
+1 -1
View File
@@ -221,7 +221,7 @@ $(function()
},
itemCreator: function($li, item)
{
var link = (item.id !== undefined && item.type != 'line') ? ('<a href="' + createLink('tree', 'browse', 'rootID=<?php echo $rootID ?>&viewType=<?php echo $viewType ?>&moduleID={0}&branch={1}&from=<?php echo $from;?>'.format(item.id, branch)) + '" data-app="' + tab + '">' + item.name + '</a>') : ('<span class="tree-toggle">' + item.name + '</span>');
var link = (item.id !== undefined && item.type != 'line') ? ('<a href="' + createLink('tree', 'browse', 'rootID=<?php echo $rootID ?>&viewType=<?php echo $viewType ?>&moduleID={0}&branch={1}&from=<?php echo $from;?>&projectID=<?php echo $projectID; ?>'.format(item.id, branch)) + '" data-app="' + tab + '">' + item.name + '</a>') : ('<span class="tree-toggle">' + item.name + '</span>');
var $toggle = $('<span class="module-name" data-id="' + item.id + '">' + link + '</span>');
if(item.type === 'bug') $toggle.append('&nbsp; <span class="text-muted">[B]</span>');
if(item.type === 'case') $toggle.append('&nbsp; <span class="text-muted">[C]</span>');