diff --git a/framework/base/router.class.php b/framework/base/router.class.php
index b8281b8c0f..87ec537a7f 100644
--- a/framework/base/router.class.php
+++ b/framework/base/router.class.php
@@ -2492,7 +2492,7 @@ class super
* @access public
* @return void
*/
- public function set($key, $value)
+ public function set($key, $value, $openApp = '')
{
if($this->scope == 'post')
{
@@ -2512,9 +2512,8 @@ class super
}
elseif($this->scope == 'session')
{
- $openApp = $this->openApp;
- empty($openApp) ? $_SESSION[$key] = $value : $_SESSION['app-' . $openApp][$key] = $value;
- $_SESSION[$key] = $value;
+ $openApp = $openApp ? $openApp : $this->openApp;
+ $openApp ? $_SESSION["app-$openApp"][$key] = $value : $_SESSION[$key] = $value;
}
elseif($this->scope == 'env')
{
@@ -2562,9 +2561,8 @@ class super
elseif($this->scope == 'session')
{
$openApp = $this->openApp;
- if(!empty($openApp) and isset($_SESSION['app-' . $openApp][$key])) return $_SESSION['app-' . $openApp][$key];
+ if($openApp and isset($_SESSION["app-$openApp"][$key])) return $_SESSION["app-$openApp"][$key];
if(isset($_SESSION[$key])) return $_SESSION[$key];
-
return false;
}
elseif($this->scope == 'env')
diff --git a/module/action/lang/en.php b/module/action/lang/en.php
index b01cc025d3..3806faf4f3 100755
--- a/module/action/lang/en.php
+++ b/module/action/lang/en.php
@@ -432,7 +432,7 @@ $lang->action->label->product = $lang->productCommon . '|product|view|produc
$lang->action->label->productplan = 'Plan|productplan|view|productID=%s';
$lang->action->label->release = 'Release|release|view|productID=%s';
$lang->action->label->story = 'Story|story|view|storyID=%s';
-$lang->action->label->program = "Program|program|pgmproduct|programID=%s";
+$lang->action->label->program = "Program|program|product|programID=%s";
$lang->action->label->project = "Project|project|index|projectID=%s";
if($config->systemMode == 'new')
{
diff --git a/module/action/lang/zh-cn.php b/module/action/lang/zh-cn.php
index 9966450460..79b3a7443b 100755
--- a/module/action/lang/zh-cn.php
+++ b/module/action/lang/zh-cn.php
@@ -432,7 +432,7 @@ $lang->action->label->product = $lang->productCommon . '|product|view|produc
$lang->action->label->productplan = "计划|productplan|view|productID=%s";
$lang->action->label->release = '发布|release|view|productID=%s';
$lang->action->label->story = "{$lang->SRCommon}|story|view|storyID=%s";
-$lang->action->label->program = "项目集|program|pgmproduct|programID=%s";
+$lang->action->label->program = "项目集|program|product|programID=%s";
$lang->action->label->project = "项目|project|index|projectID=%s";
if($config->systemMode == 'new')
{
diff --git a/module/build/control.php b/module/build/control.php
index 1da5979ced..fc9361acd6 100644
--- a/module/build/control.php
+++ b/module/build/control.php
@@ -44,7 +44,7 @@ class build extends control
$this->executeHooks($buildID);
- if(isonlybody()) $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => "parent.loadProjectBuilds($executionID)")); // Code for task #5126.
+ if(isonlybody()) $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => "parent.loadExecutionBuilds($executionID)")); // Code for task #5126.
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('build', 'view', "buildID=$buildID")));
}
@@ -362,7 +362,7 @@ class build extends control
{
$html = html::a($this->createLink('build', 'create', "executionID=$executionID&productID=$productID", '', $onlybody = true), $this->lang->build->create, '', "data-toggle='modal' data-type='iframe'");
$html .= ' ';
- $html .= html::a("javascript:loadProjectBuilds($executionID)", $this->lang->refresh);
+ $html .= html::a("javascript:loadExecutionBuilds($executionID)", $this->lang->refresh);
die($html);
}
die(html::select('build', $builds, $build, "class='form-control'"));
diff --git a/module/common/lang/en.php b/module/common/lang/en.php
index 0460c360d8..cce0be9d3b 100644
--- a/module/common/lang/en.php
+++ b/module/common/lang/en.php
@@ -348,7 +348,7 @@ $lang->execution->menu->qa = array('link' => 'Bug|execution|qa|executionID
$lang->execution->menu->repo = array('link' => 'Repo|repo|browse|projectID=%s');
$lang->execution->menu->doc = array('link' => 'Doc|doc|objectLibs|type=execution&objectID=%s&from=execution', 'subModule' => 'doc');
$lang->execution->menu->build = array('link' => 'Build|execution|build|executionID=%s', 'subModule' => 'build');
-$lang->execution->menu->release = array('link' => 'Release|projectrelease|browse|project=%s');
+$lang->execution->menu->release = array('link' => 'Release|projectrelease|browse|projectID=0&executionID=%s', 'subModule' => 'projectrelease');
$lang->execution->menu->action = array('link' => 'Dynamics|execution|dynamic|executionID=%s');
$lang->execution->menu->setting = array('link' => 'Settings|execution|view|executionID=%s', 'subModule' => 'personnel', 'alias' => 'edit,manageproducts,team,whitelist,addwhitelist,managemembers', 'class' => 'dropdown dropdown-hover');
@@ -529,7 +529,7 @@ $lang->admin->menu->custom = array('link' => 'Custom|custom|index', 'subModul
$lang->admin->menu->extension = array('link' => 'Extension|extension|browse', 'subModule' => 'extension');
$lang->admin->menu->dev = array('link' => 'Develop|dev|api', 'alias' => 'db', 'subModule' => 'dev,editor,entry');
$lang->admin->menu->message = array('link' => 'Message|message|index', 'subModule' => 'message,mail,webhook');
-$lang->admin->menu->system = array('link' => 'System|backup|index', 'subModule' => 'cron,backup,action');
+$lang->admin->menu->system = array('link' => 'System|backup|index', 'subModule' => 'cron,backup,action,search');
$lang->subject = new stdclass();
$lang->subject->menu = new stdclass();
@@ -930,6 +930,6 @@ $lang->projectstory->menu = new stdclass();
$lang->stakeholder->menu = $lang->scrum->setMenu;
$lang->nc->menu = $lang->auditplan->menu;
-$lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'execution', 'task', 'build', 'productplan', 'project', 'projectrelease', 'projectstory', 'story', 'branch', 'release', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'custom', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'pssp', 'sms', 'message', 'webhook', 'search', 'score', 'stage');
+$lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'execution', 'task', 'build', 'productplan', 'project', 'projectrelease', 'projectstory', 'story', 'branch', 'release', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'custom', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'pssp', 'sms', 'message', 'webhook', 'search', 'score', 'stage', 'entry', 'jenkins');
include (dirname(__FILE__) . '/menuOrder.php');
diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php
index 37c436e227..a1784650c1 100644
--- a/module/common/lang/zh-cn.php
+++ b/module/common/lang/zh-cn.php
@@ -348,7 +348,7 @@ $lang->execution->menu->qa = array('link' => '测试|execution|qa|executio
$lang->execution->menu->repo = array('link' => '代码|repo|browse|projectID=%s');
$lang->execution->menu->doc = array('link' => '文档|doc|objectLibs|type=execution&objectID=%s', 'subModule' => 'doc');
$lang->execution->menu->build = array('link' => '版本|execution|build|executionID=%s', 'subModule' => 'build');
-$lang->execution->menu->release = array('link' => '发布|projectrelease|browse|project=%s');
+$lang->execution->menu->release = array('link' => '发布|projectrelease|browse|projectID=0&executionID=%s', 'subModule' => 'projectrelease');
$lang->execution->menu->action = array('link' => '动态|execution|dynamic|executionID=%s');
$lang->execution->menu->setting = array('link' => '设置|execution|view|executionID=%s', 'subModule' => 'personnel', 'alias' => 'edit,manageproducts,team,whitelist,addwhitelist,managemembers', 'class' => 'dropdown dropdown-hover');
@@ -535,7 +535,7 @@ $lang->admin->menu->custom = array('link' => '自定义|custom|index', 'subMo
$lang->admin->menu->extension = array('link' => '插件|extension|browse', 'subModule' => 'extension');
$lang->admin->menu->dev = array('link' => '二次开发|dev|api', 'alias' => 'db', 'subModule' => 'dev,editor,entry');
$lang->admin->menu->message = array('link' => '通知|message|index', 'subModule' => 'message,mail,webhook');
-$lang->admin->menu->system = array('link' => '系统|backup|index', 'subModule' => 'cron,backup,action');
+$lang->admin->menu->system = array('link' => '系统|backup|index', 'subModule' => 'cron,backup,action,search');
$lang->subject = new stdclass();
$lang->subject->menu = new stdclass();
@@ -950,6 +950,6 @@ $lang->projectstory->menu = new stdclass();
$lang->stakeholder->menu = $lang->scrum->setMenu;
$lang->nc->menu = $lang->auditplan->menu;
-$lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'execution', 'task', 'build', 'productplan', 'project', 'projectrelease', 'projectstory', 'story', 'branch', 'release', 'qa', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'custom', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'pssp', 'sms', 'message', 'webhook', 'search', 'score', 'stage', 'entry');
+$lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'execution', 'task', 'build', 'productplan', 'project', 'projectrelease', 'projectstory', 'story', 'branch', 'release', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'custom', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'pssp', 'sms', 'message', 'webhook', 'search', 'score', 'stage', 'entry', 'jenkins');
include (dirname(__FILE__) . '/menuOrder.php');
diff --git a/module/execution/control.php b/module/execution/control.php
index aa6d2836ef..48c60058e9 100644
--- a/module/execution/control.php
+++ b/module/execution/control.php
@@ -1169,20 +1169,20 @@ class execution extends control
* Create a execution.
*
* @param string $projectID
- * @param string $productID
* @param string $executionID
* @param string $copyExecutionID
* @param int $planID
* @param string $confirm
+ * @param string $productID
*
* @access public
* @return void
*/
- public function create($productID = '', $executionID = '', $copyExecutionID = '', $planID = 0, $confirm = 'no', $projectID = 0)
+ public function create($projectID = '', $executionID = '', $copyExecutionID = '', $planID = 0, $confirm = 'no', $productID = 0)
{
if($this->app->openApp == 'project')
{
- commonModel::setAppobjectID('project', $projectID);
+ commonModel::setAppObjectID('project', $projectID);
}
$this->app->loadLang('program');
@@ -1264,6 +1264,7 @@ class execution extends control
if(!empty($planID)) break;
}
}
+
if(!empty($planID))
{
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('create', "productID=&executionID=$executionID©ExecutionID=&planID=$planID&confirm=no")));
diff --git a/module/execution/js/managemembers.js b/module/execution/js/managemembers.js
index db7fa3260f..20888acb49 100644
--- a/module/execution/js/managemembers.js
+++ b/module/execution/js/managemembers.js
@@ -39,14 +39,14 @@ function deleteItem(obj)
function setDeptUsers(obj)
{
- dept = $(obj).val();//Get dept ID.
- link = createLink('project', 'manageMembers', 'projectID=' + projectID + '&team2Import=' + team2Import + '&dept=' + dept);//Create manageMembers link.
+ dept = $(obj).val(); // Get dept ID.
+ link = createLink('execution', 'manageMembers', 'executionID=' + executionID + '&team2Import=' + team2Import + '&dept=' + dept); // Create manageMembers link.
location.href=link;
}
function choseTeam2Copy(obj)
{
team = $(obj).val();
- link = createLink('project', 'manageMembers', 'projectID=' + projectID + '&team2Import=' + team);
+ link = createLink('execution', 'manageMembers', 'executionID=' + executionID + '&team2Import=' + team);
location.href=link;
}
diff --git a/module/execution/view/all.html.php b/module/execution/view/all.html.php
index 4d5cb6d785..dd7b9cb8d7 100644
--- a/module/execution/view/all.html.php
+++ b/module/execution/view/all.html.php
@@ -36,12 +36,12 @@
execution->featureBar['all'] as $key => $label):?>
- {$label}", '', "class='btn btn-link' id='{$key}Tab'");?>
+ {$label}", '', "class='btn btn-link' id='{$key}Tab' data-app='$from'");?>
" . $lang->export, '', "class='btn btn-link export'")?>
- createLink('execution', 'create'), " " . ($from == 'execution' ? $lang->execution->createExec : $lang->execution->create), '', "class='btn btn-primary'");?>
+ createLink('execution', 'create', "projectID=$projectID"), " " . ($from == 'execution' ? $lang->execution->createExec : $lang->execution->create), '', "class='btn btn-primary' data-app='$from'");?>
diff --git a/module/my/control.php b/module/my/control.php
index f731e53bb5..82f811e1c7 100644
--- a/module/my/control.php
+++ b/module/my/control.php
@@ -273,8 +273,7 @@ class my extends control
/* Save session. */
if($this->app->viewType != 'json')
{
- $this->session->set('taskList', $this->app->getURI(true));
- $this->session->set('storyList', $this->app->getURI(true));
+ $this->session->set('taskList', $this->app->getURI(true), 'execution');
}
/* Load pager. */
diff --git a/module/my/view/bug.html.php b/module/my/view/bug.html.php
index 02c932bc4a..f8fff37170 100644
--- a/module/my/view/bug.html.php
+++ b/module/my/view/bug.html.php
@@ -103,8 +103,8 @@
pri?>' title='bug->priList, $bug->pri);?>'>bug->priList, $bug->pri)?> |
-
createLink('bug', 'view', "bugID=$bug->id", '', '', $bug->project), $bug->title, null, "style='color: $bug->color' title={$bug->title} data-group='project'");?> |
-
createLink('product', 'view', "productID=$bug->product", '', '', $bug->project), $bug->productName, null, "title={$bug->productName} data-group='product'");?> |
+
createLink('bug', 'view', "bugID=$bug->id"), $bug->title, null, "style='color: $bug->color' title={$bug->title}");?> |
+
createLink('product', explode('-', $config->productLink)[1], "productID=$bug->product"), $bug->productName, null, "title={$bug->productName}");?> |
bug->typeList, $bug->type, '');?> |
openedBy);?> |
diff --git a/module/my/view/testcase.html.php b/module/my/view/testcase.html.php
index d377925219..a906282949 100644
--- a/module/my/view/testcase.html.php
+++ b/module/my/view/testcase.html.php
@@ -85,7 +85,7 @@
pri?>' title='testcase->priList, $case->pri, $case->pri);?>'>testcase->priList, $case->pri, $case->pri)?> |
version";?>
task";?>
-
createLink('testcase', 'view', $params, '', '', $case->project), $case->title, null, "style='color: $case->color' data-group='project'");?> |
+
createLink('testcase', 'view', $params), $case->title, null, "style='color: $case->color'");?> |
taskName;?> |
@@ -99,8 +99,8 @@
product&branch=$case->branch&extra=caseID=$caseID,version=$case->version,runID=$runID", $case, 'list', 'bug', '', '', '', '', '', $case->project);
- common::printIcon('testcase', 'create', "productID=$case->product&branch=$case->branch&moduleID=$case->module&from=testcase¶m=$caseID", $case, 'list', 'copy', '', '', '', '', '', $case->project);
+ common::printIcon('testcase', 'createBug', "product=$case->product&branch=$case->branch&extra=caseID=$caseID,version=$case->version,runID=$runID", $case, 'list', 'bug');
+ common::printIcon('testcase', 'create', "productID=$case->product&branch=$case->branch&moduleID=$case->module&from=testcase¶m=$caseID", $case, 'list', 'copy');
common::printIcon('testtask', 'runCase', "runID=$runID&caseID=$caseID&version=$case->version", '', 'list', 'play', '', 'iframe', true, "data-width='95%'", '', $case->project);
common::printIcon('testtask', 'results', "runID=$runID&caseID=$caseID", '', 'list', 'list-alt', '', 'iframe', true, "data-width='95%'", '', $case->project);
common::printIcon('testcase', 'edit', "caseID=$caseID", $case, 'list', 'edit', '', '', '', '', '', $case->project);
diff --git a/module/my/view/testtask.html.php b/module/my/view/testtask.html.php
index 0c2a4cf2f9..5f2053f694 100644
--- a/module/my/view/testtask.html.php
+++ b/module/my/view/testtask.html.php
@@ -47,22 +47,22 @@
| id);?> |
- createLink('testtask', 'view', "taskID=$task->id", '', '', $task->project), $task->name, '', "data-group='project'");?> |
+ createLink('testtask', 'view', "taskID=$task->id"), $task->name);?> |
executionName?> |
- build == 'trunk' ? print($lang->trunk) : print(html::a($this->createLink('build', 'view', "buildID=$task->build", '', '', $task->project), $task->buildName, '', "data-group='project'"));?> |
+ build == 'trunk' ? print($lang->trunk) : print(html::a($this->createLink('build', 'view', "buildID=$task->build"), $task->buildName));?> |
begin?> |
end?> |
processStatus('testtask', $task);?> |
id", $task, 'list', 'sitemap', '', '', '', '', '', $task->project);
- common::printIcon('testtask', 'view', "taskID=$task->id", '', 'list', 'list-alt','','iframe',true, 'data-width=800px', '', $task->project);
- common::printIcon('testtask', 'linkCase', "taskID=$task->id", $task, 'list', 'link', '', '', '', '', '', $task->project);
- common::printIcon('testreport', 'browse', "objectID=$task->product&objectType=product&extra=$task->id", $task, 'list','flag', '', '', '', '', '', $task->project);
- common::printIcon('testtask', 'edit', "taskID=$task->id", $task, 'list','','','',true, '', '', $task->project);
+ common::printIcon('testtask', 'cases', "taskID=$task->id", $task, 'list', 'sitemap');
+ common::printIcon('testtask', 'view', "taskID=$task->id", '', 'list', 'list-alt','','iframe',true, 'data-width=800px');
+ common::printIcon('testtask', 'linkCase', "taskID=$task->id", $task, 'list', 'link');
+ common::printIcon('testreport', 'browse', "objectID=$task->product&objectType=product&extra=$task->id", $task, 'list', 'flag');
+ common::printIcon('testtask', 'edit', "taskID=$task->id", $task, 'list', '', '', '', true);
if(common::hasPriv('testtask', 'delete', $task))
{
- $deleteURL = $this->createLink('testtask', 'delete', "taskID=$task->id&confirm=yes", '', '', $task->project);
+ $deleteURL = $this->createLink('testtask', 'delete', "taskID=$task->id&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$deleteURL\", \"taskList\", confirmDelete)", '', '', "title='{$lang->testtask->delete}' class='btn'");
}
?>
diff --git a/module/product/control.php b/module/product/control.php
index c998dffb50..b9787e2bd2 100644
--- a/module/product/control.php
+++ b/module/product/control.php
@@ -861,7 +861,7 @@ class product extends control
{
$executionsName = "executions[$number]";
$executions = empty($executions) ? array('' => '') : $executions;
- die(html::select($executionsName, $executions, '', "class='form-control' onchange='loadProjectBuilds($productID, this.value, $number)'"));
+ die(html::select($executionsName, $executions, '', "class='form-control' onchange='loadExecutionBuilds($executionID, this.value, $number)'"));
}
}
diff --git a/module/productplan/js/browse.js b/module/productplan/js/browse.js
index d0727126a0..0fb1b5834f 100644
--- a/module/productplan/js/browse.js
+++ b/module/productplan/js/browse.js
@@ -22,9 +22,9 @@ $(function()
$('#createExecutionButton').on('click', function()
{
- var PRJID = $('#project').val();
+ var projectID = $('#project').val();
var planID = $('#planID').val();
- parent.location.href = createLink('execution', 'create', 'productID=' + productID + '&executionID=©ExecutionID=&planID=' + planID + '&confirm=&projectID=' + PRJID, '', '');
+ parent.location.href = createLink('execution', 'create', 'projectID=' + projectID + '&executionID=©ExecutionID=&planID=' + planID + '&confirm=&productID=' + productID);
});
});
$(document).on('click', 'td.content .more', function(e)
diff --git a/module/program/control.php b/module/program/control.php
index 0b0f13ca70..3a6f839ea2 100644
--- a/module/program/control.php
+++ b/module/program/control.php
@@ -386,7 +386,7 @@ class program extends control
* @access public
* @return void
*/
- public function project($programID = 0, $browseType = 'doing', $orderBy = 'order_desc', $recTotal = 0, $recPerPage = 15, $pageID = 1)
+ public function project($programID = 0, $browseType = 'all', $orderBy = 'order_desc', $recTotal = 0, $recPerPage = 15, $pageID = 1)
{
$programID = $this->program->saveState($programID, $this->program->getPairs());
if(!$programID) $this->locate($this->createLink('program', 'browse'));
diff --git a/module/program/lang/en.php b/module/program/lang/en.php
index ddc3574630..522435301a 100644
--- a/module/program/lang/en.php
+++ b/module/program/lang/en.php
@@ -51,6 +51,7 @@ $lang->program->endGreaterParent = "Parent end date: %s, end date should
$lang->program->beginGreateChild = "Child earliest begin: %s, parent begin date < = child earliest begin date.";
$lang->program->endLetterChild = "Child latest end: %s, parent end date > = child latest end date.";
$lang->program->closeErrorMessage = 'There are subprograms or projects that are not closed';
+$lang->program->confirmDelete = "Do you want to delete it?";
$lang->program->stakeholderTypeList['inside'] = 'Inside';
$lang->program->stakeholderTypeList['outside'] = 'Outside';
diff --git a/module/program/lang/zh-cn.php b/module/program/lang/zh-cn.php
index b43f11ae82..9134ece2a2 100644
--- a/module/program/lang/zh-cn.php
+++ b/module/program/lang/zh-cn.php
@@ -51,6 +51,7 @@ $lang->program->endGreaterParent = "父项目集的完成日期:%s,
$lang->program->beginGreateChild = "子项目集的最小开始日期:%s,父项目集的开始日期不能大于子项目集的最小开始日期";
$lang->program->endLetterChild = "子项目的最大完成日期:%s,父项目的完成日期不能小于子项目的最大完成日期";
$lang->program->closeErrorMessage = '存在子项目集或项目为未关闭状态';
+$lang->program->confirmDelete = "您确定要删除吗?";
$lang->program->stakeholderTypeList['inside'] = '内部';
$lang->program->stakeholderTypeList['outside'] = '外部';
diff --git a/module/program/model.php b/module/program/model.php
index 978f35996d..4f78281241 100644
--- a/module/program/model.php
+++ b/module/program/model.php
@@ -96,8 +96,9 @@ class programModel extends model
->where('type')->in('program,project')
->andWhere('deleted')->eq(0)
->beginIF(!$this->app->user->admin)
- ->andWhere('id')->in($this->app->user->view->programs)
+ ->andWhere('(id')->in($this->app->user->view->programs)
->orWhere('id')->in($this->app->user->view->projects)
+ ->markRight(1)
->fi()
->beginIF($status != 'all')->andWhere('status')->eq($status)->fi()
->beginIF(!$this->cookie->showClosed)->andWhere('status')->ne('closed')->fi()
diff --git a/module/program/view/product.html.php b/module/program/view/product.html.php
index 7af83b8d25..387dd97ea9 100644
--- a/module/program/view/product.html.php
+++ b/module/program/view/product.html.php
@@ -1,6 +1,6 @@
config->maxVersion)):?>
' . $lang->project->create, '', 'class="btn btn-info btn-wide " data-toggle="modal" data-target="#guideDialog"');?>
config->systemMode == 'new'):?>
- ' . $lang->project->create, '', 'class="btn btn-info btn-wide"');?>
+ ' . $lang->project->create, '', 'class="btn btn-info btn-wide"');?>
@@ -56,13 +56,13 @@ js::set('browseType', $browseType);
$setting = $this->datatable->getSetting('program');
?>
-
+
id == 'PRJStatus' and $browseType !== 'all') $value->show = false;
+ if($value->id == 'projectStatus' and $browseType !== 'all') $value->show = false;
if($value->show) $this->datatable->printHead($value, $orderBy, $vars, $canBatchEdit);
}
?>
@@ -85,7 +85,7 @@ js::set('browseType', $browseType);
createLink('program', 'PRJBatchEdit', "from=pgmproject&programID=$programID");
+ $actionLink = $this->createLink('project', 'batchEdit', "from=pgmproject&programID=$programID");
$misc = "data-form-action='$actionLink'";
echo html::commonButton($lang->edit, $misc);
}
diff --git a/module/project/control.php b/module/project/control.php
index 9ba5a3b832..c44c2dab1c 100644
--- a/module/project/control.php
+++ b/module/project/control.php
@@ -1369,25 +1369,21 @@ class project extends control
* Adjust the navigation.
*
* @param string $from
- * @param int $projectID
+ * @param int $objectID projectID|programID
* @access public
* @return void
*/
- public function adjustNavigation($from = '', $projectID = 0)
+ public function adjustNavigation($from = '', $objectID = 0)
{
if($from == 'project')
{
- $this->lang->navGroup->project = 'project';
$this->lang->project->menu = $this->lang->scrum->setMenu;
$moduleIndex = array_search('project', $this->lang->noMenuModule);
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
}
-
- if($from == 'pgmproject')
+ else if($from == 'pgmproject')
{
- $this->app->rawMethod = 'pgmproject';
- $this->lang->project->switcherMenu = $this->project->getPGMSwitcher($projectID, true);
- $this->project->setPGMViewMenu($projectID);
+ $this->lang->program->switcherMenu = $this->loadModel('program')->getSwitcher($objectID, true);
}
}
}
diff --git a/module/projectrelease/control.php b/module/projectrelease/control.php
index 00011d36f6..621f076cc8 100644
--- a/module/projectrelease/control.php
+++ b/module/projectrelease/control.php
@@ -59,23 +59,28 @@ class projectrelease extends control
* Browse releases.
*
* @param int $projectID
+ * @param int $executionID
* @param string $type
* @access public
* @return void
*/
- public function browse($projectID, $type = 'all')
+ public function browse($projectID = 0, $executionID = 0, $type = 'all')
{
$this->session->set('releaseList', $this->app->getURI(true));
$execution = $this->loadModel('execution')->getById($this->session->PRJ);
- commonModel::setAppObjectID('project', $projectID);
- $this->view->title = $execution->name . $this->lang->colon . $this->lang->release->browse;
- $this->view->position[] = $this->lang->release->browse;
- $this->view->execution = $execution;
- $this->view->products = $this->loadModel('product')->getProducts($this->session->PRJ);
- $this->view->releases = $this->projectrelease->getList($projectID, $type);
- $this->view->projectID = $projectID;
- $this->view->type = $type;
+ if($projectID) commonModel::setAppObjectID('project', $projectID);
+ if($executionID) commonModel::setAppObjectID('execution', $executionID);
+
+ $this->view->title = $execution->name . $this->lang->colon . $this->lang->release->browse;
+ $this->view->position[] = $this->lang->release->browse;
+ $this->view->execution = $execution;
+ $this->view->products = $this->loadModel('product')->getProducts($this->session->PRJ);
+ $this->view->releases = $this->projectrelease->getList($projectID, $type);
+ $this->view->projectID = $projectID;
+ $this->view->executionID = $executionID;
+ $this->view->type = $type;
+ $this->view->from = $this->app->openApp;
$this->display();
}
diff --git a/module/projectrelease/view/browse.html.php b/module/projectrelease/view/browse.html.php
index 2cd8005432..46cbeab9e3 100644
--- a/module/projectrelease/view/browse.html.php
+++ b/module/projectrelease/view/browse.html.php
@@ -16,9 +16,9 @@
{$lang->release->all}" . ($type == 'all' ? ' ' . count($releases) . '' : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'");
- echo html::a(inlink('browse', "projectID=$projectID&type=normal"), "{$lang->release->statusList['normal']}" . ($type == 'normal' ? ' ' . count($releases) . '' : ''), '', "id='normalTab' class='btn btn-link" . ('normal' == $type ? ' btn-active-text' : '') . "'");
- echo html::a(inlink('browse', "projectID=$projectID&type=terminate"), "{$lang->release->statusList['terminate']}" . ($type == 'terminate' ? ' ' . count($releases) . '' : ''), '', "id='terminateTab' class='btn btn-link" . ('terminate' == $type ? ' btn-active-text' : '') . "'");
+ echo html::a(inlink('browse', "projectID=$projectID&executionID=$executionID&type=all"), "{$lang->release->all}" . ($type == 'all' ? ' ' . count($releases) . '' : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "' data-app='$from'");
+ echo html::a(inlink('browse', "projectID=$projectID&executionID=$executionID&type=normal"), "{$lang->release->statusList['normal']}" . ($type == 'normal' ? ' ' . count($releases) . '' : ''), '', "id='normalTab' class='btn btn-link" . ('normal' == $type ? ' btn-active-text' : '') . "' data-app='$from'");
+ echo html::a(inlink('browse', "projectID=$projectID&executionID=$executionID&type=terminate"), "{$lang->release->statusList['terminate']}" . ($type == 'terminate' ? ' ' . count($releases) . '' : ''), '', "id='terminateTab' class='btn btn-link" . ('terminate' == $type ? ' btn-active-text' : '') . "' data-app='$from'");
?>
@@ -63,7 +63,7 @@
marker ? " " : '';
- echo html::a(inlink('view', "release=$release->id"), $release->name) . $flagIcon;
+ echo html::a(inlink('view', "release=$release->id"), $release->name, '', "data-app='$from'") . $flagIcon;
?>
|
productName?> |
diff --git a/module/qa/control.php b/module/qa/control.php
index f262eef4fb..df04e43525 100644
--- a/module/qa/control.php
+++ b/module/qa/control.php
@@ -17,19 +17,22 @@ class qa extends control
* @access public
* @return void
*/
- public function index($locate = 'auto', $productID = 0)
+ public function index($locate = 'auto', $productID = 0, $projectID = 0)
{
- $this->products = $this->loadModel('product')->getProductPairsByProject($this->projectID, 'noclosed');
- if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', 'fromModule=qa&moduleGroup=' . $this->lang->navGroup->qa . '&activeMenu=index')));
+ if($this->app->openApp == 'qa') $this->lang->noMenuModule[] = 'qa';
+
+ $products = $this->loadModel('product')->getProductPairsByProject($projectID, 'noclosed');
+ if(empty($products)) die($this->locate($this->createLink('product', 'showErrorNone', 'fromModule=qa&moduleGroup=' . $this->lang->navGroup->qa . '&activeMenu=index')));
if($locate == 'yes') $this->locate($this->createLink('bug', 'browse'));
- $productID = $this->product->saveState($productID, $this->products);
+ $productID = $this->product->saveState($productID, $products);
$branch = (int)$this->cookie->preBranch;
- $this->qa->setMenu($this->products, $productID, $branch);
+ $this->qa->setMenu($products, $productID, $branch);
+ commonModel::setAppObjectID('qa', $productID);
$this->view->title = $this->lang->qa->index;
$this->view->position[] = $this->lang->qa->index;
- $this->view->products = $this->products;
+ $this->view->products = $products;
$this->display();
}
}
diff --git a/module/qa/model.php b/module/qa/model.php
index 2df7c0f569..d94937cd99 100644
--- a/module/qa/model.php
+++ b/module/qa/model.php
@@ -39,15 +39,6 @@ class qaModel extends model
$productIndex .= $selectHtml;
}
- $this->lang->modulePageNav = $productIndex;
- foreach($this->lang->qa->menu as $key => $menu)
- {
- if($this->config->global->flow == 'full' && $this->lang->navGroup->qa != 'qa') $this->setSubMenu('qa', $key, $productID);
- $replace = $productID;
- if($this->lang->navGroup->testcase == 'project' and $key == 'bug') $replace = 0;
- common::setMenuVars($this->lang->qa->menu, $key, $replace);
- }
-
if($this->lang->navGroup->qa == 'qa') $this->lang->qa->switcherMenu = $this->product->getSwitcher($productID, $extra, $branch);
}
diff --git a/module/testcase/model.php b/module/testcase/model.php
index b30bfef98b..125ee96e4d 100644
--- a/module/testcase/model.php
+++ b/module/testcase/model.php
@@ -285,7 +285,7 @@ class testcaseModel extends model
->leftJoin(TABLE_PROJECTSTORY)->alias('t3')->on('t3.story=t2.story')
->leftJoin(TABLE_STORY)->alias('t4')->on('t3.story=t4.id')
->where('t2.product')->eq((int)$productID)
- ->beginIF($this->lang->navGroup->testcase != 'qa')->andWhere('t1.project')->eq($this->session->PRJ)->fi()
+ ->beginIF($this->app->openApp == 'project')->andWhere('t1.project')->eq($this->session->PRJ)->fi()
->beginIF($branch)->andWhere('t2.branch')->eq($branch)->fi()
->beginIF($moduleIdList)->andWhere('t2.module')->in($moduleIdList)->fi()
->beginIF($browseType == 'wait')->andWhere('t2.status')->eq($browseType)->fi()
diff --git a/module/testtask/model.php b/module/testtask/model.php
index 112fa4cb88..d928652e23 100644
--- a/module/testtask/model.php
+++ b/module/testtask/model.php
@@ -1616,7 +1616,7 @@ class testtaskModel extends model
if(common::hasPriv('testtask', 'unlinkCase', $run))
{
$unlinkURL = helper::createLink('testtask', 'unlinkCase', "caseID=$run->id&confirm=yes");
- echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"casesForm\", confirmUnlink)", ' ', '', "title='{$this->lang->testtask->unlinkCase}' class='btn'");
+ echo html::a("javascript:void(0)", ' ', '', "title='{$this->lang->testtask->unlinkCase}' class='btn' onclick='ajaxDelete(\"$unlinkURL\", \"casesForm\", confirmUnlink)'");
}
break;
|