Merge branch '15.0.beta3' of https://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3

This commit is contained in:
tianshujie98
2021-03-18 16:57:38 +08:00
28 changed files with 84 additions and 88 deletions
+4 -6
View File
@@ -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')
+1 -1
View File
@@ -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')
{
+1 -1
View File
@@ -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')
{
+2 -2
View File
@@ -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'"));
+3 -3
View File
@@ -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');
+3 -3
View File
@@ -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');
+4 -3
View File
@@ -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&copyExecutionID=&planID=$planID&confirm=no")));
+3 -3
View File
@@ -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;
}
+2 -2
View File
@@ -36,12 +36,12 @@
<?php endif;?>
<div class='btn-toolbar pull-left'>
<?php foreach($lang->execution->featureBar['all'] as $key => $label):?>
<?php echo html::a(inlink("all", "status=$key&projectID=$projectID&orderBy=$orderBy&productID=$productID"), "<span class='text'>{$label}</span>", '', "class='btn btn-link' id='{$key}Tab'");?>
<?php echo html::a(inlink("all", "status=$key&projectID=$projectID&orderBy=$orderBy&productID=$productID"), "<span class='text'>{$label}</span>", '', "class='btn btn-link' id='{$key}Tab' data-app='$from'");?>
<?php endforeach;?>
</div>
<div class='btn-toolbar pull-right'>
<?php common::printLink('execution', 'export', "status=$status&productID=$productID&orderBy=$orderBy&from=$from", "<i class='icon-export muted'> </i>" . $lang->export, '', "class='btn btn-link export'")?>
<?php if(common::hasPriv('execution', 'create')) echo html::a($this->createLink('execution', 'create'), "<i class='icon icon-sm icon-plus'></i> " . ($from == 'execution' ? $lang->execution->createExec : $lang->execution->create), '', "class='btn btn-primary'");?>
<?php if(common::hasPriv('execution', 'create')) echo html::a($this->createLink('execution', 'create', "projectID=$projectID"), "<i class='icon icon-sm icon-plus'></i> " . ($from == 'execution' ? $lang->execution->createExec : $lang->execution->create), '', "class='btn btn-primary' data-app='$from'");?>
</div>
</div>
<div id='mainContent' class="main-row fade">
+1 -2
View File
@@ -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. */
+2 -2
View File
@@ -103,8 +103,8 @@
<?php endif;?>
</td>
<td><span class='label-pri <?php echo 'label-pri-' . $bug->pri?>' title='<?php echo zget($lang->bug->priList, $bug->pri);?>'><?php echo zget($lang->bug->priList, $bug->pri)?></span></td>
<td class='text-left nobr'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id", '', '', $bug->project), $bug->title, null, "style='color: $bug->color' title={$bug->title} data-group='project'");?></td>
<td class='text-left nobr'><?php echo html::a($this->createLink('product', 'view', "productID=$bug->product", '', '', $bug->project), $bug->productName, null, "title={$bug->productName} data-group='product'");?></td>
<td class='text-left nobr'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title, null, "style='color: $bug->color' title={$bug->title}");?></td>
<td class='text-left nobr'><?php echo html::a($this->createLink('product', explode('-', $config->productLink)[1], "productID=$bug->product"), $bug->productName, null, "title={$bug->productName}");?></td>
<td title="<?php echo zget($lang->bug->typeList, $bug->type, '');?>"><?php echo zget($lang->bug->typeList, $bug->type, '');?></td>
<?php if($type != 'openedBy'): ?>
<td><?php echo zget($users, $bug->openedBy);?></td>
+3 -3
View File
@@ -85,7 +85,7 @@
<td><span class='label-pri <?php echo 'label-pri-' . $case->pri?>' title='<?php echo zget($lang->testcase->priList, $case->pri, $case->pri);?>'><?php echo zget($lang->testcase->priList, $case->pri, $case->pri)?></span></td>
<?php $params = "testcaseID=$caseID&version=$case->version";?>
<?php if($type == 'assigntome') $params .= "&from=testtask&taskID=$case->task";?>
<td class='text-left'><?php echo html::a($this->createLink('testcase', 'view', $params, '', '', $case->project), $case->title, null, "style='color: $case->color' data-group='project'");?></td>
<td class='text-left'><?php echo html::a($this->createLink('testcase', 'view', $params), $case->title, null, "style='color: $case->color'");?></td>
<?php if($type == 'assigntome'):?>
<td><?php echo $case->taskName;?></td>
<?php endif;?>
@@ -99,8 +99,8 @@
<?php
if($canBeChanged)
{
common::printIcon('testcase', 'createBug', "product=$case->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&param=$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&param=$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);
+8 -8
View File
@@ -47,22 +47,22 @@
<?php foreach($tasks as $task):?>
<tr>
<td class="c-id"><?php printf('%03d', $task->id);?></td>
<td class='text-left nobr'><?php echo html::a($this->createLink('testtask', 'view', "taskID=$task->id", '', '', $task->project), $task->name, '', "data-group='project'");?></td>
<td class='text-left nobr'><?php echo html::a($this->createLink('testtask', 'view', "taskID=$task->id"), $task->name);?></td>
<td class='nobr'><?php echo $task->executionName?></td>
<td class='nobr' title='<?php echo $task->buildName;?>'><?php $task->build == 'trunk' ? print($lang->trunk) : print(html::a($this->createLink('build', 'view', "buildID=$task->build", '', '', $task->project), $task->buildName, '', "data-group='project'"));?></td>
<td class='nobr' title='<?php echo $task->buildName;?>'><?php $task->build == 'trunk' ? print($lang->trunk) : print(html::a($this->createLink('build', 'view', "buildID=$task->build"), $task->buildName));?></td>
<td><?php echo $task->begin?></td>
<td><?php echo $task->end?></td>
<td title='<?php echo $task->status?>'><span class="status-task status-<?php echo $task->status?>"><?php echo $this->processStatus('testtask', $task);?></span></td>
<td class='c-actions'>
<?php
common::printIcon('testtask', 'cases', "taskID=$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)", '<i class="icon-common-delete icon-trash"></i>', '', "title='{$lang->testtask->delete}' class='btn'");
}
?>
+1 -1
View File
@@ -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)'"));
}
}
+2 -2
View File
@@ -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=&copyExecutionID=&planID=' + planID + '&confirm=&projectID=' + PRJID, '', '');
parent.location.href = createLink('execution', 'create', 'projectID=' + projectID + '&executionID=&copyExecutionID=&planID=' + planID + '&confirm=&productID=' + productID);
});
});
$(document).on('click', 'td.content .more', function(e)
+1 -1
View File
@@ -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'));
+1
View File
@@ -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';
+1
View File
@@ -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'] = '外部';
+2 -1
View File
@@ -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()
+1 -1
View File
@@ -1,6 +1,6 @@
<?php
/**
* The html product list file of pgmproduct method of program module of ZenTaoPMS.
* The html product list file of product method of program module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
+4 -4
View File
@@ -45,7 +45,7 @@ js::set('browseType', $browseType);
<?php if(isset($this->config->maxVersion)):?>
<?php common::printLink('program', 'createGuide', "programID=$programID", '<i class="icon icon-plus"></i>' . $lang->project->create, '', 'class="btn btn-info btn-wide " data-toggle="modal" data-target="#guideDialog"');?>
<?php elseif($this->config->systemMode == 'new'):?>
<?php common::printLink('project', 'create', "mode=scrum&programID=$programID&from=program", '<i class="icon icon-plus"></i>' . $lang->project->create, '', 'class="btn btn-info btn-wide"');?>
<?php common::printLink('project', 'create', "mode=scrum&programID=$programID", '<i class="icon icon-plus"></i>' . $lang->project->create, '', 'class="btn btn-info btn-wide"');?>
<?php endif;?>
</p>
</div>
@@ -56,13 +56,13 @@ js::set('browseType', $browseType);
$setting = $this->datatable->getSetting('program');
?>
<table class='table has-sort-head'>
<?php $canBatchEdit = common::hasPriv('program', 'PRJBatchEdit');?>
<?php $canBatchEdit = common::hasPriv('project', 'batchEdit');?>
<thead>
<tr>
<?php
foreach($setting as $value)
{
if($value->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);
<?php
if($canBatchEdit)
{
$actionLink = $this->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);
}
+4 -8
View File
@@ -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);
}
}
}
+14 -9
View File
@@ -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();
}
+5 -5
View File
@@ -16,9 +16,9 @@
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php
echo html::a(inlink('browse', "projectID=$projectID&type=all"), "<span class='text'>{$lang->release->all}</span>" . ($type == 'all' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'");
echo html::a(inlink('browse', "projectID=$projectID&type=normal"), "<span class='text'>{$lang->release->statusList['normal']}</span>" . ($type == 'normal' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='normalTab' class='btn btn-link" . ('normal' == $type ? ' btn-active-text' : '') . "'");
echo html::a(inlink('browse', "projectID=$projectID&type=terminate"), "<span class='text'>{$lang->release->statusList['terminate']}</span>" . ($type == 'terminate' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='terminateTab' class='btn btn-link" . ('terminate' == $type ? ' btn-active-text' : '') . "'");
echo html::a(inlink('browse', "projectID=$projectID&executionID=$executionID&type=all"), "<span class='text'>{$lang->release->all}</span>" . ($type == 'all' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "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"), "<span class='text'>{$lang->release->statusList['normal']}</span>" . ($type == 'normal' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "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"), "<span class='text'>{$lang->release->statusList['terminate']}</span>" . ($type == 'terminate' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='terminateTab' class='btn btn-link" . ('terminate' == $type ? ' btn-active-text' : '') . "' data-app='$from'");
?>
</div>
<div class="btn-toolbar pull-right">
@@ -33,7 +33,7 @@
<p>
<span class="text-muted"><?php echo $lang->release->noRelease;?></span>
<?php if(common::canModify('execution', $execution) and common::hasPriv('projectrelease', 'create')):?>
<?php echo html::a($this->createLink('projectrelease', 'create'), "<i class='icon icon-plus'></i> " . $lang->release->create, '', "class='btn btn-info'");?>
<?php echo html::a($this->createLink('projectrelease', 'create', "projectID=$projectID"), "<i class='icon icon-plus'></i> " . $lang->release->create, '', "class='btn btn-info'");?>
<?php endif;?>
</p>
</div>
@@ -63,7 +63,7 @@
<td>
<?php
$flagIcon = $release->marker ? "<icon class='icon icon-flag red' title='{$lang->release->marker}'></icon> " : '';
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;
?>
</td>
<td title='<?php echo $release->productName?>'><?php echo $release->productName?></td>
+9 -6
View File
@@ -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();
}
}
-9
View File
@@ -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);
}
+1 -1
View File
@@ -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()
+1 -1
View File
@@ -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)", '<i class="icon-unlink"></i>', '', "title='{$this->lang->testtask->unlinkCase}' class='btn'");
echo html::a("javascript:void(0)", '<i class="icon-unlink"></i>', '', "title='{$this->lang->testtask->unlinkCase}' class='btn' onclick='ajaxDelete(\"$unlinkURL\", \"casesForm\", confirmUnlink)'");
}
break;