Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -196,7 +196,6 @@ class productplanModel extends model
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->beginIF($branch !== '')->andWhere('t1.branch')->in($branch)->fi()
|
||||
->beginIF($expired == 'unexpired')->andWhere('t1.end')->ge($date)->fi()
|
||||
->beginIF($skipParent)->andWhere('t1.parent')->ne(-1)->fi()
|
||||
->orderBy('t1.begin desc')
|
||||
->fetchAll('id');
|
||||
|
||||
@@ -206,7 +205,11 @@ class productplanModel extends model
|
||||
$this->app->loadLang('branch');
|
||||
foreach($plans as $plan)
|
||||
{
|
||||
if($plan->parent == '-1') $parentTitle[$plan->id] = $plan->title;
|
||||
if($plan->parent == '-1')
|
||||
{
|
||||
$parentTitle[$plan->id] = $plan->title;
|
||||
if($skipParent) continue;
|
||||
}
|
||||
if($plan->parent > 0 and isset($parentTitle[$plan->parent])) $plan->title = $parentTitle[$plan->parent] . ' /' . $plan->title;
|
||||
$planPairs[$plan->id] = $plan->title . " [{$plan->begin} ~ {$plan->end}]";
|
||||
if($plan->begin == $this->config->productplan->future and $plan->end == $this->config->productplan->future) $planPairs[$plan->id] = $plan->title . ' ' . $this->lang->productplan->future;
|
||||
@@ -234,7 +237,6 @@ class productplanModel extends model
|
||||
->andWhere('deleted')->eq(0)
|
||||
->beginIF(strpos($param, 'unexpired') !== false)->andWhere('end')->ge($date)->fi()
|
||||
->beginIF($branch !== 'all' or $branch !== '')->andWhere("branch")->in($branch)->fi()
|
||||
->beginIF(strpos($param, 'skipparent') !== false)->andWhere('parent')->ne(-1)->fi()
|
||||
->orderBy('begin desc')
|
||||
->fetchAll('id');
|
||||
|
||||
@@ -243,7 +245,11 @@ class productplanModel extends model
|
||||
$parentTitle = array();
|
||||
foreach($plans as $plan)
|
||||
{
|
||||
if($plan->parent == '-1') $parentTitle[$plan->id] = $plan->title;
|
||||
if($plan->parent == '-1')
|
||||
{
|
||||
$parentTitle[$plan->id] = $plan->title;
|
||||
if(strpos($param, 'skipparent') !== false) continue;
|
||||
}
|
||||
if($plan->parent > 0 and isset($parentTitle[$plan->parent])) $plan->title = $parentTitle[$plan->parent] . ' /' . $plan->title;
|
||||
$planPairs[$plan->id] = $plan->title . " [{$plan->begin} ~ {$plan->end}]";
|
||||
if($plan->begin == $this->config->productplan->future and $plan->end == $this->config->productplan->future) $planPairs[$plan->id] = $plan->title . ' ' . $this->lang->productplan->future;
|
||||
|
||||
@@ -160,7 +160,7 @@ $lang->project->modelList['scrum'] = "Scrum";
|
||||
$lang->project->modelList['waterfall'] = "CMMI";
|
||||
|
||||
$lang->project->featureBar['all'] = 'All';
|
||||
$lang->project->featureBar['doing'] = 'Going';
|
||||
$lang->project->featureBar['doing'] = 'Doing';
|
||||
$lang->project->featureBar['wait'] = 'Waiting';
|
||||
$lang->project->featureBar['suspended'] = 'Suspended';
|
||||
$lang->project->featureBar['closed'] = 'Closed';
|
||||
|
||||
@@ -225,7 +225,7 @@ $lang->project->modelList['waterfall'] = "CMMI";
|
||||
$lang->project->modelList['kanban'] = "Kanban";
|
||||
|
||||
$lang->project->featureBar['all'] = 'All';
|
||||
$lang->project->featureBar['doing'] = 'Going';
|
||||
$lang->project->featureBar['doing'] = 'Doing';
|
||||
$lang->project->featureBar['wait'] = 'Waiting';
|
||||
$lang->project->featureBar['suspended'] = 'Suspended';
|
||||
$lang->project->featureBar['closed'] = 'Closed';
|
||||
|
||||
@@ -160,7 +160,7 @@ $lang->project->modelList['scrum'] = "Scrum";
|
||||
$lang->project->modelList['waterfall'] = "CMMI";
|
||||
|
||||
$lang->project->featureBar['all'] = 'All';
|
||||
$lang->project->featureBar['doing'] = 'Going';
|
||||
$lang->project->featureBar['doing'] = 'Doing';
|
||||
$lang->project->featureBar['wait'] = 'Waiting';
|
||||
$lang->project->featureBar['suspended'] = 'Suspended';
|
||||
$lang->project->featureBar['closed'] = 'Closed';
|
||||
|
||||
@@ -160,7 +160,7 @@ $lang->project->modelList['scrum'] = "Scrum";
|
||||
$lang->project->modelList['waterfall'] = "CMMI";
|
||||
|
||||
$lang->project->featureBar['all'] = 'All';
|
||||
$lang->project->featureBar['doing'] = 'Going';
|
||||
$lang->project->featureBar['doing'] = 'Doing';
|
||||
$lang->project->featureBar['wait'] = 'Waiting';
|
||||
$lang->project->featureBar['suspended'] = 'Suspended';
|
||||
$lang->project->featureBar['closed'] = 'Closed';
|
||||
|
||||
@@ -894,7 +894,7 @@ class upgrade extends control
|
||||
$command = $response['command'];
|
||||
}
|
||||
|
||||
if($result == 'success') $this->locate($this->inlink('afterExec', "fromVersion=$fromVersion&processed=yes&skipConfirm=yes"));
|
||||
if($result == 'success') $this->locate($this->inlink('afterExec', "fromVersion=$fromVersion&processed=no&skipMoveFile=yes"));
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->upgrade->common;
|
||||
|
||||
@@ -662,6 +662,11 @@ class user extends control
|
||||
if($this->post->account) $this->user->batchEdit();
|
||||
return print(js::locate($this->session->userList ? $this->session->userList : $this->createLink('company', 'browse', "deptID=$deptID"), 'parent'));
|
||||
}
|
||||
else
|
||||
{
|
||||
return print(js::locate($this->session->userList ? $this->session->userList : $this->createLink('company', 'browse', "deptID=$deptID"), 'parent'));
|
||||
}
|
||||
|
||||
$this->lang->user->menu = $this->lang->company->menu;
|
||||
$this->lang->user->menuOrder = $this->lang->company->menuOrder;
|
||||
|
||||
|
||||
@@ -638,7 +638,7 @@ class userModel extends model
|
||||
public function batchEdit()
|
||||
{
|
||||
$data = fixer::input('post')->get();
|
||||
if(empty($_POST['verifyPassword']) or $this->post->verifyPassword != md5($this->app->user->password . $this->session->rand)) return print(js::alert($this->lang->user->error->verifyPassword));
|
||||
if(empty($_POST['verifyPassword']) or $this->post->verifyPassword != md5($this->app->user->password . $this->session->rand)) helper::end(js::alert($this->lang->user->error->verifyPassword));
|
||||
|
||||
$oldUsers = $this->dao->select('id, account, email')->from(TABLE_USER)->where('id')->in(array_keys($data->account))->fetchAll('id');
|
||||
$accountGroup = $this->dao->select('id, account')->from(TABLE_USER)->where('account')->in($data->account)->fetchGroup('account', 'id');
|
||||
@@ -675,7 +675,7 @@ class userModel extends model
|
||||
if(!isset($users[$id][$field])) continue;
|
||||
if(!empty($users[$id][$field])) continue;
|
||||
|
||||
return print(js::error(sprintf($this->lang->error->notempty, $this->lang->user->$field)));
|
||||
helper::end(js::error(sprintf($this->lang->error->notempty, $this->lang->user->$field)));
|
||||
}
|
||||
|
||||
if(!empty($this->config->user->batchAppendFields))
|
||||
@@ -690,11 +690,11 @@ class userModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($accountGroup[$account]) and count($accountGroup[$account]) > 1) return print(js::error(sprintf($this->lang->user->error->accountDupl, $id)));
|
||||
if(in_array($account, $accounts)) return print(js::error(sprintf($this->lang->user->error->accountDupl, $id)));
|
||||
if(!validater::checkAccount($users[$id]['account'])) return print(js::error(sprintf($this->lang->user->error->account, $id)));
|
||||
if($users[$id]['realname'] == '') return print(js::error(sprintf($this->lang->user->error->realname, $id)));
|
||||
if($users[$id]['email'] and !validater::checkEmail($users[$id]['email'])) return print(js::error(sprintf($this->lang->user->error->mail, $id)));
|
||||
if(isset($accountGroup[$account]) and count($accountGroup[$account]) > 1) helper::end(js::error(sprintf($this->lang->user->error->accountDupl, $id)));
|
||||
if(in_array($account, $accounts)) helper::end(js::error(sprintf($this->lang->user->error->accountDupl, $id)));
|
||||
if(!validater::checkAccount($users[$id]['account'])) helper::end(js::error(sprintf($this->lang->user->error->account, $id)));
|
||||
if($users[$id]['realname'] == '') helper::end(js::error(sprintf($this->lang->user->error->realname, $id)));
|
||||
if($users[$id]['email'] and !validater::checkEmail($users[$id]['email'])) helper::end(js::error(sprintf($this->lang->user->error->mail, $id)));
|
||||
|
||||
$accounts[$id] = $account;
|
||||
$prev['dept'] = $users[$id]['dept'];
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<th class='w-150px<?php echo zget($visibleFields, 'dept', ' hidden')?>'> <?php echo $lang->user->dept;?></th>
|
||||
<th class='<?php echo $minWidth?> required'><?php echo $lang->user->account;?></th>
|
||||
<th class='<?php echo $minWidth?> required'><?php echo $lang->user->realname;?></th>
|
||||
<th class='w-130px'><?php echo $lang->user->visions;?></th>
|
||||
<th class='w-130px required'><?php echo $lang->user->visions;?></th>
|
||||
<th class='w-120px'><?php echo $lang->user->role;?></th>
|
||||
<th class='w-120px'><?php echo $lang->user->type;?></th>
|
||||
<th class='<?php echo $minWidth . zget($visibleFields, 'commiter', ' hidden')?>'><?php echo $lang->user->commiter;?></th>
|
||||
|
||||
Reference in New Issue
Block a user