* Fix back link problem of execution module.
This commit is contained in:
@@ -497,7 +497,6 @@ class baseHTML
|
||||
}
|
||||
|
||||
$tab = $_COOKIE['openApp'];
|
||||
$misc .= "data-app='{$tab}'";
|
||||
$referer = strtolower($_SERVER['HTTP_REFERER']);
|
||||
$refererParts = parse_url($referer);
|
||||
$refererLink = $config->requestType == 'PATH_INFO' ? $refererParts['path'] : $refererParts['query'];
|
||||
@@ -506,6 +505,8 @@ class baseHTML
|
||||
$gobackList = isset($_COOKIE['goback']) ? json_decode($_COOKIE['goback'], true) : array();
|
||||
$gobackLink = isset($gobackList[$tab]) ? $gobackList[$tab] : '';
|
||||
|
||||
if(strpos($misc, 'data-app') === false) $misc .= ' data-app="' . $tab . '"';
|
||||
|
||||
/* If the link of the referer is not the link of the current page or the link of the index, the cookie and gobackLink will be updated. */
|
||||
if(!preg_match("/(m=|\/)(index|search|$currentModule)(&f=|-)(index|buildquery|$currentMethod)(&|-|\.)?/", $refererLink))
|
||||
{
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
|
||||
if($this->app->openApp != 'product')
|
||||
{
|
||||
common::printIcon('bug', 'toStory', "product=$bug->product&branch=$bug->branch&module=0&story=0&execution=0&bugID=$bug->id", $bug, 'button', $lang->icons['story'], '', '', '', "data-app='" . ($this->app->openApp == 'project' ? 'project' : 'product') . "'", $lang->bug->toStory);
|
||||
common::printIcon('bug', 'toStory', "product=$bug->product&branch=$bug->branch&module=0&story=0&execution=0&bugID=$bug->id", $bug, 'button', $lang->icons['story'], '', '', '', "data-app='" . $this->app->openApp . "'", $lang->bug->toStory);
|
||||
common::printIcon('bug', 'createCase', $convertParams, $bug, 'button', 'sitemap');
|
||||
}
|
||||
|
||||
|
||||
@@ -69,6 +69,8 @@ class projectStory extends control
|
||||
*/
|
||||
public function view($storyID)
|
||||
{
|
||||
$this->session->set('productList', $this->app->getURI(true), 'product');
|
||||
|
||||
$story = $this->loadModel('story')->getByID($storyID);
|
||||
echo $this->fetch('story', 'view', "storyID=$storyID&version=$story->version¶m=" . $this->session->project);
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
<?php
|
||||
echo html::hidden('lastEditedDate', $story->lastEditedDate);
|
||||
echo html::submitButton();
|
||||
if(!isonlybody()) echo html::a($app->session->storyList ? $app->session->storyList : inlink('view', "storyID=$story->id"), $lang->goback, '', 'class="btn btn-wide"');
|
||||
if(!isonlybody()) echo html::backButton();
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -666,6 +666,8 @@ class task extends control
|
||||
*/
|
||||
public function view($taskID)
|
||||
{
|
||||
$this->session->set('executionList', $this->app->getURI(true), 'execution');
|
||||
|
||||
$taskID = (int)$taskID;
|
||||
$task = $this->task->getById($taskID, true);
|
||||
if(!$task) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php echo html::a($this->createLink('execution', 'task', "executionID=$executionID&browseType=$browseType"), $lang->goback, '', "class='btn'");?>
|
||||
<?php echo html::backButton($lang->goback, '', 'btn');?>
|
||||
<div class='divider'></div>
|
||||
<div class='page-title'>
|
||||
<span class='text'><?php echo $lang->task->report->common;?></span>
|
||||
|
||||
Reference in New Issue
Block a user