* Fix repo of project and execution.
This commit is contained in:
@@ -14,13 +14,13 @@ if($config->systemMode == 'new') $lang->mainNav->project = "<i class='icon icon-
|
||||
|
||||
$lang->mainNav->execution = "<i class='icon icon-run'></i> {$lang->execution->common}|$executionModule|$executionMethod|";
|
||||
$lang->mainNav->qa = "<i class='icon icon-test'></i> {$lang->qa->common}|qa|index|";
|
||||
$lang->mainNav->devops = "<i class='icon icon-code1'></i> {$lang->devops->common}|repo|browse|";
|
||||
$lang->mainNav->devops = "<i class='icon icon-code1'></i> DevOps|repo|browse|";
|
||||
$lang->mainNav->doc = "<i class='icon icon-doc'></i> {$lang->doc->common}|doc|index|";
|
||||
$lang->mainNav->report = "<i class='icon icon-statistic'></i> {$lang->report->common}|report|productSummary|";
|
||||
$lang->mainNav->system = "<i class='icon icon-group'></i> {$lang->system->common}|my|team|";
|
||||
$lang->mainNav->admin = "<i class='icon icon-cog-outline'></i> {$lang->admin->common}|admin|index|";
|
||||
|
||||
$lang->dividerMenu = ',qa,report,admin,';
|
||||
$lang->dividerMenu = ',devops,report,';
|
||||
$lang->mainNav->menuOrder[5] = 'my';
|
||||
if($config->systemMode == 'new') $lang->mainNav->menuOrder[10] = 'program';
|
||||
$lang->mainNav->menuOrder[15] = 'product';
|
||||
@@ -28,10 +28,10 @@ $lang->mainNav->menuOrder[20] = 'project';
|
||||
$lang->mainNav->menuOrder[21] = 'execution';
|
||||
$lang->mainNav->menuOrder[23] = 'qa';
|
||||
$lang->mainNav->menuOrder[25] = 'devops';
|
||||
$lang->mainNav->menuOrder[30] = 'doc';
|
||||
$lang->mainNav->menuOrder[35] = 'report';
|
||||
$lang->mainNav->menuOrder[60] = 'system';
|
||||
$lang->mainNav->menuOrder[70] = 'admin';
|
||||
$lang->mainNav->menuOrder[30] = 'system';
|
||||
$lang->mainNav->menuOrder[35] = 'doc';
|
||||
$lang->mainNav->menuOrder[40] = 'report';
|
||||
$lang->mainNav->menuOrder[45] = 'admin';
|
||||
|
||||
/* My menu. */
|
||||
$lang->my->menu = new stdclass();
|
||||
@@ -149,7 +149,7 @@ $lang->scrum->menu->execution = array('link' => "$lang->executionCommon|project|
|
||||
$lang->scrum->menu->story = array('link' => "$lang->SRCommon|projectstory|story|projectID=%s", 'alias' => 'story,track');
|
||||
$lang->scrum->menu->doc = array('link' => "{$lang->doc->common}|doc|objectLibs|type=project&objectID=%s", 'subModule' => 'doc');
|
||||
$lang->scrum->menu->qa = array('link' => "{$lang->qa->common}|project|qa|projectID=%s", 'subModule' => 'testcase,testtask,bug', 'alias' => 'bug,testtask,testcase');
|
||||
$lang->scrum->menu->devops = array('link' => "{$lang->devops->common}|repo|browse");
|
||||
$lang->scrum->menu->devops = array('link' => "{$lang->devops->common}|repo|browse|repoID=0&objectID=%s", 'subModule' => 'repo');
|
||||
$lang->scrum->menu->build = array('link' => "{$lang->build->common}|project|build|project=%s");
|
||||
$lang->scrum->menu->release = array('link' => "{$lang->release->common}|projectrelease|browse|project=%s", 'subModule' => 'projectrelease');
|
||||
$lang->scrum->menu->dynamic = array('link' => "$lang->dynamic|project|dynamic|project=%s");
|
||||
@@ -191,7 +191,7 @@ $lang->waterfall->menu->doc = array('link' => "{$lang->doc->common}|doc|
|
||||
$lang->waterfall->menu->weekly = array('link' => "{$lang->project->report}|weekly|index|project=%s", 'subModule' => ',milestone,');
|
||||
$lang->waterfall->menu->story = array('link' => "$lang->SRCommon|projectstory|story|project=%s");
|
||||
$lang->waterfall->menu->design = array('link' => "$lang->design|design|browse|product=0&project=%s");
|
||||
$lang->waterfall->menu->repo = array('link' => "{$lang->devops->common}|repo|browse|");
|
||||
$lang->waterfall->menu->repo = array('link' => "{$lang->devops->common}|repo|browse|repoID=0&objectID=%s", 'subModule' => 'repo');
|
||||
$lang->waterfall->menu->track = array('link' => "$lang->track|projectstory|track", 'alias' => 'track');
|
||||
$lang->waterfall->menu->qa = array('link' => "{$lang->qa->common}|project|qa|projectID=%s", 'subModule' => 'testcase,testtask,bug', 'alias' => 'bug,testtask,testcase');
|
||||
$lang->waterfall->menu->release = array('link' => "{$lang->release->common}|projectrelease|browse", 'subModule' => 'projectrelease');
|
||||
@@ -242,7 +242,7 @@ $lang->execution->menu->burn = array('link' => "$lang->burn|execution|burn|e
|
||||
$lang->execution->menu->view = array('link' => "$lang->view|execution|grouptask|executionID=%s", 'alias' => 'grouptask,tree', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->execution->menu->story = array('link' => "$lang->SRCommon|execution|story|executionID=%s", 'subModule' => 'story', 'alias' => 'linkstory,storykanban');
|
||||
$lang->execution->menu->qa = array('link' => "{$lang->qa->common}|execution|qa|executionID=%s", 'subModule' => 'bug', 'alias' => 'qa,bug,testcase,testtask,testreport');
|
||||
$lang->execution->menu->repo = array('link' => "{$lang->devops->common}|repo|browse|projectID=%s");
|
||||
$lang->execution->menu->repo = array('link' => "{$lang->devops->common}|repo|browse|repoID=0&objectID=%s", 'subModule' => 'repo');
|
||||
$lang->execution->menu->doc = array('link' => "{$lang->doc->common}|doc|objectLibs|type=execution&objectID=%s", 'subModule' => 'doc');
|
||||
$lang->execution->menu->build = array('link' => "{$lang->build->common}|execution|build|executionID=%s", 'subModule' => 'build');
|
||||
$lang->execution->menu->release = array('link' => "{$lang->release->common}|projectrelease|browse|projectID=0&executionID=%s", 'subModule' => 'projectrelease');
|
||||
|
||||
@@ -732,7 +732,7 @@ class commonModel extends model
|
||||
$dropMenu = "<ul class='dropdown-menu'>{$dropMenu}</ul>";
|
||||
}
|
||||
|
||||
$misc = isset($lang->navGroup->$module) and $openApp != $lang->navGroup->$module ? "data-app='$openApp'" : '';
|
||||
$misc = (isset($lang->navGroup->$module) and $openApp != $lang->navGroup->$module) ? "data-app='$openApp'" : '';
|
||||
$menuItemHtml = "<li class='$class $active' data-id='$menuItem->name'>" . html::a($link, $label, $target, $misc) . $dropMenu . "</li>\n";
|
||||
|
||||
echo $menuItemHtml;
|
||||
@@ -2267,7 +2267,7 @@ EOD;
|
||||
return;
|
||||
}
|
||||
|
||||
if($app->rawMethod == 'create')
|
||||
if($app->rawModule == $openApp && $app->rawMethod == 'create')
|
||||
{
|
||||
$lang->menu = $lang->$openApp->homeMenu;
|
||||
return;
|
||||
|
||||
@@ -840,7 +840,7 @@ class doc extends control
|
||||
$this->lang->doc->menu = $this->lang->project->menu;
|
||||
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
|
||||
if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc';
|
||||
$this->project->setMenu($this->project->getPairs($this->session->PRJ, 'all', 0, true), $objectID);
|
||||
$this->project->setMenu($objectID);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -934,9 +934,13 @@ class doc extends control
|
||||
$this->doc->setMenu($type, 0, 0, $productID, $executionID, $crumb);
|
||||
|
||||
}
|
||||
elseif($from == 'execution')
|
||||
{
|
||||
$executions = $this->loadModel('execution')->getPairs(0, 'all', 'nocode');
|
||||
$this->execution->setMenu($executions, $objectID);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->lang->noMenuModule[] = 'doc';
|
||||
$this->loadModel($from)->setMenu($objectID);
|
||||
}
|
||||
|
||||
|
||||
+33
-17
@@ -27,24 +27,35 @@ class repo extends control
|
||||
die(js::locate('back'));
|
||||
}
|
||||
|
||||
/* Set repo menu group. */
|
||||
$this->projectID = isset($_GET['project']) ? $_GET['project'] : 0;
|
||||
if(!$this->projectID)
|
||||
{
|
||||
$this->lang->navGroup->repo = 'repo';
|
||||
$this->lang->navGroup->jenkins = 'repo';
|
||||
$this->lang->navGroup->job = 'repo';
|
||||
$this->lang->navGroup->compile = 'repo';
|
||||
}
|
||||
|
||||
$this->scm = $this->app->loadClass('scm');
|
||||
$this->repos = $this->repo->getRepoPairs($this->projectID);
|
||||
if(empty($this->repos) and $this->methodName != 'create') die(js::locate($this->repo->createLink('create')));
|
||||
|
||||
/* Unlock session for wait to get data of repo. */
|
||||
session_write_close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Common actions.
|
||||
*
|
||||
* @param int $objectID projectID|executionID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function commonAction($objectID)
|
||||
{
|
||||
if($this->app->openApp == 'project')
|
||||
{
|
||||
/* Set repo menu group. */
|
||||
$this->scm = $this->app->loadClass('scm');
|
||||
$this->repos = $this->repo->getRepoPairs($objectID);
|
||||
if(empty($this->repos) and $this->methodName != 'create') die(js::locate($this->repo->createLink('create', "objectID=$objectID")));
|
||||
|
||||
$this->loadModel('project')->setMenu($objectID);
|
||||
}
|
||||
else if($this->app->openApp == 'execution')
|
||||
{
|
||||
$executions = $this->loadModel('execution')->getPairs(0, 'all', 'nocode');
|
||||
$this->execution->setMenu($executions, $objectID);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* List all repo.
|
||||
*
|
||||
@@ -81,10 +92,11 @@ class repo extends control
|
||||
/**
|
||||
* Create a repo.
|
||||
*
|
||||
* @param int $objectID projectID|executionID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function create()
|
||||
public function create($objectID)
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
@@ -96,6 +108,8 @@ class repo extends control
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $link));
|
||||
}
|
||||
|
||||
$this->commonAction($objectID);
|
||||
|
||||
array_push($this->lang->noMenuModule, 'repo');
|
||||
$this->app->loadLang('action');
|
||||
$this->repo->setMenu($this->repos, '', false);
|
||||
@@ -282,14 +296,16 @@ class repo extends control
|
||||
* Browse repo.
|
||||
*
|
||||
* @param int $repoID
|
||||
* @param string $path
|
||||
* @param int $objectID
|
||||
* @param string $revision
|
||||
* @param int $refresh
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function browse($repoID = 0, $path = '', $revision = 'HEAD', $refresh = 0)
|
||||
public function browse($repoID = 0, $objectID = 0, $revision = 'HEAD', $refresh = 0)
|
||||
{
|
||||
$this->commonAction($objectID);
|
||||
|
||||
/* Get path and refresh. */
|
||||
if($this->get->repoPath) $path = $this->get->repoPath;
|
||||
if(empty($refresh) and $this->cookie->repoRefresh) $refresh = $this->cookie->repoRefresh;
|
||||
|
||||
Reference in New Issue
Block a user