Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -604,13 +604,13 @@ class custom extends control
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$after15mode = fixer::input('post')->get('after15mode');
|
||||
$this->loadModel('setting')->setItem('system.custom.after15mode', $after15mode);
|
||||
if($after15mode == 'new') $this->locate($this->createLink('upgrade', 'mergeTips'));
|
||||
$mode = fixer::input('post')->get('mode');
|
||||
$this->loadModel('setting')->setItem('system.common.global.mode', $mode);
|
||||
if($mode == 'new') $this->locate($this->createLink('upgrade', 'mergeTips'));
|
||||
}
|
||||
|
||||
$after15mode = zget($this->config->custom, 'after15mode', 'old');
|
||||
if($after15mode == 'new')
|
||||
$mode = zget($this->config->global, 'mode', 'old');
|
||||
if($mode == 'new')
|
||||
{
|
||||
if(isset($this->config->global->upgradeStep) and $this->config->global->upgradeStep == 'mergeProgram') $this->locate($this->createLink('upgrade', 'mergeProgram'));
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
{
|
||||
common::printLink('custom', $sysObject, "", "<span class='text'>{$lang->custom->$sysObject}</span>", '', "class='btn btn-link' id='{$sysObject}Tab'");
|
||||
}
|
||||
if(isset($config->custom->after15mode) and $config->custom->after15mode == 'old')
|
||||
if(isset($config->global->mode) and $config->global->mode == 'old')
|
||||
{
|
||||
common::printLink('custom', 'mode', "", "<span class='text'>{$lang->custom->mode}</span>", '', "class='btn btn-link' id='modeTab'");
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<tr>
|
||||
<th class='text-top'><?php echo $lang->custom->mode;?></th>
|
||||
<td>
|
||||
<p><label class="radio-inline"><input type="radio" name="after15mode" value="new" checked='checked' id="after15modenew"><?php echo $lang->upgrade->to15Mode['new'];?></label></p>
|
||||
<p><label class="radio-inline"><input type="radio" name="mode" value="new" checked='checked' id="modenew"><?php echo $lang->upgrade->to15Mode['new'];?></label></p>
|
||||
<p class='text-info'><?php echo $lang->upgrade->selectedModeTips['new'];?></p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<style>
|
||||
.main-table thead>tr>th:first-child{padding-left: 0px;}
|
||||
.main-table thead>tr>th:first-child {padding-left: 8px;}
|
||||
.table.has-sort-head thead>tr>th {padding-right: 8px;}
|
||||
</style>
|
||||
<div id="mainContent" class="main-row fade">
|
||||
<?php if(!empty($inputPersonnel)):?>
|
||||
|
||||
@@ -332,7 +332,7 @@ class product extends control
|
||||
$this->view->qdUsers = $qdUsers;
|
||||
$this->view->rdUsers = $rdUsers;
|
||||
$this->view->users = $this->user->getPairs('nodeleted|noclosed');
|
||||
$this->view->programs = array('') + $this->loadModel('program')->getTopPGMPairs();
|
||||
$this->view->programs = array('') + $this->loadModel('program')->getTopPGMPairs('', 'noclosed');
|
||||
$this->view->URSRPairs = $this->loadModel('custom')->getURSRPairs();
|
||||
|
||||
unset($this->lang->product->typeList['']);
|
||||
@@ -440,6 +440,7 @@ class product extends control
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locate));
|
||||
}
|
||||
|
||||
$productID = $this->product->saveState($productID, $this->products);
|
||||
$this->product->setMenu($this->products, $productID);
|
||||
|
||||
$moduleIndex = array_search('product', $this->lang->noMenuModule);
|
||||
|
||||
@@ -1844,7 +1844,7 @@ class program extends control
|
||||
* @param int $programID
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return array
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxCheckProduct($programID, $projectID)
|
||||
{
|
||||
@@ -1856,7 +1856,8 @@ class program extends control
|
||||
if($oldTopPGM == $newTopPGM) die();
|
||||
|
||||
$response = array();
|
||||
$response['result'] = true;
|
||||
$response['result'] = true;
|
||||
$response['message'] = $this->lang->program->changeProgramTip;
|
||||
|
||||
$multiLinkedProducts = $this->program->getMultiLinkedProducts($projectID);
|
||||
if($multiLinkedProducts)
|
||||
@@ -1870,10 +1871,6 @@ class program extends control
|
||||
$response['message'] = $multiLinkedProducts;
|
||||
$response['multiLinkedProjects'] = $multiLinkedProjects;
|
||||
}
|
||||
else
|
||||
{
|
||||
$response['message'] = $this->lang->program->changeProgramTip;
|
||||
}
|
||||
die(json_encode($response));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -442,15 +442,16 @@ class programModel extends model
|
||||
* Get top program pairs.
|
||||
*
|
||||
* @param string $model
|
||||
* @param string $mode
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getTopPGMPairs($model = '')
|
||||
public function getTopPGMPairs($model = '', $mode = '')
|
||||
{
|
||||
return $this->dao->select('id,name')->from(TABLE_PROGRAM)
|
||||
->where('type')->eq('program')
|
||||
->andWhere('grade')->eq(1)
|
||||
->andWhere('status')->ne('closed')
|
||||
->beginIF(strpos($mode, 'noclosed') !== false)->andWhere('status')->ne('closed')->fi()
|
||||
->andWhere('id')->in($this->app->user->view->programs)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->beginIF($model)->andWhere('model')->eq($model)->fi()
|
||||
|
||||
@@ -161,11 +161,11 @@ class upgrade extends control
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$after15mode = fixer::input('post')->get('after15mode');
|
||||
$this->loadModel('setting')->setItem('system.custom.after15mode', $after15mode);
|
||||
$mode = fixer::input('post')->get('mode');
|
||||
$this->loadModel('setting')->setItem('system.common.global.mode', $mode);
|
||||
|
||||
if($after15mode == 'old') $this->locate(inlink('afterExec', "fromVersion=$fromVersion"));
|
||||
if($after15mode == 'new') $this->locate(inlink('mergeTips'));
|
||||
if($mode == 'old') $this->locate(inlink('afterExec', "fromVersion=$fromVersion"));
|
||||
if($mode == 'new') $this->locate(inlink('mergeTips'));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->upgrade->to15Guide;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<div class='panel-body'>
|
||||
<div style='width:600px; margin: auto;'>
|
||||
<?php echo $lang->upgrade->to15Desc;?>
|
||||
<?php echo html::radio('after15mode', $lang->upgrade->to15Mode, 'old');?>
|
||||
<?php echo html::radio('mode', $lang->upgrade->to15Mode, 'old');?>
|
||||
<div id='selectedModeTips' class='text-info'><?php echo $lang->upgrade->selectedModeTips['old'];?></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -30,7 +30,7 @@
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('[name=after15mode]').change(function()
|
||||
$('[name=mode]').change(function()
|
||||
{
|
||||
$('#selectedModeTips').html(selectedModeTips[$(this).val()]);
|
||||
})
|
||||
|
||||
@@ -437,6 +437,7 @@ class userModel extends model
|
||||
$userID = $oldUser->id;
|
||||
$user = fixer::input('post')
|
||||
->setDefault('join', '0000-00-00')
|
||||
->setDefault('company', 0)
|
||||
->setIF($this->post->password1 != false, 'password', substr($this->post->password1, 0, 32))
|
||||
->setIF($this->post->email != false, 'email', trim($this->post->email))
|
||||
->remove('new, password1, password2, groups,verifyPassword, passwordStrength')
|
||||
@@ -1537,9 +1538,9 @@ class userModel extends model
|
||||
/* Init objects. */
|
||||
static $allProducts, $allPrograms, $allProjects, $allSprints, $teams, $stakeholders, $productWhiteList, $whiteList;
|
||||
if($allProducts === null) $allProducts = $this->dao->select('id,PO,QD,RD,createdBy,acl,whitelist,program,createdBy')->from(TABLE_PRODUCT)->where('acl')->ne('open')->fetchAll('id');
|
||||
if($allProjects === null) $allProjects = $this->dao->select('id,PO,PM,QD,RD,acl,type,parent,openedBy')->from(TABLE_PROJECT)->where('acl')->ne('open')->andWhere('type')->eq('project')->fetchAll('id');
|
||||
if($allPrograms === null) $allPrograms = $this->dao->select('id,PO,PM,QD,RD,acl,type,openedBy')->from(TABLE_PROJECT)->where('acl')->ne('open')->andWhere('type')->eq('program')->fetchAll('id');
|
||||
if($allSprints === null) $allSprints = $this->dao->select('id,PO,PM,QD,RD,acl,project,parent,type,openedBy')->from(TABLE_PROJECT)->where('acl')->eq('private')->andWhere('type')->in('sprint,stage')->fetchAll('id');
|
||||
if($allProjects === null) $allProjects = $this->dao->select('id,PO,PM,QD,RD,acl,type,path,parent,openedBy')->from(TABLE_PROJECT)->where('acl')->ne('open')->andWhere('type')->eq('project')->fetchAll('id');
|
||||
if($allPrograms === null) $allPrograms = $this->dao->select('id,PO,PM,QD,RD,acl,type,path,openedBy')->from(TABLE_PROJECT)->where('acl')->ne('open')->andWhere('type')->eq('program')->fetchAll('id');
|
||||
if($allSprints === null) $allSprints = $this->dao->select('id,PO,PM,QD,RD,acl,project,path,parent,type,openedBy')->from(TABLE_PROJECT)->where('acl')->eq('private')->andWhere('type')->in('sprint,stage')->fetchAll('id');
|
||||
|
||||
/* Get teams. */
|
||||
if($teams === null)
|
||||
|
||||
Reference in New Issue
Block a user