Merge branch '15.0.beta3' of http://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3
This commit is contained in:
@@ -349,3 +349,7 @@ update zt_config set `value`='project-browse' where `key`='projectLink';
|
||||
update zt_config set `value`='program-browse' where `key`='programLink';
|
||||
update zt_block set source='project', block='projectteam' where block='programteam' and source='program';
|
||||
update zt_block set source='project', block='project' where block='program' and source='program';
|
||||
|
||||
update zt_team set type='execution' where type='project';
|
||||
update zt_action set objectType='execution' where objectType='project';
|
||||
update zt_file set objectType='execution' where objectType='project';
|
||||
|
||||
@@ -21,6 +21,11 @@ js::set('productID', $productID);
|
||||
js::set('branch', $branch);
|
||||
$currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($browseType, array_keys($lang->bug->mySelects)) ? $browseType : '';
|
||||
?>
|
||||
<style>
|
||||
.btn-group a i.icon-plus {font-size: 16px;}
|
||||
.btn-group a.btn-primary {border-right: 1px solid rgba(255,255,255,0.3);}
|
||||
.btn-group button.dropdown-toggle.btn-primary {padding:6px;}
|
||||
</style>
|
||||
<?php if($config->global->flow == 'full'):?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div id="sidebarHeader">
|
||||
@@ -111,17 +116,25 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
|
||||
<?php if(common::canModify('product', $product)):?>
|
||||
<?php if(!common::checkNotCN()):?>
|
||||
<?php
|
||||
common::printLink('bug', 'batchCreate', "productID=$productID&branch=$branch&executionID=0&moduleID=$moduleID", "<i class='icon icon-plus'></i>" . $lang->bug->batchCreate, '', "class='btn btn-secondary'");
|
||||
if(commonModel::isTutorialMode())
|
||||
{
|
||||
$wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&extra=moduleID=$moduleID");
|
||||
echo html::a($this->createLink('tutorial', 'wizard', "module=bug&method=create¶ms=$wizardParams"), "<i class='icon-plus'></i>" . $lang->bug->create, '', "class='btn btn-primary btn-bug-create'");
|
||||
}
|
||||
else
|
||||
{
|
||||
common::printLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID", "<i class='icon icon-plus'></i>" . $lang->bug->create, '', "class='btn btn-primary'");
|
||||
}
|
||||
$createBugLink = '';
|
||||
if(commonModel::isTutorialMode())
|
||||
{
|
||||
$wizardParams = helper::safe64Encode("productID=$productID&branch=$branch&extra=moduleID=$moduleID");
|
||||
$createBugLink = $this->createLink('tutorial', 'wizard', "module=bug&method=create¶ms=$wizardParams");
|
||||
}
|
||||
else
|
||||
{
|
||||
$createBugLink = $this->createLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID");
|
||||
}
|
||||
?>
|
||||
<div class='btn-group dropdown'>
|
||||
<?php echo html::a($createBugLink, "<i class='icon-plus'></i> {$lang->bug->create}", '', "class='btn btn-primary'");?>
|
||||
<button type='button' class='btn btn-primary dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>
|
||||
<ul class='dropdown-menu'>
|
||||
<li><?php echo html::a($createBugLink, $lang->bug->create);?></li>
|
||||
<li><?php echo html::a($this->createLink('bug', 'batchCreate', "productID=$productID&branch=$branch&executionID=0&moduleID=$moduleID"), $lang->bug->batchCreate);?></li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class='btn-group dropdown-hover'>
|
||||
<?php
|
||||
|
||||
@@ -42,8 +42,7 @@ class build extends control
|
||||
{
|
||||
$this->loadModel('project')->setMenu($projectID);
|
||||
$executions = $this->execution->getPairs($projectID);
|
||||
$executionID = isset($executions[$this->session->executionID]) ? $this->session->executionID : key($executions);
|
||||
$this->session->set('executionID', 0);
|
||||
$executionID = $executionID == 0 ? key($executions) : $executionID;
|
||||
$this->session->set('project', $projectID);
|
||||
}
|
||||
elseif($this->app->openApp == 'execution')
|
||||
@@ -284,7 +283,8 @@ class build extends control
|
||||
$this->send($response);
|
||||
}
|
||||
|
||||
die(js::locate($this->createLink('execution', 'build', "executionID=$build->execution"), 'parent'));
|
||||
$link = $this->app->openApp == 'project' ? $this->createLink('project', 'build', "projectID=$build->project") : $this->createLink('execution', 'build', "executionID=$build->execution");
|
||||
die(js::locate($link, 'parent'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,8 +53,8 @@ tbody tr td:first-child input {display: none;}
|
||||
{
|
||||
echo $this->buildOperateMenu($build, 'view');
|
||||
|
||||
if(common::hasPriv('build', 'edit')) echo html::a($this->createLink('build', 'edit', "buildID=$build->id"), "<i class='icon-common-edit icon-edit'></i> " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->edit}'");
|
||||
if(common::hasPriv('build', 'delete')) echo html::a($this->createLink('build', 'delete', "buildID=$build->id"), "<i class='icon-common-delete icon-trash'></i> " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->delete}' target='hiddenwin'");
|
||||
if(common::hasPriv('build', 'edit')) echo html::a($this->createLink('build', 'edit', "buildID=$build->id"), "<i class='icon-common-edit icon-edit'></i> " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->edit}' data-app='{$app->openApp}'");
|
||||
if(common::hasPriv('build', 'delete')) echo html::a($this->createLink('build', 'delete', "buildID=$build->id"), "<i class='icon-common-delete icon-trash'></i> " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->delete}' target='hiddenwin' data-app='{$app->openApp}'");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
@@ -19,6 +19,11 @@ js::set('confirmDelete', $lang->testcase->confirmDelete);
|
||||
js::set('batchDelete', $lang->testcase->confirmBatchDelete);
|
||||
js::set('flow', $config->global->flow);
|
||||
?>
|
||||
<style>
|
||||
.btn-group a i.icon-plus {font-size: 16px;}
|
||||
.btn-group a.btn-primary {border-right: 1px solid rgba(255,255,255,0.2);}
|
||||
.btn-group button.dropdown-toggle.btn-primary {padding:6px;}
|
||||
</style>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div id="sidebarHeader">
|
||||
<div class="title">
|
||||
@@ -55,9 +60,18 @@ js::set('flow', $config->global->flow);
|
||||
<?php common::printLink('caselib', 'exportTemplet', "libID=$libID", "<i class='icon icon-export muted'> </i>" . $lang->caselib->exportTemplet, '', "class='btn btn-link export' data-width='35%'");?>
|
||||
<?php common::printLink('caselib', 'import', "libID=$libID", "<i class='icon muted icon-import'> </i>" . $lang->testcase->fileImport, '', "class='btn btn-link export'");?>
|
||||
</div>
|
||||
<?php $params = "libID=$libID&moduleID=" . (isset($moduleID) ? $moduleID : 0);?>
|
||||
<?php common::printLink('caselib', 'batchCreateCase', $params, "<i class='icon-plus'></i>" . $lang->testcase->batchCreate, '', "class='btn btn-secondary'");?>
|
||||
<?php common::printLink('caselib', 'createCase', $params, "<i class='icon-plus'></i>" . $lang->testcase->create, '', "class='btn btn-primary'");?>
|
||||
<div class='btn-group dropdown'>
|
||||
<?php
|
||||
$params = "libID=$libID&moduleID=" . (isset($moduleID) ? $moduleID : 0);
|
||||
$actionLink = $this->createLink('caselib', 'createCase', $params);
|
||||
echo html::a($actionLink, "<i class='icon icon-plus'></i> {$lang->testcase->create}", '', "class='btn btn-primary'");
|
||||
?>
|
||||
<button type='button' class='btn btn-primary dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>
|
||||
<ul class='dropdown-menu'>
|
||||
<li><?php echo html::a($actionLink, $lang->testcase->create);?></li>
|
||||
<li><?php echo html::a($this->createLink('caselib', 'batchCreateCase', $params), $lang->testcase->batchCreate);?></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mainContent" class="main-row fade">
|
||||
|
||||
@@ -2047,6 +2047,9 @@ class execution extends control
|
||||
|
||||
$browseExecutionLink = $this->createLink('execution', 'browse', "executionID=$executionID");
|
||||
|
||||
$this->loadModel('product');
|
||||
$execution = $this->execution->getById($executionID);
|
||||
|
||||
if(!empty($_POST))
|
||||
{
|
||||
/* Get executionType and determine whether a product is linked with the stage. */
|
||||
@@ -2073,14 +2076,10 @@ class execution extends control
|
||||
|
||||
if(isonlybody())
|
||||
{
|
||||
$this->session->set('executionID' , $executionID);
|
||||
die(js::reload('parent'));
|
||||
die(js::locate($this->createLink('build', 'create', "executionID=$executionID&productID=0&projectID=$execution->project"), 'parent'));
|
||||
}
|
||||
}
|
||||
|
||||
$this->loadModel('product');
|
||||
$execution = $this->execution->getById($executionID);
|
||||
|
||||
/* Set menu. */
|
||||
$this->execution->setMenu($execution->id);
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ js::set('foldAll', $lang->execution->treeLevel['root']);
|
||||
?>
|
||||
<style>
|
||||
.btn-group a i.icon-plus {font-size: 16px;}
|
||||
.btn-group a.btn-primary {border-right: 1px solid #c3c3c3;}
|
||||
.btn-group a.btn-primary {border-right: 1px solid rgba(255,255,255,0.2);}
|
||||
.btn-group button.dropdown-toggle.btn-primary {padding:6px;}
|
||||
</style>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
echo html::a($this->createLink('build', 'view', "buildID=$build->id&type=story&link=true"), "<i class='icon icon-link'></i>", '', "class='btn' title='{$lang->build->linkStory}' data-app='project'");
|
||||
}
|
||||
common::printIcon('testtask', 'create', "product=$build->product&executionID={$build->execution}&build=$build->id&projectID=$projectID", $build, 'list', 'bullhorn', '', '', '', "data-app='project'");
|
||||
$lang->project->bug = $lang->execution->viewBug;
|
||||
$lang->build->view = $lang->project->bug;
|
||||
common::printIcon('build', 'view', "buildID=$build->id&type=generatedBug", $build, 'list', 'bug', '', '', '', "data-app='project'");
|
||||
common::printIcon('build', 'edit', "buildID=$build->id", $build, 'list');
|
||||
if(common::hasPriv('build', 'delete', $build))
|
||||
|
||||
+12
-4
@@ -29,6 +29,8 @@ class repo extends control
|
||||
die(js::locate('back'));
|
||||
}
|
||||
|
||||
$this->projectID = $this->session->project ? $this->session->project : 0;
|
||||
|
||||
/* Unlock session for wait to get data of repo. */
|
||||
session_write_close();
|
||||
}
|
||||
@@ -158,7 +160,6 @@ class repo extends control
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('maintain')));
|
||||
}
|
||||
|
||||
$this->repo->setMenu($this->repos, $repo->id, false);
|
||||
$this->app->loadLang('action');
|
||||
|
||||
$repo->repoType = $repo->id . '-' . $repo->SCM;
|
||||
@@ -224,7 +225,6 @@ class repo extends control
|
||||
$this->commonAction($repoID, $objectID);
|
||||
|
||||
if($this->get->repoPath) $entry = $this->get->repoPath;
|
||||
$this->repo->setMenu($this->repos, $repoID);
|
||||
$this->repo->setBackSession('view', $withOtherModule = true);
|
||||
if($repoID == 0) $repoID = $this->session->repoID;
|
||||
|
||||
@@ -240,6 +240,7 @@ class repo extends control
|
||||
$repo = $this->repo->getRepoByID($repoID);
|
||||
$entry = $this->repo->decodePath($entry);
|
||||
|
||||
$this->commonAction($repoID);
|
||||
$this->scm->setEngine($repo);
|
||||
$info = $this->scm->info($entry, $revision);
|
||||
$path = $entry ? $info->path : '';
|
||||
@@ -442,7 +443,6 @@ class repo extends control
|
||||
public function log($repoID = 0, $entry = '', $revision = 'HEAD', $type = 'dir', $recTotal = 0, $recPerPage = 50, $pageID = 1)
|
||||
{
|
||||
if($this->get->repoPath) $entry = $this->get->repoPath;
|
||||
$this->repo->setMenu($this->repos, $repoID);
|
||||
$this->repo->setBackSession('log', $withOtherModule = true);
|
||||
if($repoID == 0) $repoID = $this->session->repoID;
|
||||
|
||||
@@ -461,6 +461,7 @@ class repo extends control
|
||||
$this->locate($this->repo->createLink('diff', "repoID=$repoID&entry=" . $this->repo->encodePath($path) . "&oldrevision=$oldRevision&newRevision=$newRevision"));
|
||||
}
|
||||
|
||||
$this->commonAction($repoID);
|
||||
$this->scm->setEngine($repo);
|
||||
$info = $this->scm->info($entry, $revision);
|
||||
|
||||
@@ -502,6 +503,7 @@ class repo extends control
|
||||
/* Save session. */
|
||||
$this->session->set('revisionList', $this->app->getURI(true));
|
||||
|
||||
$this->commonAction($repoID);
|
||||
$this->scm->setEngine($repo);
|
||||
$log = $this->scm->log('', $revision, $revision);
|
||||
|
||||
@@ -595,12 +597,12 @@ class repo extends control
|
||||
$this->commonAction($repoID, $objectID);
|
||||
|
||||
if($this->get->repoPath) $entry = $this->get->repoPath;
|
||||
$this->repo->setMenu($this->repos, $repoID);
|
||||
if($repoID == 0) $repoID = $this->session->repoID;
|
||||
$repo = $this->repo->getRepoByID($repoID);
|
||||
$file = $entry;
|
||||
$entry = $this->repo->decodePath($entry);
|
||||
|
||||
$this->commonAction($repoID);
|
||||
$this->scm->setEngine($repo);
|
||||
$encoding = empty($encoding) ? $repo->encoding : $encoding;
|
||||
$encoding = strtolower(str_replace('_', '-', $encoding));
|
||||
@@ -670,6 +672,7 @@ class repo extends control
|
||||
$this->locate($this->repo->createLink('diff', "repoID=$repoID&objectID=$objectID&entry=" . $this->repo->encodePath($entry) . "&oldrevision=$oldRevision&newRevision=$newRevision&showBug=&encoding=$encoding"));
|
||||
}
|
||||
|
||||
$this->commonAction($repoID);
|
||||
$this->scm->setEngine($repo);
|
||||
$encoding = empty($encoding) ? $repo->encoding : $encoding;
|
||||
$encoding = strtolower(str_replace('_', '-', $encoding));
|
||||
@@ -754,6 +757,8 @@ class repo extends control
|
||||
if($this->get->repoPath) $path = $this->get->repoPath;
|
||||
$entry = $this->repo->decodePath($path);
|
||||
$repo = $this->repo->getRepoByID($repoID);
|
||||
|
||||
$this->commonAction($repoID);
|
||||
$this->scm->setEngine($repo);
|
||||
$content = $type == 'file' ? $this->scm->cat($entry, $fromRevision) : $this->scm->diff($entry, $fromRevision, $toRevision, 'patch');
|
||||
$fileName = basename(urldecode($entry));
|
||||
@@ -805,6 +810,7 @@ class repo extends control
|
||||
$this->commonAction($repoID, $objectID);
|
||||
|
||||
$this->repo->setMenu($this->repos, $repoID);
|
||||
|
||||
if($repoID == 0) $repoID = $this->session->repoID;
|
||||
if($branch) $branch = base64_decode($branch);
|
||||
|
||||
@@ -837,6 +843,7 @@ class repo extends control
|
||||
if(empty($repo)) die();
|
||||
if($repo->synced) die('finish');
|
||||
|
||||
$this->commonAction($repoID);
|
||||
$this->scm->setEngine($repo);
|
||||
|
||||
$branchID = '';
|
||||
@@ -929,6 +936,7 @@ class repo extends control
|
||||
if($repo->SCM != 'Git') die('finish');
|
||||
if($branch) $branch = base64_decode($branch);
|
||||
|
||||
$this->commonAction($repoID);
|
||||
$this->scm->setEngine($repo);
|
||||
|
||||
$this->repo->setRepoBranch($branch);
|
||||
|
||||
@@ -11,6 +11,11 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class='pull-right'>
|
||||
<?php if(common::hasPriv('repo', 'create')) echo html::a(helper::createLink('repo', 'create'), "<i class='icon icon-plus'></i> " . $this->lang->repo->create, '', "class='btn btn-primary'");?>
|
||||
</div>
|
||||
</div>
|
||||
<div id='mainContent'>
|
||||
<form class='main-table' id='ajaxForm' method='post'>
|
||||
<table id='repoList' class='table has-sort-head table-fixed'>
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
<?php js::set('flow', $config->global->flow);?>
|
||||
<?php if(!isset($branch)) $branch = 0;?>
|
||||
<?php if($config->global->flow == 'full'):?>
|
||||
<style>
|
||||
.btn-group a i.icon-plus {font-size: 16px;}
|
||||
.btn-group a.btn-primary {border-right: 1px solid rgba(255,255,255,0.2);}
|
||||
.btn-group button.dropdown-toggle.btn-primary {padding:6px;}
|
||||
</style>
|
||||
<div id='mainMenu' class='clearfix'>
|
||||
<div id="sidebarHeader">
|
||||
<div class="title">
|
||||
@@ -135,19 +140,19 @@
|
||||
</div>
|
||||
<?php $initModule = isset($moduleID) ? (int)$moduleID : 0;?>
|
||||
<?php if(!common::checkNotCN()):?>
|
||||
<?php
|
||||
if(common::hasPriv('testcase', 'batchCreate'))
|
||||
{
|
||||
$link = $this->createLink('testcase', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$initModule");
|
||||
echo html::a($link, "<i class='icon-plus'></i> " . $lang->testcase->batchCreate, '', "class='btn btn-secondary'");
|
||||
}
|
||||
|
||||
if(common::hasPriv('testcase', 'create'))
|
||||
{
|
||||
$link = $this->createLink('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule");
|
||||
echo html::a($link, "<i class='icon-plus'></i> " . $lang->testcase->create, '', "class='btn btn-primary'");
|
||||
}
|
||||
?>
|
||||
<?php if(common::hasPriv('testcase', 'batchCreate') or common::hasPriv('testcase', 'create')):?>
|
||||
<div class='btn-group dropdown'>
|
||||
<?php
|
||||
$actionLink = $this->createLink('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule");
|
||||
echo html::a($actionLink, "<i class='icon-plus'></i> " . $lang->testcase->create, '', "class='btn btn-primary'");
|
||||
?>
|
||||
<button type='button' class='btn btn-primary dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>
|
||||
<ul class='dropdown-menu'>
|
||||
<li><?php echo html::a($actionLink, $lang->testcase->create);?></li>
|
||||
<li><?php echo html::a($this->createLink('testcase', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$initModule"), $lang->testcase->batchCreate);?></li>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php if($this->app->rawMethod == 'browseunits' and common::canModify('product', $product)):?>
|
||||
<?php common::printLink('testtask', 'importUnitResult', "product=$productID", "<i class='icon icon-import'></i> " . $lang->testtask->importUnitResult, '', "class='btn btn-primary'");?>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -4315,7 +4315,7 @@ class upgradeModel extends model
|
||||
if(isset($sprint->feedback)) $teams[$sprint->feedback] = $sprint->feedback;
|
||||
}
|
||||
|
||||
$teams += $this->dao->select('account')->from(TABLE_TEAM)->where('type')->eq('project')->andWhere('root')->in($sprintIdList)->fetchPairs('account', 'account');
|
||||
$teams += $this->dao->select('account')->from(TABLE_TEAM)->where('type')->eq('execution')->andWhere('root')->in($sprintIdList)->fetchPairs('account', 'account');
|
||||
$users = $this->dao->select('account')->from(TABLE_USER)->where('deleted')->eq('0')->fetchPairs('account', 'account');
|
||||
|
||||
/* Insert product and sprint team into project team. */
|
||||
@@ -4333,12 +4333,6 @@ class upgradeModel extends model
|
||||
$this->dao->replace(TABLE_TEAM)->data($team)->exec();
|
||||
}
|
||||
|
||||
/* Update project type to sprint. */
|
||||
$this->dao->update(TABLE_TEAM)->set('type')->eq('sprint')
|
||||
->where('type')->eq('project')
|
||||
->andWhere('root')->in($sprintIdList)
|
||||
->exec();
|
||||
|
||||
/* Get all actor in sprint and product. */
|
||||
foreach($productIdList as $productID) $productIdList[$productID] = ",{$productID},";
|
||||
$whiteList = $this->dao->select('actor')->from(TABLE_ACTION)->where('execution')->in($sprintIdList)->orWhere('product')->in($productIdList)->fetchPairs('actor', 'actor');
|
||||
|
||||
Reference in New Issue
Block a user