* task #69250#69251
This commit is contained in:
@@ -237,13 +237,14 @@ class install extends control
|
||||
$this->install->updateLang();
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
if($this->post->importDemoData) $this->install->importDemoData();
|
||||
// if($this->post->importDemoData) $this->install->importDemoData();
|
||||
|
||||
if($this->config->systemMode == 'lite')
|
||||
if($this->config->systemMode == 'lean')
|
||||
{
|
||||
/* lite mode create default program. */
|
||||
$programID = $this->loadModel('project')->createDefaultProgram();
|
||||
/* set default program config. */
|
||||
/* Lean mode create default program. */
|
||||
$programID = $this->loadModel('program')->createDefaultProgram();
|
||||
echo $programID;exit;
|
||||
/* Set default program config. */
|
||||
$this->loadModel('setting')->setItem('system.common.global.defaultProgram', $programID);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,89 +29,89 @@
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class='panel' style='padding:50px 280px'>
|
||||
<form method='post'>
|
||||
<h1 class='text-center'><?php echo $title;?></h1>
|
||||
<div class='main-row' id='mainContent'>
|
||||
<div class='main-col main-table'>
|
||||
<table class="table datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan='2'><?php echo $this->lang->upgrade->mode;?></th>
|
||||
<th colspan='2' class="text-center"><?php echo $this->lang->upgrade->to18Mode['lean'];?></th>
|
||||
<th colspan='2' class="text-center"><?php echo $this->lang->upgrade->to18Mode['new'];?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->mode;?></td>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->leanUsage;?></td>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->newUsage;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->program;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-close"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->productRR;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->productUR;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-close"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->productLine;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-close"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->projectScrum;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-close"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->projectWaterfull;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-close"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->projectKanban;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->execution;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->assetlib;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-close"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->oa;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' style="font-weight:bold;"><?php echo $this->lang->upgrade->selectUsage;?></td>
|
||||
<td colspan='2' class="text-center"><button class="btn" type="button" id='useLean'><?php echo $this->lang->upgrade->useLean;?></button></td>
|
||||
<td colspan='2' class="text-center"><button class="btn" type="button" id='useLean'><?php echo $this->lang->upgrade->useNew;?></button></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->remark;?></td>
|
||||
<td colspan='4' class="text-center"><?php echo $this->lang->upgrade->remarkDesc;?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<?php echo html::hidden('mode','')?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<form method='post'>
|
||||
<h1 class='text-center'><?php echo $title;?></h1>
|
||||
<div class='main-row' id='mainContent'>
|
||||
<div class='main-col main-table'>
|
||||
<table class="table datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan='2'><?php echo $this->lang->upgrade->mode;?></th>
|
||||
<th colspan='2' class="text-center"><?php echo $this->lang->upgrade->to18Mode['lean'];?></th>
|
||||
<th colspan='2' class="text-center"><?php echo $this->lang->upgrade->to18Mode['new'];?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->mode;?></td>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->leanUsage;?></td>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->newUsage;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->program;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-close"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->productRR;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->productUR;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-close"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->productLine;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-close"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->projectScrum;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-close"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->projectWaterfull;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-close"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->projectKanban;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->execution;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->assetlib;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-close"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->oa;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' style="font-weight:bold;"><?php echo $this->lang->upgrade->selectUsage;?></td>
|
||||
<td colspan='2' class="text-center"><button class="btn" type="button" id='useLean'><?php echo $this->lang->upgrade->useLean;?></button></td>
|
||||
<td colspan='2' class="text-center"><button class="btn" type="button" id='useLean'><?php echo $this->lang->upgrade->useNew;?></button></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->remark;?></td>
|
||||
<td colspan='4' class="text-center"><?php echo $this->lang->upgrade->remarkDesc;?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<?php echo html::hidden('mode','')?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
|
||||
@@ -95,8 +95,7 @@ $lang->my->form->lblAccount = 'Account Info';
|
||||
$lang->my->programLink = 'Program Default Page';
|
||||
$lang->my->productLink = 'Product Default Page';
|
||||
$lang->my->projectLink = 'Project Default Page';
|
||||
if($config->systemMode == 'lean') $lang->my->executionLink = $lang->executionCommon . ' Default Page';
|
||||
if($config->systemMode == 'new') $lang->my->executionLink = $lang->executionCommon . ' Default Page';
|
||||
$lang->my->executionLink = 'Execution Default Page';
|
||||
|
||||
$lang->my->programLinkList = array();
|
||||
$lang->my->programLinkList['program-browse'] = 'By default, you go to the program list, where you can view all of the programs';
|
||||
|
||||
@@ -95,8 +95,7 @@ $lang->my->form->lblAccount = 'Account Info';
|
||||
$lang->my->programLink = 'Program Default Page';
|
||||
$lang->my->productLink = 'Product Default Page';
|
||||
$lang->my->projectLink = 'Project Default Page';
|
||||
if($config->systemMode == 'lean') $lang->my->executionLink = $lang->executionCommon . ' Default Page';
|
||||
if($config->systemMode == 'new') $lang->my->executionLink = 'Execution Default Page';
|
||||
$lang->my->executionLink = 'Execution Default Page';
|
||||
|
||||
$lang->my->programLinkList = array();
|
||||
$lang->my->programLinkList['program-browse'] = 'By default, you go to the program list, where you can view all of the programs';
|
||||
|
||||
@@ -95,8 +95,7 @@ $lang->my->form->lblAccount = 'Account Info';
|
||||
$lang->my->programLink = 'Program Default Page';
|
||||
$lang->my->productLink = 'Product Default Page';
|
||||
$lang->my->projectLink = 'Project Default Page';
|
||||
if($config->systemMode == 'lean') $lang->my->executionLink = $lang->executionCommon . ' Default Page';
|
||||
if($config->systemMode == 'new') $lang->my->executionLink = $lang->executionCommon . ' Default Page';
|
||||
$lang->my->executionLink = 'Execution Default Page';
|
||||
|
||||
$lang->my->programLinkList = array();
|
||||
$lang->my->programLinkList['program-browse'] = 'By default, you go to the program list, where you can view all of the programs';
|
||||
|
||||
@@ -95,8 +95,7 @@ $lang->my->form->lblAccount = '帐号信息';
|
||||
$lang->my->programLink = '项目集默认着陆页';
|
||||
$lang->my->productLink = '产品默认着陆页';
|
||||
$lang->my->projectLink = '项目默认着陆页';
|
||||
if($config->systemMode == 'lean') $lang->my->executionLink = $lang->executionCommon . '默认着陆页';
|
||||
if($config->systemMode == 'new') $lang->my->executionLink = '执行默认着陆页';
|
||||
$lang->my->executionLink = '执行默认着陆页';
|
||||
|
||||
$lang->my->programLinkList = array();
|
||||
$lang->my->programLinkList['program-browse'] = '默认进入项目集列表,可以查看所有的项目集';
|
||||
|
||||
@@ -163,3 +163,5 @@ $lang->program->kanban->doingExecutions = 'Ongoing Executions';
|
||||
$lang->program->kanban->normalReleases = 'Normal Releases';
|
||||
|
||||
$lang->program->kanban->laneColorList = array('#32C5FF', '#006AF1', '#9D28B2', '#FF8F26', '#FFC20E', '#00A78E', '#7FBB00', '#424BAC', '#C0E9FF', '#EC2761');
|
||||
|
||||
$lang->program->defaultProgram = 'Default program';
|
||||
@@ -163,3 +163,5 @@ $lang->program->kanban->doingExecutions = 'Ongoing Executions';
|
||||
$lang->program->kanban->normalReleases = 'Normal Releases';
|
||||
|
||||
$lang->program->kanban->laneColorList = array('#32C5FF', '#006AF1', '#9D28B2', '#FF8F26', '#FFC20E', '#00A78E', '#7FBB00', '#424BAC', '#C0E9FF', '#EC2761');
|
||||
|
||||
$lang->program->defaultProgram = 'Default program';
|
||||
@@ -163,3 +163,5 @@ $lang->program->kanban->doingExecutions = 'Ongoing Executions';
|
||||
$lang->program->kanban->normalReleases = 'Normal Releases';
|
||||
|
||||
$lang->program->kanban->laneColorList = array('#32C5FF', '#006AF1', '#9D28B2', '#FF8F26', '#FFC20E', '#00A78E', '#7FBB00', '#424BAC', '#C0E9FF', '#EC2761');
|
||||
|
||||
$lang->program->defaultProgram = 'Default program';
|
||||
@@ -163,3 +163,5 @@ $lang->program->kanban->doingExecutions = '进行中的执行';
|
||||
$lang->program->kanban->normalReleases = '正常的发布';
|
||||
|
||||
$lang->program->kanban->laneColorList = array('#32C5FF', '#006AF1', '#9D28B2', '#FF8F26', '#FFC20E', '#00A78E', '#7FBB00', '#424BAC', '#C0E9FF', '#EC2761');
|
||||
|
||||
$lang->program->defaultProgram = '默认项目集';
|
||||
@@ -1590,4 +1590,35 @@ class programModel extends model
|
||||
}
|
||||
return $menu;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create default program.
|
||||
*
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function createDefaultProgram()
|
||||
{
|
||||
$minBegin = $this->dao->select('min(begin) as min')->from(TABLE_PROJECT)->where('deleted')->eq(0)->fetch('min');
|
||||
$program = new stdClass();
|
||||
|
||||
$program->type = 'program';
|
||||
$program->name = $this->lang->program->defaultProgram;
|
||||
$program->budgetUnit = 'CNY';
|
||||
$program->whitelist = '';
|
||||
$program->status = 'doing';
|
||||
$program->grade = 1;
|
||||
$program->auth = 'extend';
|
||||
$program->openedDate = $minBegin;
|
||||
$program->begin = helper::today();
|
||||
$program->end = LONG_TIME;
|
||||
|
||||
$this->dao->insert(TABLE_PROGRAM)->data($program)->exec();
|
||||
|
||||
$insertID = $this->dao->lastInsertId();
|
||||
|
||||
$this->dao->update(TABLE_PROGRAM)->set('path')->eq(",$insertID,")->where('id')->eq($insertID)->exec();
|
||||
|
||||
return $insertID;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -334,6 +334,4 @@ $lang->project->childLongTime = "If a child as long-term projects, the pa
|
||||
$lang->project->confirmUnlinkMember = "Do you want to remove this user from project?";
|
||||
|
||||
$lang->project->action = new stdclass();
|
||||
$lang->project->action->managed = '$date, managed by <strong>$actor</strong>. $extra' . "\n";
|
||||
|
||||
$lang->project->defaultProgram = 'Default program';
|
||||
$lang->project->action->managed = '$date, managed by <strong>$actor</strong>. $extra' . "\n";
|
||||
@@ -334,6 +334,4 @@ $lang->project->childLongTime = "There are long-term projects in the child
|
||||
$lang->project->confirmUnlinkMember = "Do you want to remove this user from project?";
|
||||
|
||||
$lang->project->action = new stdclass();
|
||||
$lang->project->action->managed = '$date, managed by <strong>$actor</strong>. $extra' . "\n";
|
||||
|
||||
$lang->project->defaultProgram = 'Default program';
|
||||
$lang->project->action->managed = '$date, managed by <strong>$actor</strong>. $extra' . "\n";
|
||||
@@ -334,6 +334,4 @@ $lang->project->childLongTime = "If a child as long-term projects, the pa
|
||||
$lang->project->confirmUnlinkMember = "Do you want to remove this user from project?";
|
||||
|
||||
$lang->project->action = new stdclass();
|
||||
$lang->project->action->managed = '$date, managed by <strong>$actor</strong>. $extra' . "\n";
|
||||
|
||||
$lang->project->defaultProgram = 'Default program';
|
||||
$lang->project->action->managed = '$date, managed by <strong>$actor</strong>. $extra' . "\n";
|
||||
@@ -334,6 +334,4 @@ $lang->project->childLongTime = "子项目中有长期项目,父项目
|
||||
$lang->project->confirmUnlinkMember = "您确定从该项目中移除该用户吗?";
|
||||
|
||||
$lang->project->action = new stdclass();
|
||||
$lang->project->action->managed = '$date, 由 <strong>$actor</strong> 维护。$extra' . "\n";
|
||||
|
||||
$lang->project->defaultProgram = '默认项目集';
|
||||
$lang->project->action->managed = '$date, 由 <strong>$actor</strong> 维护。$extra' . "\n";
|
||||
@@ -2630,29 +2630,4 @@ class projectModel extends model
|
||||
|
||||
return $menu;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create default program.
|
||||
*
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function createDefaultProgram()
|
||||
{
|
||||
$program = new stdClass();
|
||||
|
||||
$program->type = 'program';
|
||||
$program->name = $this->lang->project->defaultProgram;
|
||||
$program->budgetUnit = 'CNY';
|
||||
$program->whitelist = '';
|
||||
$program->status = 'doing';
|
||||
$program->grade = 1;
|
||||
$program->openedDate = helper::now();
|
||||
$program->begin = helper::today();
|
||||
$program->end = LONG_TIME;
|
||||
|
||||
$this->dao->insert(TABLE_PROGRAM)->data($program)->exec();
|
||||
|
||||
return $this->dao->lastInsertId();
|
||||
}
|
||||
}
|
||||
|
||||
+19
-13
@@ -117,7 +117,6 @@ class upgrade extends control
|
||||
$this->view->position[] = $this->lang->upgrade->common;
|
||||
$this->view->confirm = $this->upgrade->getConfirm($this->post->fromVersion);
|
||||
$this->view->fromVersion = $this->post->fromVersion;
|
||||
|
||||
/* When sql is empty then skip it. */
|
||||
if(empty($this->view->confirm)) $this->locate(inlink('execute', "fromVersion={$this->post->fromVersion}"));
|
||||
|
||||
@@ -159,13 +158,20 @@ class upgrade extends control
|
||||
|
||||
$openVersion = $this->upgrade->getOpenVersion(str_replace('.', '_', $fromVersion));
|
||||
$selectMode = true;
|
||||
if(version_compare($openVersion, '15_0', '>=') and version_compare($openVersion, '18_0', '<=') and $systemMode == 'classic') $selectMode = false;
|
||||
if(version_compare($openVersion, '15_0', '>=') and version_compare($openVersion, '18_0', '<=') and $systemMode != 'new')
|
||||
{
|
||||
$this->loadModel('setting')->setItem('system.common.global.mode', 'lean');
|
||||
/* Lean mode create default program. */
|
||||
$programID = $this->loadModel('program')->createDefaultProgram();
|
||||
/* Set default program config. */
|
||||
$this->loadModel('setting')->setItem('system.common.global.defaultProgram', $programID);
|
||||
/* 只有没有关联项目集的产品和项目关联到默认项目集下. */
|
||||
$this->upgrade->relationDefaultProgram($programID);
|
||||
$selectMode = false;
|
||||
}
|
||||
if(version_compare($openVersion, '18_0', '>')) $selectMode = false;
|
||||
|
||||
if($selectMode)
|
||||
{
|
||||
$this->locate(inlink('to18Guide', "fromVersion=$fromVersion"));
|
||||
}
|
||||
if($selectMode) $this->locate(inlink('to18Guide', "fromVersion=$fromVersion"));
|
||||
|
||||
$this->locate(inlink('afterExec', "fromVersion=$fromVersion"));
|
||||
}
|
||||
@@ -241,25 +247,25 @@ class upgrade extends control
|
||||
$sprintConcept = 0;
|
||||
if(isset($this->config->custom->sprintConcept))
|
||||
{
|
||||
if($this->config->custom->sprintConcept == 2 and $mode == 'new') $sprintConcept = 1;
|
||||
if($this->config->custom->sprintConcept == 2) $sprintConcept = 1;
|
||||
}
|
||||
elseif(isset($this->config->custom->productProject))
|
||||
{
|
||||
list($productConcept, $projectConcept) = explode('_', $this->config->custom->productProject);
|
||||
if($mode == 'classic') $sprintConcept = $projectConcept;
|
||||
if($mode == 'new' and $projectConcept == 2) $sprintConcept = 1;
|
||||
if($projectConcept == 2) $sprintConcept = 1;
|
||||
}
|
||||
$this->setting->setItem('system.custom.sprintConcept', $sprintConcept);
|
||||
|
||||
if($mode == 'lean')
|
||||
{
|
||||
/* lite mode create default program. */
|
||||
$programID = $this->loadModel('project')->createDefaultProgram();
|
||||
/* set default program config. */
|
||||
/* Lean mode create default program. */
|
||||
$programID = $this->loadModel('program')->createDefaultProgram();
|
||||
/* Set default program config. */
|
||||
$this->loadModel('setting')->setItem('system.common.global.defaultProgram', $programID);
|
||||
|
||||
/* 只有没有关联项目集的产品和项目关联到默认项目集下. */
|
||||
$this->upgrade->relationDefaultProgram($programID);
|
||||
$openVersion = $this->upgrade->getOpenVersion(str_replace('.', '_', $fromVersion));
|
||||
if(version_compare($openVersion, '15_0', '<')) $this->locate(inlink('mergeTips'));
|
||||
|
||||
$this->locate(inlink('afterExec', "fromVersion=$fromVersion"));
|
||||
}
|
||||
|
||||
@@ -7539,36 +7539,17 @@ class upgradeModel extends model
|
||||
public function relationDefaultProgram($programID)
|
||||
{
|
||||
/* product */
|
||||
$noRelationProduct = $this->dao->select('id')->from(TABLE_PRODUCT)->where('program')->eq(0)->fetchPairs('id');
|
||||
if(!empty($noRelationProduct))
|
||||
{
|
||||
foreach($noRelationProduct as $productID)
|
||||
{
|
||||
$this->dao->update(TABLE_PRODUCT)->set('program')->eq($programID)->where('id')->eq($productID)->exec();
|
||||
}
|
||||
}
|
||||
$this->dao->update(TABLE_PRODUCT)
|
||||
->set('program')->eq($programID)
|
||||
->where('program')->eq(0)
|
||||
->exec();
|
||||
|
||||
/* project */
|
||||
$noRelationProject = $this->dao->select('id,path')->from(TABLE_PROJECT)->where('type')->eq('project')->andWhere('parent')->eq(0)->andWhere('grade')->eq(1)->fetchAll();
|
||||
if(!empty($noRelationProject))
|
||||
{
|
||||
foreach($noRelationProject as $project)
|
||||
{
|
||||
$path = ",{$programID}" . $project->path;
|
||||
$this->dao->update(TABLE_PROJECT)
|
||||
->set('parent')->eq($programID)
|
||||
->set('path')->eq($path)
|
||||
->set('grade = grade+1')
|
||||
->where('id')->eq($project->id)->exec();
|
||||
|
||||
/* Update children. */
|
||||
$this->dao->update(TABLE_PROJECT)
|
||||
->set("path = CONCAT(',{$programID}', path)")
|
||||
->set('grade = grade+1')
|
||||
->where('path')->like(",$project->id,%")
|
||||
->exec();
|
||||
}
|
||||
}
|
||||
$this->dao->update(TABLE_PROJECT)
|
||||
->set("path = CONCAT(',{$programID}', path)")
|
||||
->set('grade = grade+1')
|
||||
->where('type')->eq('project')->andWhere('parent')->eq(0)->andWhere('grade')->eq(1)
|
||||
->exec();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -12,90 +12,90 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<div class='container'>
|
||||
<div class='panel' style='padding:50px 280px'>
|
||||
<form method='post'>
|
||||
<h1 class='text-center'><?php echo $title;?></h1>
|
||||
<div class='main-row' id='mainContent'>
|
||||
<div class='main-col main-table'>
|
||||
<table class="table datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan='2'><?php echo $this->lang->upgrade->mode;?></th>
|
||||
<th colspan='2' class="text-center"><?php echo $this->lang->upgrade->to18Mode['lean'];?></th>
|
||||
<th colspan='2' class="text-center"><?php echo $this->lang->upgrade->to18Mode['new'];?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->mode;?></td>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->leanUsage;?></td>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->newUsage;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->program;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-close"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->productRR;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->productUR;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-close"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->productLine;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-close"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->projectScrum;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-close"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->projectWaterfull;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-close"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->projectKanban;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->execution;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->assetlib;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-close"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->oa;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' style="font-weight:bold;"><?php echo $this->lang->upgrade->selectUsage;?></td>
|
||||
<td colspan='2' class="text-center"><button class="btn" type="button" id='useLean'><?php echo $this->lang->upgrade->useLean;?></button></td>
|
||||
<td colspan='2' class="text-center"><button class="btn" type="button" id='useLean'><?php echo $this->lang->upgrade->useNew;?></button></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->remark;?></td>
|
||||
<td colspan='4' class="text-center"><?php echo $this->lang->upgrade->remarkDesc;?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<?php echo html::hidden('mode','')?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class='panel' style='padding:50px 280px'>
|
||||
<form method='post'>
|
||||
<h1 class='text-center'><?php echo $title;?></h1>
|
||||
<div class='main-row' id='mainContent'>
|
||||
<div class='main-col main-table'>
|
||||
<table class="table datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan='2'><?php echo $this->lang->upgrade->mode;?></th>
|
||||
<th colspan='2' class="text-center"><?php echo $this->lang->upgrade->to18Mode['lean'];?></th>
|
||||
<th colspan='2' class="text-center"><?php echo $this->lang->upgrade->to18Mode['new'];?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->mode;?></td>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->leanUsage;?></td>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->newUsage;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->program;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-close"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->productRR;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->productUR;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-close"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->productLine;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-close"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->projectScrum;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-close"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->projectWaterfull;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-close"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->projectKanban;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->execution;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->assetlib;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-close"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->oa;?></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
<td colspan='2' class="text-center"><i class="icon icon-2x icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' style="font-weight:bold;"><?php echo $this->lang->upgrade->selectUsage;?></td>
|
||||
<td colspan='2' class="text-center"><button class="btn" type="button" id='useLean'><?php echo $this->lang->upgrade->useLean;?></button></td>
|
||||
<td colspan='2' class="text-center"><button class="btn" type="button" id='useLean'><?php echo $this->lang->upgrade->useNew;?></button></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'><?php echo $this->lang->upgrade->remark;?></td>
|
||||
<td colspan='4' class="text-center"><?php echo $this->lang->upgrade->remarkDesc;?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<?php echo html::hidden('mode','')?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user