Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@ if(!class_exists('config')){class config{}}
|
||||
if(!function_exists('getWebRoot')){function getWebRoot(){}}
|
||||
|
||||
/* 基本设置。Basic settings. */
|
||||
$config->version = '20.0.alpha1'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it.
|
||||
$config->version = '20.0.beta1'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it.
|
||||
$config->charset = 'UTF-8'; // ZenTaoPHP的编码。 The encoding of ZenTaoPHP.
|
||||
$config->cookieLife = time() + 2592000; // Cookie的生存时间。The cookie life time.
|
||||
$config->timezone = 'Asia/Shanghai'; // 时区设置。 The time zone setting, for more see http://www.php.net/manual/en/timezones.php.
|
||||
|
||||
@@ -1668,6 +1668,7 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(1, 'productplan', 'unlinkBug'),
|
||||
(1, 'productplan', 'unlinkStory'),
|
||||
(1, 'productplan', 'view'),
|
||||
(1, 'program', 'view'),
|
||||
(1, 'project', 'activate'),
|
||||
(1, 'project', 'batchedit'),
|
||||
(1, 'project', 'batchUnlinkStory'),
|
||||
|
||||
@@ -951,7 +951,7 @@ class baseFixer
|
||||
public function cleanFloat($fieldName)
|
||||
{
|
||||
$fields = $this->processFields($fieldName);
|
||||
foreach($fields as $fieldName) $this->data->$fieldName = filter_var($this->data->$fieldName, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION|FILTER_FLAG_ALLOW_THOUSAND);
|
||||
foreach($fields as $fieldName) $this->data->$fieldName = (float)filter_var($this->data->$fieldName, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION|FILTER_FLAG_ALLOW_THOUSAND);
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -971,7 +971,7 @@ class baseFixer
|
||||
$filterVar = filter_var($this->data->$fieldName, FILTER_SANITIZE_NUMBER_INT);
|
||||
if(empty($filterVar)) $filterVar = 0;
|
||||
|
||||
$this->data->$fieldName = $filterVar;
|
||||
$this->data->$fieldName = (int)$filterVar;
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -37,3 +37,5 @@ $config->action->majorList['release'] = array('opened');
|
||||
$config->action->majorList['build'] = array('opened');
|
||||
$config->action->majorList['product'] = array('opened', 'edited');
|
||||
$config->action->majorList['project'] = array('opened', 'edited');
|
||||
|
||||
$config->action->needGetPRJType = 'story,build,task,bug,case,testcase,caselib,testtask,testsuite,testreport,doc,issue,release,risk,design';
|
||||
|
||||
@@ -89,7 +89,6 @@ $lang->action->objectTypes['caselib'] = 'Bibliothek';
|
||||
$lang->action->objectTypes['testreport'] = 'Berichte';
|
||||
$lang->action->objectTypes['entry'] = 'Eintrag';
|
||||
$lang->action->objectTypes['stakeholder'] = 'Stakeholder';
|
||||
$lang->action->objectTypes['expect'] = 'Expect';
|
||||
$lang->action->objectTypes['webhook'] = 'Webhook';
|
||||
|
||||
/* 用来描述操作历史记录。*/
|
||||
@@ -427,7 +426,7 @@ $lang->action->label->space = ' ';
|
||||
$lang->action->label->risk = 'Risk|risk|view|riskID=%s';
|
||||
$lang->action->label->issue = 'Issue|issue|view|issueID=%s';
|
||||
$lang->action->label->design = 'Design|design|view|designID=%s';
|
||||
$lang->action->label->stakeholder = 'Stakeholder|stakeholder|browse|';
|
||||
$lang->action->label->stakeholder = 'Stakeholder|stakeholder|view|userID=%s';
|
||||
|
||||
/* Object type. */
|
||||
$lang->action->search->objectTypeList[''] = '';
|
||||
|
||||
@@ -89,7 +89,6 @@ $lang->action->objectTypes['caselib'] = 'Library';
|
||||
$lang->action->objectTypes['testreport'] = 'Report';
|
||||
$lang->action->objectTypes['entry'] = 'Entry';
|
||||
$lang->action->objectTypes['stakeholder'] = 'Stakeholder';
|
||||
$lang->action->objectTypes['expect'] = 'Expect';
|
||||
$lang->action->objectTypes['webhook'] = 'Webhook';
|
||||
|
||||
/* Used to describe operation history. */
|
||||
@@ -427,7 +426,7 @@ $lang->action->label->space = ' ';
|
||||
$lang->action->label->risk = 'Risk|risk|view|riskID=%s';
|
||||
$lang->action->label->issue = 'Issue|issue|view|issueID=%s';
|
||||
$lang->action->label->design = 'Design|design|view|designID=%s';
|
||||
$lang->action->label->stakeholder = 'Stakeholder|stakeholder|browse|';
|
||||
$lang->action->label->stakeholder = 'Stakeholder|stakeholder|view|userID=%s';
|
||||
|
||||
/* Object type. */
|
||||
$lang->action->search->objectTypeList[''] = '';
|
||||
|
||||
@@ -89,7 +89,6 @@ $lang->action->objectTypes['caselib'] = 'Library';
|
||||
$lang->action->objectTypes['testreport'] = 'Edition';
|
||||
$lang->action->objectTypes['entry'] = 'Entrée';
|
||||
$lang->action->objectTypes['stakeholder'] = 'Stakeholder';
|
||||
$lang->action->objectTypes['expect'] = 'Expect';
|
||||
$lang->action->objectTypes['webhook'] = 'Webhook';
|
||||
|
||||
/* 用来描述操作历史记录。*/
|
||||
@@ -427,7 +426,7 @@ $lang->action->label->space = ' ';
|
||||
$lang->action->label->risk = 'Risk|risk|view|riskID=%s';
|
||||
$lang->action->label->issue = 'Issue|issue|view|issueID=%s';
|
||||
$lang->action->label->design = 'Design|design|view|designID=%s';
|
||||
$lang->action->label->stakeholder = 'Stakeholder|stakeholder|browse|';
|
||||
$lang->action->label->stakeholder = 'Stakeholder|stakeholder|view|userID=%s';
|
||||
|
||||
/* Object type. */
|
||||
$lang->action->search->objectTypeList[''] = '';
|
||||
|
||||
@@ -89,7 +89,6 @@ $lang->action->objectTypes['caselib'] = 'Thư viện';
|
||||
$lang->action->objectTypes['testreport'] = 'Báo cáo';
|
||||
$lang->action->objectTypes['entry'] = 'Entry';
|
||||
$lang->action->objectTypes['stakeholder'] = 'Stakeholder';
|
||||
$lang->action->objectTypes['expect'] = 'Expect';
|
||||
$lang->action->objectTypes['webhook'] = 'Webhook';
|
||||
|
||||
/* Used to describe operation history. */
|
||||
@@ -427,7 +426,7 @@ $lang->action->label->space = ' ';
|
||||
$lang->action->label->risk = 'Risk|risk|view|riskID%s';
|
||||
$lang->action->label->issue = 'Issue|issue|view|issueID=%s';
|
||||
$lang->action->label->design = 'Design|design|view|designID=%s';
|
||||
$lang->action->label->stakeholder = 'Stakeholder|stakeholder|browse|';
|
||||
$lang->action->label->stakeholder = 'Stakeholder|stakeholder|view|userID=%s';
|
||||
|
||||
/* Object type. */
|
||||
$lang->action->search->objectTypeList[''] = '';
|
||||
|
||||
@@ -89,7 +89,6 @@ $lang->action->objectTypes['caselib'] = '用例库';
|
||||
$lang->action->objectTypes['testreport'] = '报告';
|
||||
$lang->action->objectTypes['entry'] = '应用';
|
||||
$lang->action->objectTypes['stakeholder'] = '干系人';
|
||||
$lang->action->objectTypes['expect'] = '期望';
|
||||
$lang->action->objectTypes['webhook'] = 'Webhook';
|
||||
|
||||
/* 用来描述操作历史记录。*/
|
||||
@@ -427,7 +426,7 @@ $lang->action->label->space = ' ';
|
||||
$lang->action->label->risk = '风险|risk|view|riskID=%s';
|
||||
$lang->action->label->issue = '问题|issue|view|issueID=%s';
|
||||
$lang->action->label->design = '设计|design|view|designID=%s';
|
||||
$lang->action->label->stakeholder = '干系人|stakeholder|browse|';
|
||||
$lang->action->label->stakeholder = '干系人|stakeholder|view|userID=%s';
|
||||
|
||||
/* Object type. */
|
||||
$lang->action->search->objectTypeList[''] = '';
|
||||
|
||||
@@ -89,7 +89,6 @@ $lang->action->objectTypes['caselib'] = '用例庫';
|
||||
$lang->action->objectTypes['testreport'] = '報告';
|
||||
$lang->action->objectTypes['entry'] = '應用';
|
||||
$lang->action->objectTypes['stakeholder'] = '干係人';
|
||||
$lang->action->objectTypes['expect'] = '期望';
|
||||
$lang->action->objectTypes['webhook'] = 'Webhook';
|
||||
|
||||
/* 用來描述操作歷史記錄。*/
|
||||
@@ -414,7 +413,7 @@ $lang->action->label->webhook = 'Webhook|webhook|browse|';
|
||||
$lang->action->label->space = ' ';
|
||||
$lang->action->label->risk = '風險|risk|view|riskID=%s';
|
||||
$lang->action->label->design = '設計|design|view|designID=%s';
|
||||
$lang->action->label->stakeholder = '干係人|stakeholder|browse|';
|
||||
$lang->action->label->stakeholder = '干係人|stakeholder|view|userID=%s';
|
||||
|
||||
/* Object type. */
|
||||
$lang->action->search->objectTypeList[''] = '';
|
||||
|
||||
@@ -806,8 +806,7 @@ class actionModel extends model
|
||||
$field = $this->config->action->objectNameFields[$objectType];
|
||||
if($table != TABLE_TODO)
|
||||
{
|
||||
$needGetPRJType = 'story,build,task,bug,case,testcase,caselib,testtask,testsuite,testreport,doc,issue,release,risk,design';
|
||||
if(strpos($needGetPRJType, $objectType) !== false)
|
||||
if(strpos($this->config->action->needGetPRJType, $objectType) !== false)
|
||||
{
|
||||
$objectInfo = $this->dao->select("id, PRJ, $field AS name")->from($table)->where('id')->in($objectIds)->fetchAll();
|
||||
foreach($objectInfo as $object)
|
||||
@@ -816,7 +815,7 @@ class actionModel extends model
|
||||
$objectPRJ[$object->id] = $object->PRJ;
|
||||
}
|
||||
}
|
||||
elseif($objectType == 'program' or $objectType == 'project' or $objectType == 'execution')
|
||||
elseif($objectType == 'project' or $objectType == 'execution')
|
||||
{
|
||||
$objectInfo = $this->dao->select("id, project, $field AS name")->from($table)->where('id')->in($objectIds)->fetchAll();
|
||||
foreach($objectInfo as $object)
|
||||
|
||||
@@ -43,10 +43,11 @@ $(function()
|
||||
if($blockParams.find('#actionLink').size() > 0) $form.attr('action', $blockParams.find('#actionLink').val());
|
||||
|
||||
$titleInput = $blockParams.find('#title');
|
||||
if($titleInput.length && $('#blockParams #paramstype').length)
|
||||
if($titleInput.length && $('#paramstype').length)
|
||||
{
|
||||
blockTitle = $titleInput.val();
|
||||
preValue = $('#blockParams #paramstype').find('option:selected').text();
|
||||
preValue = $('#paramstype').find('option:selected').text();
|
||||
|
||||
var preIndex = blockTitle.indexOf(' - ' + preValue);
|
||||
if(preIndex >= 0) blockTitle = blockTitle.substring(0, preIndex);
|
||||
|
||||
|
||||
@@ -1379,7 +1379,7 @@ class bugModel extends model
|
||||
->where('deleted')->eq(0)
|
||||
->beginIF($projectID)->andWhere('PRJ')->eq($projectID)->fi()
|
||||
->beginIF(!$this->app->user->admin)->andWhere('PRJ')->in($this->app->user->view->projects)->fi()
|
||||
->beginIF(!$this->app->user->admin)->andWhere('project')->in($this->app->user->view->sprints)->fi()
|
||||
->beginIF(!$this->app->user->admin)->andWhere('project')->in('0,' . $this->app->user->view->sprints)->fi()
|
||||
->beginIF($type != 'closedBy' and $this->app->moduleName == 'block')->andWhere('status')->ne('closed')->fi()
|
||||
->beginIF($type != 'all')->andWhere("`$type`")->eq($account)->fi()
|
||||
->orderBy($orderBy)
|
||||
|
||||
+72
-56
@@ -73,6 +73,56 @@ class buildModel extends model
|
||||
->fetchAll('id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get builds of a project in pairs.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @param string $params noempty|notrunk, can be a set of them
|
||||
* @param int $buildID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getProjectBuildPairs($projectID, $productID, $branch = 0, $params = '', $buildID = 0)
|
||||
{
|
||||
$sysBuilds = array();
|
||||
$selectedBuilds = array();
|
||||
if(strpos($params, 'noempty') === false) $sysBuilds = array('' => '');
|
||||
if(strpos($params, 'notrunk') === false) $sysBuilds = $sysBuilds + array('trunk' => $this->lang->trunk);
|
||||
if($buildID != 0) $selectedBuilds = $this->dao->select('id, name')->from(TABLE_BUILD)->where('id')->in($buildID)->fetchPairs();
|
||||
|
||||
$projectBuilds = $this->dao->select('t1.id, t1.name, t1.project, t2.status as projectStatus, t3.id as releaseID, t3.status as releaseStatus, t4.name as branchName')->from(TABLE_BUILD)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
|
||||
->leftJoin(TABLE_RELEASE)->alias('t3')->on('t1.id = t3.build')
|
||||
->leftJoin(TABLE_BRANCH)->alias('t4')->on('t1.branch = t4.id')
|
||||
->where('t1.PRJ')->eq((int)$projectID)
|
||||
->beginIF($productID)->andWhere('t1.product')->eq((int)$productID)->fi()
|
||||
->beginIF($branch)->andWhere('t1.branch')->in("0,$branch")->fi()
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->orderBy('t1.date desc, t1.id desc')->fetchAll('id');
|
||||
|
||||
/* Set builds and filter terminate releases. */
|
||||
$builds = array();
|
||||
foreach($projectBuilds as $buildID => $build)
|
||||
{
|
||||
if(empty($build->releaseID) and (strpos($params, 'nodone') !== false) and ($build->projectStatus === 'done')) continue;
|
||||
if((strpos($params, 'noterminate') !== false) and ($build->releaseStatus === 'terminate')) continue;
|
||||
$builds[$buildID] = $build->name;
|
||||
}
|
||||
if(!$builds) return $sysBuilds + $selectedBuilds;
|
||||
|
||||
/* if the build has been released, replace build name with release name. */
|
||||
$releases = $this->dao->select('build, name')->from(TABLE_RELEASE)
|
||||
->where('build')->in(array_keys($builds))
|
||||
->beginIF($branch)->andWhere('branch')->in("0,$branch")->fi()
|
||||
->andWhere('deleted')->eq(0)
|
||||
->fetchPairs();
|
||||
foreach($releases as $buildID => $releaseName) $builds[$buildID] = $releaseName;
|
||||
|
||||
return $sysBuilds + $builds + $selectedBuilds;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get builds of a project by search.
|
||||
*
|
||||
@@ -84,10 +134,10 @@ class buildModel extends model
|
||||
public function getProjectBuildsBySearch($projectID, $queryID)
|
||||
{
|
||||
/* If there are saved query conditions, reset the session. */
|
||||
if($queryID)
|
||||
if((int)$queryID)
|
||||
{
|
||||
$query = $this->loadModel('search')->getQuery($queryID);
|
||||
if($query)
|
||||
$buildQuery = $this->loadModel('search')->getQuery($queryID);
|
||||
if($buildQuery)
|
||||
{
|
||||
$this->session->set('projectBuildQuery', $query->sql);
|
||||
$this->session->set('projectBuildForm', $query->form);
|
||||
@@ -97,6 +147,12 @@ class buildModel extends model
|
||||
$this->session->set('projectBuildQuery', ' 1 = 1');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if($this->session->projectBuildQuery == false) $this->session->set('projectBuildQuery', ' 1 = 1');
|
||||
}
|
||||
|
||||
$buildQuery = $this->session->projectBuildQuery;
|
||||
|
||||
/* Distinguish between repeated fields. */
|
||||
$fields = array('id' => '`id`', 'name' => '`name`', 'product' => '`product`', 'desc' => '`desc`');
|
||||
@@ -146,15 +202,25 @@ class buildModel extends model
|
||||
public function getExecutionBuildsBySearch($executionID, $queryID)
|
||||
{
|
||||
/* If there are saved query conditions, reset the session. */
|
||||
if($queryID)
|
||||
if((int)$queryID)
|
||||
{
|
||||
$query = $this->loadModel('search')->getQuery($queryID);
|
||||
if($query)
|
||||
$buildQuery = $this->loadModel('search')->getQuery($queryID);
|
||||
if($buildQuery)
|
||||
{
|
||||
$this->session->set('projectBuildQuery', $query->sql);
|
||||
$this->session->set('projectBuildForm', $query->form);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->session->set('projectBuildQuery', ' 1 = 1');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if($this->session->projectBuildQuery == false) $this->session->set('projectBuildQuery', ' 1 = 1');
|
||||
}
|
||||
|
||||
$buildQuery = $this->session->projectBuildQuery;
|
||||
|
||||
/* Distinguish between repeated fields. */
|
||||
$fields = array('id' => '`id`', 'name' => '`name`', 'product' => '`product`', 'desc' => '`desc`');
|
||||
@@ -169,56 +235,6 @@ class buildModel extends model
|
||||
return $this->getExecutionBuilds($executionID, 'bysearch', $buildQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get builds of a project in pairs.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @param string $params noempty|notrunk, can be a set of them
|
||||
* @param int $buildID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getProjectBuildPairs($projectID, $productID, $branch = 0, $params = '', $buildID = 0)
|
||||
{
|
||||
$sysBuilds = array();
|
||||
$selectedBuilds = array();
|
||||
if(strpos($params, 'noempty') === false) $sysBuilds = array('' => '');
|
||||
if(strpos($params, 'notrunk') === false) $sysBuilds = $sysBuilds + array('trunk' => $this->lang->trunk);
|
||||
if($buildID != 0) $selectedBuilds = $this->dao->select('id, name')->from(TABLE_BUILD)->where('id')->in($buildID)->fetchPairs();
|
||||
|
||||
$projectBuilds = $this->dao->select('t1.id, t1.name, t1.project, t2.status as projectStatus, t3.id as releaseID, t3.status as releaseStatus, t4.name as branchName')->from(TABLE_BUILD)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
|
||||
->leftJoin(TABLE_RELEASE)->alias('t3')->on('t1.id = t3.build')
|
||||
->leftJoin(TABLE_BRANCH)->alias('t4')->on('t1.branch = t4.id')
|
||||
->where('t1.PRJ')->eq((int)$projectID)
|
||||
->beginIF($productID)->andWhere('t1.product')->eq((int)$productID)->fi()
|
||||
->beginIF($branch)->andWhere('t1.branch')->in("0,$branch")->fi()
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->orderBy('t1.date desc, t1.id desc')->fetchAll('id');
|
||||
|
||||
/* Set builds and filter terminate releases. */
|
||||
$builds = array();
|
||||
foreach($projectBuilds as $buildID => $build)
|
||||
{
|
||||
if(empty($build->releaseID) and (strpos($params, 'nodone') !== false) and ($build->projectStatus === 'done')) continue;
|
||||
if((strpos($params, 'noterminate') !== false) and ($build->releaseStatus === 'terminate')) continue;
|
||||
$builds[$buildID] = $build->name;
|
||||
}
|
||||
if(!$builds) return $sysBuilds + $selectedBuilds;
|
||||
|
||||
/* if the build has been released, replace build name with release name. */
|
||||
$releases = $this->dao->select('build, name')->from(TABLE_RELEASE)
|
||||
->where('build')->in(array_keys($builds))
|
||||
->beginIF($branch)->andWhere('branch')->in("0,$branch")->fi()
|
||||
->andWhere('deleted')->eq(0)
|
||||
->fetchPairs();
|
||||
foreach($releases as $buildID => $releaseName) $builds[$buildID] = $releaseName;
|
||||
|
||||
return $sysBuilds + $builds + $selectedBuilds;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get builds of a execution in pairs.
|
||||
*
|
||||
|
||||
@@ -217,7 +217,7 @@ $lang->searchObjects['bug'] = 'Bug';
|
||||
$lang->searchObjects['story'] = 'Story';
|
||||
$lang->searchObjects['task'] = 'Aufgaben';
|
||||
$lang->searchObjects['testcase'] = 'Fall';
|
||||
$lang->searchObjects['project'] = $lang->projectCommon;
|
||||
$lang->searchObjects['project'] = 'Execution';
|
||||
$lang->searchObjects['product'] = $lang->productCommon;
|
||||
$lang->searchObjects['user'] = 'Benutzer';
|
||||
$lang->searchObjects['build'] = 'Build';
|
||||
|
||||
@@ -217,7 +217,7 @@ $lang->searchObjects['bug'] = 'Bug';
|
||||
$lang->searchObjects['story'] = 'Story';
|
||||
$lang->searchObjects['task'] = 'Task';
|
||||
$lang->searchObjects['testcase'] = 'Case';
|
||||
$lang->searchObjects['project'] = $lang->projectCommon;
|
||||
$lang->searchObjects['project'] = 'Execution';
|
||||
$lang->searchObjects['product'] = $lang->productCommon;
|
||||
$lang->searchObjects['user'] = 'User';
|
||||
$lang->searchObjects['build'] = 'Build';
|
||||
|
||||
@@ -217,7 +217,7 @@ $lang->searchObjects['bug'] = 'Bug';
|
||||
$lang->searchObjects['story'] = 'Story';
|
||||
$lang->searchObjects['task'] = 'Tâche';
|
||||
$lang->searchObjects['testcase'] = 'CasTest';
|
||||
$lang->searchObjects['project'] = $lang->projectCommon;
|
||||
$lang->searchObjects['project'] = 'Execution';
|
||||
$lang->searchObjects['product'] = $lang->productCommon;
|
||||
$lang->searchObjects['user'] = 'Utilisateur';
|
||||
$lang->searchObjects['build'] = 'Build';
|
||||
|
||||
@@ -217,7 +217,7 @@ $lang->searchObjects['bug'] = 'Bug';
|
||||
$lang->searchObjects['story'] = 'Câu chuyện';
|
||||
$lang->searchObjects['task'] = 'Nhiệm vụ';
|
||||
$lang->searchObjects['testcase'] = 'Tình huống';
|
||||
$lang->searchObjects['project'] = $lang->projectCommon;
|
||||
$lang->searchObjects['project'] = 'Execution';
|
||||
$lang->searchObjects['product'] = $lang->productCommon;
|
||||
$lang->searchObjects['user'] = 'Người dùng';
|
||||
$lang->searchObjects['build'] = 'Bản dựng';
|
||||
|
||||
@@ -221,7 +221,7 @@ $lang->searchObjects['bug'] = 'Bug';
|
||||
$lang->searchObjects['story'] = "{$lang->productSRCommon}";
|
||||
$lang->searchObjects['task'] = '任务';
|
||||
$lang->searchObjects['testcase'] = '用例';
|
||||
$lang->searchObjects['project'] = $lang->projectCommon;
|
||||
$lang->searchObjects['project'] = '执行';
|
||||
$lang->searchObjects['product'] = $lang->productCommon;
|
||||
$lang->searchObjects['user'] = '用户';
|
||||
$lang->searchObjects['build'] = '版本';
|
||||
@@ -880,7 +880,7 @@ $lang->scrum->subMenu->morelink->program = '项目|program|edit|';
|
||||
$lang->menu->waterfall = new stdclass();
|
||||
$lang->menu->waterfall->programindex = array('link' => '仪表盘|program|index|project={PROJECT}');
|
||||
$lang->menu->waterfall->programplan = array('link' => '计划|programplan|browse|project={PROJECT}', 'subModule' => 'programplan');
|
||||
$lang->menu->waterfall->project = array('link' => $lang->projectCommon . '|project|task|projectID={PROJECT}', 'subModule' => ',project,task,');
|
||||
$lang->menu->waterfall->project = array('link' => $lang->projectCommon . '|project|task|executionID={EXECUTION}', 'subModule' => ',project,task,');
|
||||
$lang->menu->waterfall->weekly = array('link' => '报告|weekly|index|project={PROJECT}', 'subModule' => ',milestone,');
|
||||
$lang->menu->waterfall->doc = array('link' => '文档|doc|index|project={PROJECT}');
|
||||
$lang->menu->waterfall->projectstory = array('link' => '需求|projectstory|requirement', 'subModule' => 'requirement,story,track');
|
||||
|
||||
@@ -733,6 +733,7 @@ class commonModel extends model
|
||||
elseif($moduleName == 'my' or $moduleName == 'user')
|
||||
{
|
||||
$searchObject = $methodName;
|
||||
if($methodName == 'execution') $searchObject = 'project';
|
||||
}
|
||||
if(empty($lang->searchObjects[$searchObject])) $searchObject = 'bug';
|
||||
|
||||
|
||||
@@ -40,7 +40,8 @@
|
||||
<td><?php echo html::input('SRName', '', "class='form-control' placeholder={$lang->custom->SRTips}");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class='text-right'><?php echo html::submitButton();?></td>
|
||||
<th></th>
|
||||
<td class='text-left'><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -1118,7 +1118,7 @@ class docModel extends model
|
||||
|
||||
$idList = array();
|
||||
$projectID = $this->session->PRJ;
|
||||
$executionStatus = strpos($this->config->doc->custom->showLibs, 'unclosed') !== false ? 'unclosed' : 'all';
|
||||
$executionStatus = strpos($this->config->doc->custom->showLibs, 'unclosed') !== false ? 'undone' : 'all';
|
||||
if($type == 'product') $objectList = $this->loadModel('product')->getProductPairsByProject($projectID, 'all');
|
||||
if($type == 'project') $objectList = $this->loadModel('project')->getExecutionsByProject($projectID, $executionStatus, 0, true);
|
||||
|
||||
@@ -1144,7 +1144,7 @@ class docModel extends model
|
||||
{
|
||||
if($type == 'product' or $type == 'project')
|
||||
{
|
||||
$docLib->name = $objectList[$docLib->$type];
|
||||
$docLib->name = isset($objectList[$docLib->$type]) ? $objectList[$docLib->$type] : '';
|
||||
$docLib->id = $docLib->$type;
|
||||
}
|
||||
$libs[$docLib->id] = $docLib->name;
|
||||
|
||||
@@ -463,10 +463,16 @@ class extension extends control
|
||||
|
||||
$tmpName = $_FILES['file']['tmp_name'];
|
||||
$fileName = $_FILES['file']['name'];
|
||||
move_uploaded_file($tmpName, $this->app->getTmpRoot() . "/extension/$fileName");
|
||||
$dest = $this->app->getTmpRoot() . "/extension/$fileName";
|
||||
move_uploaded_file($tmpName, $dest);
|
||||
|
||||
$extension = basename($fileName, '.zip');
|
||||
$return = $this->extension->extractPackage($extension);
|
||||
if($return->result != 'ok') die(js::alert(str_replace("'", "\'", sprintf($this->lang->extension->errorExtracted, $fileName, $return->error))));
|
||||
if($return->result != 'ok')
|
||||
{
|
||||
unlink($dest);
|
||||
die(js::alert(str_replace("'", "\'", sprintf($this->lang->extension->errorExtracted, $fileName, $return->error))));
|
||||
}
|
||||
|
||||
$info = $this->extension->parseExtensionCFG($extension);
|
||||
if(isset($info->code) and $info->code != $extension)
|
||||
|
||||
@@ -300,6 +300,8 @@ class fileModel extends model
|
||||
public function getExtension($filename)
|
||||
{
|
||||
$extension = trim(strtolower(pathinfo($filename, PATHINFO_EXTENSION)));
|
||||
if($extension and strpos($extension, '::') !== false) $extension = substr($extension, 0, strpos($extension, '::'));
|
||||
|
||||
if(empty($extension) or stripos(",{$this->config->file->dangers},", ",{$extension},") !== false) return 'txt';
|
||||
if(empty($extension) or stripos(",{$this->config->file->allowed},", ",{$extension},") === false) return 'txt';
|
||||
if($extension == 'php') return 'txt';
|
||||
|
||||
@@ -198,6 +198,7 @@ $lang->resource->program->PRJWhitelist = 'PRJWhitelist';
|
||||
$lang->resource->program->PRJAddWhitelist = 'PRJAddWhitelist';
|
||||
$lang->resource->program->unbindWhielist = 'unbindWhielist';
|
||||
$lang->resource->program->PRJManageProducts = 'PRJManageProducts';
|
||||
$lang->resource->program->view = 'view';
|
||||
|
||||
$lang->program->methodOrder[0] = 'createGuide';
|
||||
//$lang->program->methodOrder[5] = 'PGMIndex';
|
||||
@@ -237,6 +238,7 @@ $lang->program->methodOrder[170] = 'PRJWhitelist';
|
||||
$lang->program->methodOrder[175] = 'PRJAddWhitelist';
|
||||
$lang->program->methodOrder[180] = 'unbindWhielist';
|
||||
$lang->program->methodOrder[185] = 'PRJManageProducts';
|
||||
$lang->program->methodOrder[190] = 'view';
|
||||
|
||||
/* Personnel . */
|
||||
$lang->resource->personnel = new stdclass();
|
||||
|
||||
@@ -127,6 +127,9 @@ class install extends control
|
||||
{
|
||||
if(!session_save_path())
|
||||
{
|
||||
/* Restart the session because the session save path is null when start the session last time. */
|
||||
session_write_close();
|
||||
|
||||
$tmpRootInfo = $this->install->getTmpRoot();
|
||||
$sessionSavePath = $tmpRootInfo['path'] . 'session';
|
||||
if(!is_dir($sessionSavePath)) mkdir($sessionSavePath, 0777, true);
|
||||
@@ -137,8 +140,6 @@ class install extends control
|
||||
$sessionResult = $this->install->checkSessionSavePath();
|
||||
if($sessionResult == 'fail') chmod($sessionSavePath, 0777);
|
||||
|
||||
/* Restart the session because the session save path is null when start the session last time. */
|
||||
session_write_close();
|
||||
session_start();
|
||||
$this->session->set('installing', true);
|
||||
}
|
||||
|
||||
@@ -86,6 +86,7 @@ $lang->misc->feature = new stdclass();
|
||||
$lang->misc->feature->lastest = '最新版本';
|
||||
$lang->misc->feature->detailed = '详情';
|
||||
|
||||
$lang->misc->releaseDate['20.0.beta1'] = '2020-11-30';
|
||||
$lang->misc->releaseDate['12.5.stable'] = '2020-11-19';
|
||||
$lang->misc->releaseDate['20.0.alpha1'] = '2020-10-30';
|
||||
$lang->misc->releaseDate['12.4.4'] = '2020-10-30';
|
||||
@@ -137,6 +138,7 @@ $lang->misc->releaseDate['7.2.stable'] = '2015-05-22';
|
||||
$lang->misc->releaseDate['7.1.stable'] = '2015-03-07';
|
||||
$lang->misc->releaseDate['6.3.stable'] = '2014-11-07';
|
||||
|
||||
$lang->misc->feature->all['20.0.beta1'][] = array('title'=>'禅道20beta版本,修复bug,完善细节', 'desc' => '');
|
||||
$lang->misc->feature->all['20.0.alpha1'][] = array('title'=>'禅道20版本大更新,重构导航,增加瀑布模型', 'desc' => '<p>增加项目集和项目概念</p><p>将原项目概念变为迭代或阶段概念</p><p>增加瀑布开发模板</p>');
|
||||
|
||||
$lang->misc->feature->all['12.5.stable'][] = array('title' => '解决bug,完成高优先级需求。', 'desc' => '');
|
||||
|
||||
@@ -27,7 +27,7 @@ $lang->my->score = 'Meine Wertung';
|
||||
$lang->my->scoreRule = 'Wertungs regeln';
|
||||
$lang->my->noTodo = 'Keine toDos. ';
|
||||
|
||||
$lang->my->myExecutions = "My Stage/{$lang->projectCommon}/Kanban";
|
||||
$lang->my->myExecutions = 'My Stage/Sprint/Iteration';
|
||||
$lang->my->name = 'Name';
|
||||
$lang->my->code = 'Code';
|
||||
$lang->my->projects = 'Project';
|
||||
|
||||
@@ -27,7 +27,7 @@ $lang->my->score = 'My Points';
|
||||
$lang->my->scoreRule = 'Point Rules';
|
||||
$lang->my->noTodo = 'No todos yet. ';
|
||||
|
||||
$lang->my->myExecutions = "My Stage/{$lang->projectCommon}/Kanban";
|
||||
$lang->my->myExecutions = "My Stage/Sprint/Iteration";
|
||||
$lang->my->name = 'Name';
|
||||
$lang->my->code = 'Code';
|
||||
$lang->my->projects = 'Project';
|
||||
|
||||
@@ -27,7 +27,7 @@ $lang->my->score = 'Mes Points';
|
||||
$lang->my->scoreRule = 'Règles Point';
|
||||
$lang->my->noTodo = "Je n'ai rien à faire pour l'instant.";
|
||||
|
||||
$lang->my->myExecutions = "My Stage/{$lang->projectCommon}/Kanban";
|
||||
$lang->my->myExecutions = 'My Stage/Sprint/Iteration';
|
||||
$lang->my->name = 'Name';
|
||||
$lang->my->code = 'Code';
|
||||
$lang->my->projects = 'Project';
|
||||
|
||||
@@ -27,7 +27,7 @@ $lang->my->score = 'Điểm của bạn';
|
||||
$lang->my->scoreRule = 'Quy định điểm';
|
||||
$lang->my->noTodo = 'Chưa có việc nào.';
|
||||
|
||||
$lang->my->myExecutions = "My Stage/{$lang->projectCommon}/Kanban";
|
||||
$lang->my->myExecutions = "My Stage/Sprint/Iteration";
|
||||
$lang->my->name = 'Name';
|
||||
$lang->my->code = 'Code';
|
||||
$lang->my->projects = 'Project';
|
||||
|
||||
@@ -27,7 +27,7 @@ $lang->my->score = '我的积分';
|
||||
$lang->my->scoreRule = '积分规则';
|
||||
$lang->my->noTodo = '暂时没有待办。';
|
||||
|
||||
$lang->my->myExecutions = "我参与的阶段/{$lang->projectCommon}/看板";
|
||||
$lang->my->myExecutions = "我参与的阶段/冲刺/迭代";
|
||||
$lang->my->name = '名称';
|
||||
$lang->my->code = '代号';
|
||||
$lang->my->projects = '项目';
|
||||
|
||||
@@ -27,7 +27,7 @@ $lang->my->score = '我的積分';
|
||||
$lang->my->scoreRule = '積分規則';
|
||||
$lang->my->noTodo = '暫時沒有待辦。';
|
||||
|
||||
$lang->my->myExecutions = "我參與的階段/{$lang->projectCommon}/看板";
|
||||
$lang->my->myExecutions = "我參與的階段/衝刺/迭代";
|
||||
$lang->my->name = '名稱';
|
||||
$lang->my->code = '代號';
|
||||
$lang->my->projects = '項目';
|
||||
|
||||
@@ -78,7 +78,7 @@ class product extends control
|
||||
$this->product->setMenu($this->products, $productID, $branch);
|
||||
|
||||
$this->app->loadLang('my');
|
||||
$this->view->projectStats = $this->loadModel('project')->getProjectStats($status, $productID, $branch);
|
||||
$this->view->projectStats = $this->loadModel('project')->getExecutionStats(0, 'undone', $productID, $branch);
|
||||
|
||||
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->product->project;
|
||||
$this->view->position[] = $this->products[$productID];
|
||||
|
||||
@@ -32,6 +32,7 @@ $lang->program->PRJWhitelist = 'Project Whitelist';
|
||||
$lang->program->PRJAddWhitelist = 'Project Add Whitelist';
|
||||
$lang->program->unbindWhielist = 'Project Remove Whitelist';
|
||||
$lang->program->PRJManageProducts = 'Manage Products';
|
||||
$lang->program->view = 'Program Detail';
|
||||
$lang->program->copyTitle = 'Please select an project to copy';
|
||||
$lang->program->errorSameProducts = 'Project cannot be associated with multiple identical products.';
|
||||
$lang->program->errorNoProducts = 'At least one product is associated';
|
||||
|
||||
@@ -32,6 +32,7 @@ $lang->program->PRJWhitelist = 'Project Whitelist';
|
||||
$lang->program->PRJAddWhitelist = 'Project Add Whitelist';
|
||||
$lang->program->unbindWhielist = 'Project Remove Whitelist';
|
||||
$lang->program->PRJManageProducts = 'Manage Products';
|
||||
$lang->program->view = 'Program Detail';
|
||||
$lang->program->copyTitle = 'Please select an project to copy';
|
||||
$lang->program->errorSameProducts = 'Project cannot be associated with multiple identical products.';
|
||||
$lang->program->errorNoProducts = 'At least one product is associated';
|
||||
|
||||
@@ -32,6 +32,7 @@ $lang->program->PRJWhitelist = 'Project Whitelist';
|
||||
$lang->program->PRJAddWhitelist = 'Project Add Whitelist';
|
||||
$lang->program->unbindWhielist = 'Project Remove Whitelist';
|
||||
$lang->program->PRJManageProducts = 'Manage Products';
|
||||
$lang->program->view = 'Program Detail';
|
||||
$lang->program->copyTitle = 'Please select an project to copy';
|
||||
$lang->program->errorSameProducts = 'Project cannot be associated with multiple identical products.';
|
||||
$lang->program->errorNoProducts = 'At least one product is associated';
|
||||
|
||||
@@ -32,6 +32,7 @@ $lang->program->PRJWhitelist = 'Project Whitelist';
|
||||
$lang->program->PRJAddWhitelist = 'Project Add Whitelist';
|
||||
$lang->program->unbindWhielist = 'Project Remove Whitelist';
|
||||
$lang->program->PRJManageProducts = 'Manage Products';
|
||||
$lang->program->view = 'Program Detail';
|
||||
$lang->program->copyTitle = 'Please select an project to copy';
|
||||
$lang->program->errorSameProducts = 'Project cannot be associated with multiple identical products.';
|
||||
$lang->program->errorNoProducts = 'At least one product is associated';
|
||||
|
||||
@@ -33,6 +33,7 @@ $lang->program->PRJAddWhitelist = '项目添加白名单';
|
||||
$lang->program->PRJStoryConcept = '需求概念组合';
|
||||
$lang->program->unbindWhielist = '项目删除白名单';
|
||||
$lang->program->PRJManageProducts = '关联产品';
|
||||
$lang->program->view = '项目集详情';
|
||||
$lang->program->copyTitle = '请选择一个项目来复制';
|
||||
$lang->program->errorSameProducts = '项目不能关联多个相同的产品。';
|
||||
$lang->program->errorNoProducts = '最少关联一个产品';
|
||||
|
||||
@@ -31,6 +31,7 @@ $lang->program->PRJWhitelist = '項目白名單';
|
||||
$lang->program->PRJAddWhitelist = '項目添加白名單';
|
||||
$lang->program->unbindWhielist = '項目刪除白名單';
|
||||
$lang->program->PRJManageProducts = '關聯產品';
|
||||
$lang->program->view = '項目集詳情';
|
||||
$lang->program->copyTitle = '請選擇一個項目來複制';
|
||||
$lang->program->errorSameProducts = '項目不能關聯多個相同的產品。';
|
||||
$lang->program->errorNoProducts = '最少關聯一個產品';
|
||||
|
||||
@@ -167,7 +167,6 @@ class programplan extends control
|
||||
$this->view->title = $this->lang->programplan->edit;
|
||||
$this->view->position[] = $this->lang->programplan->edit;
|
||||
$this->view->parentStage = $this->programplan->getParentStageList($this->session->PRJ, $planID, $plan->product);
|
||||
$this->view->isParent = $this->programplan->isParent($planID);
|
||||
$this->view->isCreateTask = $this->programplan->isCreateTask($planID);
|
||||
$this->view->plan = $plan;
|
||||
|
||||
|
||||
@@ -323,9 +323,10 @@ class programplanModel extends model
|
||||
$plans = $this->getStage($projectID, $stage->product, 'parent');
|
||||
|
||||
$totalPercent = 0;
|
||||
$stageID = $stage->id;
|
||||
foreach($plans as $id => $stage)
|
||||
{
|
||||
if($id == $stage->id) continue;
|
||||
if($id == $stageID) continue;
|
||||
$totalPercent += $stage->percent;
|
||||
}
|
||||
|
||||
@@ -695,7 +696,6 @@ class programplanModel extends model
|
||||
if($totalPercent > 100) return dao::$errors['percent'][] = $this->lang->programplan->error->percentOver;
|
||||
}
|
||||
|
||||
|
||||
/* Set planDuration and realDuration. */
|
||||
$plan->planDuration = $this->getDuration($plan->begin, $plan->end);
|
||||
$plan->realDuration = $this->getDuration($plan->realBegan, $plan->realEnd);
|
||||
@@ -909,19 +909,6 @@ class programplanModel extends model
|
||||
->fetchPairs();
|
||||
}
|
||||
|
||||
/**
|
||||
* Is parent.
|
||||
*
|
||||
* @param int $planID
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function isParent($planID)
|
||||
{
|
||||
$childrenStage = $this->dao->select('grade')->from(TABLE_PROJECT)->where('parent')->eq($planID)->andWhere('deleted')->eq('0')->fetch();
|
||||
return empty($childrenStage) ? false : true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get parent stage list.
|
||||
*
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php js::set('parentID', $plan->parent);?>
|
||||
<div id="mainContent" class="main-content fade">
|
||||
<div class="center-block">
|
||||
<div class="main-header">
|
||||
@@ -21,14 +20,10 @@
|
||||
<form class="load-indicator main-form form-ajax" method='post' enctype='multipart/form-data' id='dataform'>
|
||||
<table class="table table-form">
|
||||
<tbody>
|
||||
<?php if($isParent === false):?>
|
||||
<tr>
|
||||
<th class="w-100px"><?php echo $lang->programplan->parent;?></th>
|
||||
<td class="w-p35-f"><?php echo html::select('parent', $parentStage, $plan->parent, "class='form-control chosen '");?></td>
|
||||
</tr>
|
||||
<?php else:?>
|
||||
<?php echo html::hidden('parent', 0);?>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th class='w-100px'><?php echo $lang->programplan->name;?> </th>
|
||||
<td class='w-p35-f'><?php echo html::input('name', $plan->name, "class='form-control'");?></td>
|
||||
@@ -43,7 +38,7 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="<?php if($plan->parent) echo "hidden";?>" id="attributeType">
|
||||
<tr class="<?php if($plan->grade == 2) echo "hidden";?>" id="attributeType">
|
||||
<th><?php echo $lang->programplan->attribute;?> </th>
|
||||
<td><?php echo html::select('attribute', $lang->stage->typeList, $plan->attribute, "class='form-control'");?></td>
|
||||
</tr>
|
||||
@@ -94,29 +89,15 @@
|
||||
$("#parent").change(function()
|
||||
{
|
||||
var parent = $(this).children("option:selected").val();
|
||||
if(parentID > 0)
|
||||
if(parent == 0)
|
||||
{
|
||||
if(parent == 0)
|
||||
{
|
||||
$("#attributeType").removeClass('hidden');
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#attributeType").addClass('hidden');
|
||||
|
||||
}
|
||||
$("#attributeType").removeClass('hidden');
|
||||
$("#acl").attr('disabled', false);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(parent == 0)
|
||||
{
|
||||
$("#attributeType").removeClass('hidden');
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#attributeType").addClass('hidden');
|
||||
|
||||
}
|
||||
$("#attributeType").addClass('hidden');
|
||||
$("#acl").attr('disabled', true);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
+22
-19
@@ -1591,19 +1591,22 @@ class project extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* View a project.
|
||||
* View a execution.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function view($projectID)
|
||||
public function view($executionID)
|
||||
{
|
||||
$this->app->loadLang('program');
|
||||
$project = $this->project->getById($projectID, true);
|
||||
if(!$project) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
$execution = $this->project->getById($executionID, true);
|
||||
if(!$execution) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
|
||||
$products = $this->project->getProducts($project->id);
|
||||
/* Project not found to prevent searching for .*/
|
||||
if(!isset($this->projects[$execution->id])) $this->projects = $this->project->getExecutionPairs($execution->project, 'all', 'nocode');
|
||||
|
||||
$products = $this->project->getProducts($execution->id);
|
||||
$linkedBranches = array();
|
||||
foreach($products as $product)
|
||||
{
|
||||
@@ -1611,34 +1614,34 @@ class project extends control
|
||||
}
|
||||
|
||||
/* Set menu. */
|
||||
$this->project->setMenu($this->projects, $project->id);
|
||||
$this->project->setMenu($this->projects, $execution->id);
|
||||
$this->app->loadLang('bug');
|
||||
|
||||
list($dateList, $interval) = $this->project->getDateList($project->begin, $project->end, 'noweekend', 0, 'Y-m-d');
|
||||
$chartData = $this->project->buildBurnData($projectID, $dateList, 'noweekend');
|
||||
list($dateList, $interval) = $this->project->getDateList($execution->begin, $execution->end, 'noweekend', 0, 'Y-m-d');
|
||||
$chartData = $this->project->buildBurnData($executionID, $dateList, 'noweekend');
|
||||
|
||||
/* Load pager. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager(0, 30, 1);
|
||||
|
||||
$this->executeHooks($projectID);
|
||||
$this->executeHooks($executionID);
|
||||
|
||||
$this->view->title = $this->lang->project->view;
|
||||
$this->view->position[] = html::a($this->createLink('project', 'browse', "projectID=$projectID"), $project->name);
|
||||
$this->view->position[] = html::a($this->createLink('project', 'browse', "projectID=$executionID"), $execution->name);
|
||||
$this->view->position[] = $this->view->title;
|
||||
|
||||
$this->view->project = $project;
|
||||
$this->view->execution = $execution;
|
||||
$this->view->products = $products;
|
||||
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), '', $linkedBranches);
|
||||
$this->view->planGroups = $this->project->getPlans($products);
|
||||
$this->view->actions = $this->loadModel('action')->getList('execution', $projectID);
|
||||
$this->view->dynamics = $this->loadModel('action')->getDynamic('all', 'all', 'date_desc', $pager, 'all', $projectID);
|
||||
$this->view->actions = $this->loadModel('action')->getList('execution', $executionID);
|
||||
$this->view->dynamics = $this->loadModel('action')->getDynamic('all', 'all', 'date_desc', $pager, 'all', $executionID);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->teamMembers = $this->project->getTeamMembers($projectID);
|
||||
$this->view->docLibs = $this->loadModel('doc')->getLibsByObject('project', $projectID);
|
||||
$this->view->statData = $this->project->statRelatedData($projectID);
|
||||
$this->view->teamMembers = $this->project->getTeamMembers($executionID);
|
||||
$this->view->docLibs = $this->loadModel('doc')->getLibsByObject('project', $executionID);
|
||||
$this->view->statData = $this->project->statRelatedData($executionID);
|
||||
$this->view->chartData = $chartData;
|
||||
$this->view->canBeChanged = common::canModify('project', $project); // Determines whether an object is editable.
|
||||
$this->view->canBeChanged = common::canModify('project', $execution); // Determines whether an object is editable.
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -2594,7 +2597,7 @@ class project extends control
|
||||
unset($fields[$key]);
|
||||
}
|
||||
|
||||
$projectStats = $this->project->getProjectStats($status == 'byproduct' ? 'all' : $status, $productID, 0, 30, $orderBy, null, $this->session->PRJ);
|
||||
$projectStats = $this->project->getExecutionStats($this->session->PRJ, $status == 'byproduct' ? 'all' : $status, $productID, 0, 30, 'path_asc,id_asc');
|
||||
$users = $this->loadModel('user')->getPairs('noletter');
|
||||
foreach($projectStats as $i => $project)
|
||||
{
|
||||
|
||||
@@ -349,7 +349,6 @@ $lang->printKanban->typeList['increment'] = 'Erhöhen';
|
||||
$lang->project->typeList[''] = '';
|
||||
$lang->project->typeList['stage'] = 'Stage';
|
||||
$lang->project->typeList['sprint'] = $lang->projectCommon;
|
||||
$lang->project->typeList['kanban'] = 'Kanban';
|
||||
|
||||
$lang->project->featureBar['task']['all'] = $lang->project->allTasks;
|
||||
$lang->project->featureBar['task']['unclosed'] = $lang->project->unclosed;
|
||||
|
||||
@@ -349,7 +349,6 @@ $lang->printKanban->typeList['increment'] = 'Increment';
|
||||
$lang->project->typeList[''] = '';
|
||||
$lang->project->typeList['stage'] = 'Stage';
|
||||
$lang->project->typeList['sprint'] = $lang->projectCommon;
|
||||
$lang->project->typeList['kanban'] = 'Kanban';
|
||||
|
||||
$lang->project->featureBar['task']['all'] = $lang->project->allTasks;
|
||||
$lang->project->featureBar['task']['unclosed'] = $lang->project->unclosed;
|
||||
|
||||
@@ -349,7 +349,6 @@ $lang->printKanban->typeList['increment'] = 'Incrément';
|
||||
$lang->project->typeList[''] = '';
|
||||
$lang->project->typeList['stage'] = 'Stage';
|
||||
$lang->project->typeList['sprint'] = $lang->projectCommon;
|
||||
$lang->project->typeList['kanban'] = 'Kanban';
|
||||
|
||||
$lang->project->featureBar['task']['all'] = $lang->project->allTasks;
|
||||
$lang->project->featureBar['task']['unclosed'] = $lang->project->unclosed;
|
||||
|
||||
@@ -349,7 +349,6 @@ $lang->printKanban->typeList['increment'] = 'Tăng dần';
|
||||
$lang->project->typeList[''] = '';
|
||||
$lang->project->typeList['stage'] = 'Stage';
|
||||
$lang->project->typeList['sprint'] = $lang->projectCommon;
|
||||
$lang->project->typeList['kanban'] = 'Kanban';
|
||||
|
||||
$lang->project->featureBar['task']['all'] = $lang->project->allTasks;
|
||||
$lang->project->featureBar['task']['unclosed'] = $lang->project->unclosed;
|
||||
|
||||
@@ -349,7 +349,6 @@ $lang->printKanban->typeList['increment'] = '增量';
|
||||
$lang->project->typeList[''] = '';
|
||||
$lang->project->typeList['stage'] = '阶段';
|
||||
$lang->project->typeList['sprint'] = $lang->projectCommon;
|
||||
$lang->project->typeList['kanban'] = '看板';
|
||||
|
||||
$lang->project->featureBar['task']['all'] = $lang->project->allTasks;
|
||||
$lang->project->featureBar['task']['unclosed'] = $lang->project->unclosed;
|
||||
|
||||
@@ -345,7 +345,6 @@ $lang->printKanban->typeList['increment'] = '增量';
|
||||
$lang->project->typeList[''] = '';
|
||||
$lang->project->typeList['stage'] = '階段';
|
||||
$lang->project->typeList['sprint'] = $lang->projectCommon;
|
||||
$lang->project->typeList['kanban'] = '看板';
|
||||
|
||||
$lang->project->featureBar['task']['all'] = $lang->project->allTasks;
|
||||
$lang->project->featureBar['task']['unclosed'] = $lang->project->unclosed;
|
||||
|
||||
+62
-67
@@ -339,30 +339,7 @@ class projectModel extends model
|
||||
->get();
|
||||
|
||||
/* Check the workload format and total. */
|
||||
if(!empty($sprint->percent))
|
||||
{
|
||||
if(!preg_match("/^[0-9]+(.[0-9]{1,3})?$/", $sprint->percent))
|
||||
{
|
||||
dao::$errors['percent'] = $this->lang->programplan->error->percentNumber;
|
||||
return false;
|
||||
}
|
||||
|
||||
$oldPercentTotal = $this->dao->select('SUM(t2.percent) as total')->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project=t2.id')
|
||||
->where('t1.product')->eq($this->post->products[0])
|
||||
->andWhere('t2.type')->eq('stage')
|
||||
->andWhere('t2.grade')->eq(1)
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->fetch('total');
|
||||
|
||||
/* The total workload of the stage should not exceed 100%. */
|
||||
$percentTotal = $sprint->percent + $oldPercentTotal;
|
||||
if($percentTotal > 100)
|
||||
{
|
||||
dao::$errors['percent'] = sprintf($this->lang->project->workloadTotal, $oldPercentTotal . '%');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(!empty($sprint->percent)) $this->checkWorkload('create', $sprint->percent);
|
||||
|
||||
/* Set planDuration and realDuration. */
|
||||
$sprint->planDuration = $this->loadModel('programplan')->getDuration($sprint->begin, $sprint->end);
|
||||
@@ -457,7 +434,13 @@ class projectModel extends model
|
||||
$projectID = (int)$projectID;
|
||||
$oldProject = $this->dao->findById($projectID)->from(TABLE_PROJECT)->fetch();
|
||||
|
||||
/* If the project model is a stage, determine whether the product is linked. */
|
||||
/* Judgment of required items. */
|
||||
if($this->post->code == '')
|
||||
{
|
||||
dao::$errors['code'] = sprintf($this->lang->error->notempty, $this->lang->project->code);
|
||||
return false;
|
||||
}
|
||||
|
||||
if($oldProject->type == 'stage' and empty($this->post->products[0]))
|
||||
{
|
||||
dao::$errors['message'][] = $this->lang->project->noLinkProduct;
|
||||
@@ -485,47 +468,7 @@ class projectModel extends model
|
||||
$project = $this->loadModel('file')->processImgURL($project, $this->config->project->editor->edit['id'], $this->post->uid);
|
||||
|
||||
/* Check the workload format and total. */
|
||||
if(!empty($project->percent))
|
||||
{
|
||||
if(!preg_match("/^[0-9]+(.[0-9]{1,3})?$/", $project->percent))
|
||||
{
|
||||
dao::$errors['percent'] = $this->lang->programplan->error->percentNumber;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* If it is the first stage, the total workload does not exceed 100%. */
|
||||
if($oldProject->grade == 1)
|
||||
{
|
||||
$oldPercentTotal = $this->dao->select('SUM(t2.percent) as total')->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project=t2.id')
|
||||
->where('t1.product')->eq($this->post->products[0])
|
||||
->andWhere('t2.type')->eq('stage')
|
||||
->andWhere('t2.grade')->eq(1)
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->fetch('total');
|
||||
|
||||
$percentTotal = $project->percent + $oldPercentTotal;
|
||||
if($percentTotal > 100)
|
||||
{
|
||||
dao::$errors['percent'] = sprintf($this->lang->project->workloadTotal, $oldPercentTotal . '%');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/* The sum of the workload of the child stage cannot be greater than that of the parent stage. */
|
||||
if($oldProject->grade == 2)
|
||||
{
|
||||
$parentPlan = $this->loadModel('programPlan')->getByID($oldProject->parent);
|
||||
$childrenTotalPercent = $this->dao->select('SUM(percent) as total')->from(TABLE_PROJECT)->where('parent')->eq($oldProject->parent)->andWhere('deleted')->eq(0)->fetch('total');
|
||||
$childrenTotalPercent = $childrenTotalPercent - $oldProject->percent + $project->percent;
|
||||
|
||||
if($childrenTotalPercent > $parentPlan->percent)
|
||||
{
|
||||
dao::$errors['parent'] = sprintf($this->lang->programplan->error->parentWorkload, $parentPlan->percent . '%');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!empty($project->percent)) $this->checkWorkload('update', $project->percent, $oldProject);
|
||||
|
||||
/* Set planDuration and realDuration. */
|
||||
$project->planDuration = $this->loadModel('programplan')->getDuration($project->begin, $project->end);
|
||||
@@ -835,6 +778,58 @@ class projectModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the workload format and total.
|
||||
*
|
||||
* @param string $type create|update
|
||||
* @param int $percent
|
||||
* @param object $oldProject
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function checkWorkload($type = '', $percent = 0, $oldProject = '')
|
||||
{
|
||||
if(!preg_match("/^[0-9]+(.[0-9]{1,3})?$/", $percent))
|
||||
{
|
||||
dao::$errors['percent'] = $this->lang->programplan->error->percentNumber;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* The total workload of the first stage should not exceed 100%. */
|
||||
if($type == 'create' or $oldProject->grade == 1)
|
||||
{
|
||||
$oldPercentTotal = $this->dao->select('SUM(t2.percent) as total')->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project=t2.id')
|
||||
->where('t1.product')->eq($this->post->products[0])
|
||||
->andWhere('t2.type')->eq('stage')
|
||||
->andWhere('t2.grade')->eq(1)
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->fetch('total');
|
||||
|
||||
if($type == 'create') $percentTotal = $percent + $oldPercentTotal;
|
||||
if($oldProject->grade == 1) $percentTotal = $oldPercentTotal - $oldProject->percent + $this->post->percent;
|
||||
|
||||
if($percentTotal >100)
|
||||
{
|
||||
dao::$errors['percent'] = sprintf($this->lang->project->workloadTotal, $oldPercentTotal . '%');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if($type == 'update' and $oldProject->grade == 2)
|
||||
{
|
||||
$parentPlan = $this->loadModel('programPlan')->getByID($oldProject->parent);
|
||||
$childrenTotalPercent = $this->dao->select('SUM(percent) as total')->from(TABLE_PROJECT)->where('parent')->eq($oldProject->parent)->andWhere('deleted')->eq(0)->fetch('total');
|
||||
$childrenTotalPercent = $childrenTotalPercent - $oldProject->percent + $this->post->percent;
|
||||
|
||||
if($childrenTotalPercent > $parentPlan->percent)
|
||||
{
|
||||
dao::$errors['parent'] = sprintf($this->lang->programplan->error->parentWorkload, $parentPlan->percent . '%');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get execution pairs.
|
||||
*
|
||||
@@ -1095,7 +1090,7 @@ class projectModel extends model
|
||||
$executions = $this->dao->select('t2.*')->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.project=t2.id')
|
||||
->where('t1.product')->eq($productID)
|
||||
->andWhere('t2.project')->eq($projectID)
|
||||
->beginIF($projectID)->andWhere('t2.project')->eq($projectID)->fi()
|
||||
->beginIF($status == 'undone')->andWhere('t2.status')->notIN('done,closed')->fi()
|
||||
->beginIF($status != 'all' and $status != 'undone')->andWhere('t2.status')->eq($status)->fi()
|
||||
->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->sprints)->fi()
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
<div class="col-sm-6">
|
||||
<div class="panel block-burn" style="height: 280px">
|
||||
<div class="panel-heading">
|
||||
<div class="panel-title"><?php echo $project->name . $lang->project->burn;?></div>
|
||||
<div class="panel-title"><?php echo $execution->name . $lang->project->burn;?></div>
|
||||
<nav class="panel-actions nav nav-default">
|
||||
<li><?php common::printLink('project', 'burn', "projectID=$project->id", '<i class="icon icon-more icon-sm"></i>', '', "title=$lang->more");?></li>
|
||||
<li><?php common::printLink('project', 'burn', "projectID=$execution->id", '<i class="icon icon-more icon-sm"></i>', '', "title=$lang->more");?></li>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
@@ -44,7 +44,7 @@
|
||||
<div class="panel-heading">
|
||||
<div class="panel-title"><?php echo $lang->project->latestDynamic;?></div>
|
||||
<nav class="panel-actions nav nav-default">
|
||||
<li><?php common::printLink('project', 'dynamic', "projectID=$project->id&type=all", '<i class="icon icon-more icon-sm"></i>', '', "title=$lang->more");?></li>
|
||||
<li><?php common::printLink('project', 'dynamic', "projectID=$execution->id&type=all", '<i class="icon icon-more icon-sm"></i>', '', "title=$lang->more");?></li>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="panel-body scrollbar-hover">
|
||||
@@ -66,31 +66,31 @@
|
||||
<div class="panel-heading">
|
||||
<div class="panel-title"><?php echo $lang->project->relatedMember;?></div>
|
||||
<nav class="panel-actions nav nav-default">
|
||||
<li><?php common::printLink('project', 'team', "projectID=$project->id", '<i class="icon icon-more icon-sm"></i>', '', "title=$lang->more");?></li>
|
||||
<li><?php common::printLink('project', 'team', "projectID=$execution->id", '<i class="icon icon-more icon-sm"></i>', '', "title=$lang->more");?></li>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row row-grid">
|
||||
<?php $i = 9; $j = 0;?>
|
||||
<?php if($project->PM):?>
|
||||
<?php if($execution->PM):?>
|
||||
<?php $i--;?>
|
||||
<?php unset($teamMembers[$project->PM]);?>
|
||||
<div class="col-xs-6"><i class="icon icon-person icon-sm text-muted"></i> <?php echo zget($users, $project->PM);?> <span class="text-muted">(<?php echo $lang->project->PM;?>)</span></div>
|
||||
<?php unset($teamMembers[$execution->PM]);?>
|
||||
<div class="col-xs-6"><i class="icon icon-person icon-sm text-muted"></i> <?php echo zget($users, $execution->PM);?> <span class="text-muted">(<?php echo $lang->project->PM;?>)</span></div>
|
||||
<?php endif;?>
|
||||
<?php if($project->PO):?>
|
||||
<?php if($execution->PO):?>
|
||||
<?php $i--;?>
|
||||
<?php unset($teamMembers[$project->PO]);?>
|
||||
<div class="col-xs-6"><i class="icon icon-person icon-sm text-muted"></i> <?php echo zget($users, $project->PO);?> <span class="text-muted">(<?php echo $lang->project->PO;?>)</span></div>
|
||||
<?php unset($teamMembers[$execution->PO]);?>
|
||||
<div class="col-xs-6"><i class="icon icon-person icon-sm text-muted"></i> <?php echo zget($users, $execution->PO);?> <span class="text-muted">(<?php echo $lang->project->PO;?>)</span></div>
|
||||
<?php endif;?>
|
||||
<?php if($project->QD):?>
|
||||
<?php if($execution->QD):?>
|
||||
<?php $i--;?>
|
||||
<?php unset($teamMembers[$project->QD]);?>
|
||||
<div class="col-xs-6"><i class="icon icon-person icon-sm text-muted"></i> <?php echo zget($users, $project->QD);?> <span class="text-muted">(<?php echo $lang->project->QD;?>)</span></div>
|
||||
<?php unset($teamMembers[$execution->QD]);?>
|
||||
<div class="col-xs-6"><i class="icon icon-person icon-sm text-muted"></i> <?php echo zget($users, $execution->QD);?> <span class="text-muted">(<?php echo $lang->project->QD;?>)</span></div>
|
||||
<?php endif;?>
|
||||
<?php if($project->RD):?>
|
||||
<?php if($execution->RD):?>
|
||||
<?php $i--;?>
|
||||
<?php unset($teamMembers[$project->RD]);?>
|
||||
<div class="col-xs-6"><i class="icon icon-person icon-sm text-muted"></i> <?php echo zget($users, $project->RD);?> <span class="text-muted">(<?php echo $lang->project->RD;?>)</span></div>
|
||||
<?php unset($teamMembers[$execution->RD]);?>
|
||||
<div class="col-xs-6"><i class="icon icon-person icon-sm text-muted"></i> <?php echo zget($users, $execution->RD);?> <span class="text-muted">(<?php echo $lang->project->RD;?>)</span></div>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if(common::hasPriv('project', 'team')):?>
|
||||
@@ -100,7 +100,7 @@
|
||||
<?php $j++;?>
|
||||
<?php endforeach;?>
|
||||
<div class="col-xs-6">
|
||||
<?php if($canBeChanged) common::printLink('project', 'manageMembers', "projectID=$project->id", "<i class='icon icon-plus hl-primary text-primary'></i> " . $lang->project->manageMembers, '', "class='text-muted'");?>
|
||||
<?php if($canBeChanged) common::printLink('project', 'manageMembers', "projectID=$execution->id", "<i class='icon icon-plus hl-primary text-primary'></i> " . $lang->project->manageMembers, '', "class='text-muted'");?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
@@ -112,7 +112,7 @@
|
||||
<div class="panel-heading">
|
||||
<div class="panel-title"><?php echo $lang->project->doclib;?></div>
|
||||
<nav class="panel-actions nav nav-default">
|
||||
<li><?php common::printLink('doc', 'objectLibs', "type=project&projectID=$project->id&from=project", '<i class="icon icon-more icon-sm"></i>', '', "title=$lang->more");?></li>
|
||||
<li><?php common::printLink('doc', 'objectLibs', "type=project&projectID=$execution->id&from=project", '<i class="icon icon-more icon-sm"></i>', '', "title=$lang->more");?></li>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
@@ -123,7 +123,7 @@
|
||||
<?php if($i > 8) break;?>
|
||||
<div class="col-xs-6">
|
||||
<?php if($libID == 'files'):?>
|
||||
<?php echo html::a($this->createLink('doc', 'showFiles', "type=project&objectID=$project->id"), "<i class='icon icon-folder text-yellow'></i> " . $docLib->name);?>
|
||||
<?php echo html::a($this->createLink('doc', 'showFiles', "type=project&objectID=$execution->id"), "<i class='icon icon-folder text-yellow'></i> " . $docLib->name);?>
|
||||
<?php else:?>
|
||||
<?php echo html::a($this->createLink('doc', 'browse', "libID=$libID&browseType=all¶m=0&orderBy=id_desc&from=project"), "<i class='icon icon-folder text-yellow'></i> " . $docLib->name);?>
|
||||
<?php endif;?>
|
||||
@@ -131,40 +131,40 @@
|
||||
<?php $i++;?>
|
||||
<?php endforeach;?>
|
||||
<div class="col-xs-6">
|
||||
<?php if($canBeChanged) common::printLink('doc', 'createLib', "type=project&objectID=$project->id", "<i class='icon icon-plus hl-primary text-primary'></i> " . $lang->doc->createLib, '', "class='text-muted iframe' data-width='1000px'");?>
|
||||
<?php if($canBeChanged) common::printLink('doc', 'createLib', "type=project&objectID=$execution->id", "<i class='icon icon-plus hl-primary text-primary'></i> " . $lang->doc->createLib, '', "class='text-muted iframe' data-width='1000px'");?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php $this->printExtendFields($project, 'div', "position=left&inForm=0");?>
|
||||
<?php $this->printExtendFields($execution, 'div', "position=left&inForm=0");?>
|
||||
<div class="col-sm-12">
|
||||
<?php $blockHistory = true;?>
|
||||
<?php $actionFormLink = $this->createLink('action', 'comment', "objectType=project&objectID=$project->id");?>
|
||||
<?php $actionFormLink = $this->createLink('action', 'comment', "objectType=project&objectID=$execution->id");?>
|
||||
<?php include '../../common/view/action.html.php';?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='main-actions'>
|
||||
<div class="btn-toolbar">
|
||||
<?php
|
||||
$params = "project=$project->id";
|
||||
$browseLink = $this->session->projectList ? $this->session->projectList : inlink('browse', "projectID=$project->id");
|
||||
$params = "project=$execution->id";
|
||||
$browseLink = $this->session->projectList ? $this->session->projectList : inlink('browse', "projectID=$execution->id");
|
||||
common::printBack($browseLink);
|
||||
if(!$project->deleted)
|
||||
if(!$execution->deleted)
|
||||
{
|
||||
echo "<div class='divider'></div>";
|
||||
common::printIcon('project', 'start', "projectID=$project->id", $project, 'button', '', '', 'iframe', true);
|
||||
common::printIcon('project', 'activate', "projectID=$project->id", $project, 'button', '', '', 'iframe', true);
|
||||
common::printIcon('project', 'putoff', "projectID=$project->id", $project, 'button', '', '', 'iframe', true);
|
||||
common::printIcon('project', 'suspend', "projectID=$project->id", $project, 'button', '', '', 'iframe', true);
|
||||
common::printIcon('project', 'close', "projectID=$project->id", $project, 'button', '', '', 'iframe', true);
|
||||
common::printIcon('project', 'start', "projectID=$execution->id", $execution, 'button', '', '', 'iframe', true);
|
||||
common::printIcon('project', 'activate', "projectID=$execution->id", $execution, 'button', '', '', 'iframe', true);
|
||||
common::printIcon('project', 'putoff', "projectID=$execution->id", $execution, 'button', '', '', 'iframe', true);
|
||||
common::printIcon('project', 'suspend', "projectID=$execution->id", $execution, 'button', '', '', 'iframe', true);
|
||||
common::printIcon('project', 'close', "projectID=$execution->id", $execution, 'button', '', '', 'iframe', true);
|
||||
|
||||
echo $this->buildOperateMenu($project, 'view');
|
||||
echo $this->buildOperateMenu($execution, 'view');
|
||||
|
||||
echo "<div class='divider'></div>";
|
||||
common::printIcon('project', 'edit', $params, $project);
|
||||
common::printIcon('project', 'delete', $params, $project, 'button', 'trash', 'hiddenwin');
|
||||
common::printIcon('project', 'edit', $params, $execution);
|
||||
common::printIcon('project', 'delete', $params, $execution, 'button', 'trash', 'hiddenwin');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@@ -175,18 +175,18 @@
|
||||
<div class="col-sm-12">
|
||||
<div class="cell">
|
||||
<div class="detail">
|
||||
<h2 class="detail-title"><span class="label-id"><?php echo $project->id;?></span> <span class="label label-light label-outline"><?php echo $project->code;?></span> <?php echo $project->name;?></h2>
|
||||
<h2 class="detail-title"><span class="label-id"><?php echo $execution->id;?></span> <span class="label label-light label-outline"><?php echo $execution->code;?></span> <?php echo $execution->name;?></h2>
|
||||
<div class="detail-content article-content">
|
||||
<p><span class="text-limit" data-limit-size="40"><?php echo $project->desc;?></span><a class="text-primary text-limit-toggle small" data-text-expand="<?php echo $lang->expand;?>" data-text-collapse="<?php echo $lang->collapse;?>"></a></p>
|
||||
<p><span class="text-limit" data-limit-size="40"><?php echo $execution->desc;?></span><a class="text-primary text-limit-toggle small" data-text-expand="<?php echo $lang->expand;?>" data-text-collapse="<?php echo $lang->collapse;?>"></a></p>
|
||||
<p>
|
||||
<?php if($project->deleted):?>
|
||||
<?php if($execution->deleted):?>
|
||||
<span class='label label-danger label-outline'><?php echo $lang->project->deleted;?></span>
|
||||
<?php endif; ?>
|
||||
<span class="label label-primary label-outline"><?php echo zget($lang->program->PRJLifeTimeList, $project->lifetime);?></span>
|
||||
<?php if(isset($project->delay)):?>
|
||||
<span class="label label-primary label-outline"><?php echo zget($lang->program->PRJLifeTimeList, $execution->lifetime);?></span>
|
||||
<?php if(isset($execution->delay)):?>
|
||||
<span class="label label-danger label-outline"><?php echo $lang->project->delayed;?></span>
|
||||
<?php else:?>
|
||||
<span class="label label-success label-outline"><?php echo $this->processStatus('project', $project);?></span>
|
||||
<span class="label label-success label-outline"><?php echo $this->processStatus('project', $execution);?></span>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
</div>
|
||||
@@ -194,7 +194,7 @@
|
||||
<div class="detail">
|
||||
<div class="detail-title">
|
||||
<strong><?php echo $lang->project->manageProducts;?></strong>
|
||||
<?php common::printLink('project', 'manageproducts', "projectID=$project->id", '<i class="icon icon-more icon-sm"></i>', '', "class='btn btn-link pull-right muted'");?>
|
||||
<?php common::printLink('project', 'manageproducts', "projectID=$execution->id", '<i class="icon icon-more icon-sm"></i>', '', "class='btn btn-link pull-right muted'");?>
|
||||
</div>
|
||||
<div class="detail-content">
|
||||
<div class="row row-grid">
|
||||
@@ -227,7 +227,7 @@
|
||||
<tr class='statsTr'><td class='w-100px'></td><td></td><td></td><td></td></tr>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<?php $progress = ($project->totalConsumed + $project->totalLeft) ? floor($project->totalConsumed / ($project->totalConsumed + $project->totalLeft) * 1000) / 1000 * 100 : 0;?>
|
||||
<?php $progress = ($execution->totalConsumed + $execution->totalLeft) ? floor($execution->totalConsumed / ($execution->totalConsumed + $execution->totalLeft) * 1000) / 1000 * 100 : 0;?>
|
||||
<?php echo $lang->project->progress;?> <em><?php echo $progress . $lang->percent;?></em>
|
||||
<div class="progress inline-block">
|
||||
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="<?php echo $progress;?>" aria-valuemin="0" aria-valuemax="100" style="width: <?php echo $progress . $lang->percent;?>"></div>
|
||||
@@ -236,25 +236,25 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->begin;?></th>
|
||||
<td><?php echo $project->begin;?></td>
|
||||
<td><?php echo $execution->begin;?></td>
|
||||
<th><?php echo $lang->project->totalEstimate;?></th>
|
||||
<td><em><?php echo (float)$project->totalEstimate . $lang->project->workHour;?></em></td>
|
||||
<td><em><?php echo (float)$execution->totalEstimate . $lang->project->workHour;?></em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->end;?></th>
|
||||
<td><?php echo $project->end;?></td>
|
||||
<td><?php echo $execution->end;?></td>
|
||||
<th><?php echo $lang->project->totalConsumed;?></th>
|
||||
<td><em><?php echo (float)$project->totalConsumed . $lang->project->workHour;?></em></td>
|
||||
<td><em><?php echo (float)$execution->totalConsumed . $lang->project->workHour;?></em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->totalDays;?></th>
|
||||
<td><?php echo $project->days;?></td>
|
||||
<td><?php echo $execution->days;?></td>
|
||||
<th><?php echo $lang->project->totalLeft;?></th>
|
||||
<td><em><?php echo (float)$project->totalLeft . $lang->project->workHour;?></em></td>
|
||||
<td><em><?php echo (float)$execution->totalLeft . $lang->project->workHour;?></em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->totalHours;?></th>
|
||||
<td><em><?php echo (float)$project->totalHours . $lang->project->workHour;?></em></td>
|
||||
<td><em><?php echo (float)$execution->totalHours . $lang->project->workHour;?></em></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -280,10 +280,10 @@
|
||||
<div class="detail">
|
||||
<div class="detail-title"><strong><?php echo $lang->project->acl;?></strong></div>
|
||||
<div class="detail-content">
|
||||
<p><?php echo $lang->project->aclList[$project->acl];?></p>
|
||||
<p><?php echo $lang->project->aclList[$execution->acl];?></p>
|
||||
</div>
|
||||
</div>
|
||||
<?php $this->printExtendFields($project, 'div', "position=right&inForm=0&inCell=1");?>
|
||||
<?php $this->printExtendFields($execution, 'div', "position=right&inForm=0&inCell=1");?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -18,7 +18,7 @@ class projectBuild extends control
|
||||
|
||||
if($type == 'bysearch')
|
||||
{
|
||||
$builds = $this->loadModel('build')->getProjectBuildsBySearch((int)$projectID, $param);
|
||||
$builds = $this->loadModel('build')->getProjectBuildsBySearch((int)$projectID, (int)$param);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -359,7 +359,6 @@ class stakeholder extends control
|
||||
$expectID = $this->stakeholder->expect();
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
|
||||
$actionID = $this->loadModel('action')->create('expect', $expectID, 'Opened');
|
||||
die(js::closeModal('parent.parent', 'this'));
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<th class="w-120px"><?php echo $lang->stakeholder->qq;?></th>
|
||||
<th class="w-120px"><?php echo $lang->stakeholder->weixin;?></th>
|
||||
<th class="w-200px"><?php echo $lang->stakeholder->email;?></th>
|
||||
<th class='c-actions text-center w-150px'><?php echo $lang->actions;?></th>
|
||||
<th class='c-actions text-center w-130px'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -56,7 +56,7 @@
|
||||
<td title="<?php echo $stakeholder->qq;?>"><?php echo $stakeholder->qq;?></td>
|
||||
<td title="<?php echo $stakeholder->weixin;?>"><?php echo $stakeholder->weixin;?></td>
|
||||
<td title="<?php echo $stakeholder->email;?>"><?php echo $stakeholder->email;?></td>
|
||||
<td class='c-actions'>
|
||||
<td class='text-right c-actions'>
|
||||
<?php
|
||||
common::printIcon('stakeholder', 'communicate', "id=$stakeholder->id", $stakeholder, 'list', 'chat-line', '', 'iframe', 'yes');
|
||||
common::printIcon('stakeholder', 'expect', "id=$stakeholder->id", $stakeholder, 'list', 'flag', '', 'iframe', 'yes');
|
||||
|
||||
@@ -83,10 +83,8 @@ class storyModel extends model
|
||||
public function getByList($storyIdList = 0, $type = 'story')
|
||||
{
|
||||
return $this->dao->select('t1.*, t2.spec, t2.verify, t3.name as productTitle')
|
||||
->markLeft()
|
||||
->from(TABLE_STORY)->alias('t1')
|
||||
->leftJoin(TABLE_STORYSPEC)->alias('t2')->on('t1.id=t2.story')
|
||||
->markRight()
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product=t3.id')
|
||||
->where('t1.deleted')->eq(0)
|
||||
->andWhere('t1.version=t2.version')
|
||||
|
||||
+132
-131
@@ -1,132 +1,133 @@
|
||||
<?php
|
||||
$lang->upgrade->fromVersions['0_3beta'] = '0.3 BETA';
|
||||
$lang->upgrade->fromVersions['0_4beta'] = '0.4 BETA';
|
||||
$lang->upgrade->fromVersions['0_5beta'] = '0.5 BETA';
|
||||
$lang->upgrade->fromVersions['0_6beta'] = '0.6 BETA';
|
||||
$lang->upgrade->fromVersions['1_0beta'] = '1.0 BETA';
|
||||
$lang->upgrade->fromVersions['1_0rc1'] = '1.0 RC1';
|
||||
$lang->upgrade->fromVersions['1_0rc2'] = '1.0 RC2';
|
||||
$lang->upgrade->fromVersions['1_0'] = '1.0 STABLE';
|
||||
$lang->upgrade->fromVersions['1_0_1'] = '1.0.1';
|
||||
$lang->upgrade->fromVersions['1_1'] = '1.1';
|
||||
$lang->upgrade->fromVersions['1_2'] = '1.2';
|
||||
$lang->upgrade->fromVersions['1_3'] = '1.3';
|
||||
$lang->upgrade->fromVersions['1_4'] = '1.4';
|
||||
$lang->upgrade->fromVersions['1_5'] = '1.5';
|
||||
$lang->upgrade->fromVersions['2_0'] = '2.0';
|
||||
$lang->upgrade->fromVersions['2_1'] = '2.1';
|
||||
$lang->upgrade->fromVersions['2_2'] = '2.2';
|
||||
$lang->upgrade->fromVersions['2_3'] = '2.3';
|
||||
$lang->upgrade->fromVersions['2_4'] = '2.4';
|
||||
$lang->upgrade->fromVersions['3_0_beta1'] = '3.0 BETA1';
|
||||
$lang->upgrade->fromVersions['3_0_beta2'] = '3.0 BETA2';
|
||||
$lang->upgrade->fromVersions['3_0'] = '3.0 STABLE';
|
||||
$lang->upgrade->fromVersions['3_1'] = '3.1';
|
||||
$lang->upgrade->fromVersions['3_2'] = '3.2';
|
||||
$lang->upgrade->fromVersions['3_2_1'] = '3.2.1';
|
||||
$lang->upgrade->fromVersions['3_3'] = '3.3';
|
||||
$lang->upgrade->fromVersions['4_0_beta1'] = '4.0 BETA1';
|
||||
$lang->upgrade->fromVersions['4_0_beta2'] = '4.0 BETA2';
|
||||
$lang->upgrade->fromVersions['4_0'] = '4.0';
|
||||
$lang->upgrade->fromVersions['4_0_1'] = '4.0.1';
|
||||
$lang->upgrade->fromVersions['4_1'] = '4.1';
|
||||
$lang->upgrade->fromVersions['4_2_beta'] = '4.2.beta';
|
||||
$lang->upgrade->fromVersions['4_3_beta'] = '4.3.beta';
|
||||
$lang->upgrade->fromVersions['5_0_beta1'] = '5.0.beta1';
|
||||
$lang->upgrade->fromVersions['5_0_beta2'] = '5.0.beta2';
|
||||
$lang->upgrade->fromVersions['5_0'] = '5.0';
|
||||
$lang->upgrade->fromVersions['5_1'] = '5.1';
|
||||
$lang->upgrade->fromVersions['5_2'] = '5.2';
|
||||
$lang->upgrade->fromVersions['5_2_1'] = '5.2.1';
|
||||
$lang->upgrade->fromVersions['5_3'] = '5.3';
|
||||
$lang->upgrade->fromVersions['6_0_beta1'] = '6.0.beta1';
|
||||
$lang->upgrade->fromVersions['6_0'] = '6.0';
|
||||
$lang->upgrade->fromVersions['6_1'] = '6.1';
|
||||
$lang->upgrade->fromVersions['6_2'] = '6.2';
|
||||
$lang->upgrade->fromVersions['6_3'] = '6.3';
|
||||
$lang->upgrade->fromVersions['6_4'] = '6.4';
|
||||
$lang->upgrade->fromVersions['7_0'] = '7.0';
|
||||
$lang->upgrade->fromVersions['7_1'] = '7.1';
|
||||
$lang->upgrade->fromVersions['7_2'] = '7.2';
|
||||
$lang->upgrade->fromVersions['7_2_4'] = '7.2.4';
|
||||
$lang->upgrade->fromVersions['7_2_5'] = '7.2.5';
|
||||
$lang->upgrade->fromVersions['7_3'] = '7.3';
|
||||
$lang->upgrade->fromVersions['7_4_beta'] = '7.4.beta';
|
||||
$lang->upgrade->fromVersions['8_0'] = '8.0';
|
||||
$lang->upgrade->fromVersions['8_0_1'] = '8.0.1';
|
||||
$lang->upgrade->fromVersions['8_1'] = '8.1';
|
||||
$lang->upgrade->fromVersions['8_1_3'] = '8.1.3';
|
||||
$lang->upgrade->fromVersions['8_2_beta'] = '8.2.beta';
|
||||
$lang->upgrade->fromVersions['8_2'] = '8.2';
|
||||
$lang->upgrade->fromVersions['8_2_1'] = '8.2.1';
|
||||
$lang->upgrade->fromVersions['8_2_2'] = '8.2.2';
|
||||
$lang->upgrade->fromVersions['8_2_3'] = '8.2.3';
|
||||
$lang->upgrade->fromVersions['8_2_4'] = '8.2.4';
|
||||
$lang->upgrade->fromVersions['8_2_5'] = '8.2.5';
|
||||
$lang->upgrade->fromVersions['8_2_6'] = '8.2.6';
|
||||
$lang->upgrade->fromVersions['8_3'] = '8.3';
|
||||
$lang->upgrade->fromVersions['8_3_1'] = '8.3.1';
|
||||
$lang->upgrade->fromVersions['8_4'] = '8.4';
|
||||
$lang->upgrade->fromVersions['8_4_1'] = '8.4.1';
|
||||
$lang->upgrade->fromVersions['9_0_beta'] = '9.0.beta';
|
||||
$lang->upgrade->fromVersions['9_0'] = '9.0';
|
||||
$lang->upgrade->fromVersions['9_0_1'] = '9.0.1';
|
||||
$lang->upgrade->fromVersions['9_1'] = '9.1';
|
||||
$lang->upgrade->fromVersions['9_1_1'] = '9.1.1';
|
||||
$lang->upgrade->fromVersions['9_1_2'] = '9.1.2';
|
||||
$lang->upgrade->fromVersions['9_2'] = '9.2';
|
||||
$lang->upgrade->fromVersions['9_2_1'] = '9.2.1';
|
||||
$lang->upgrade->fromVersions['9_3_beta'] = '9.3.beta';
|
||||
$lang->upgrade->fromVersions['9_4'] = '9.4';
|
||||
$lang->upgrade->fromVersions['9_5'] = '9.5';
|
||||
$lang->upgrade->fromVersions['9_5_1'] = '9.5.1';
|
||||
$lang->upgrade->fromVersions['9_6'] = '9.6';
|
||||
$lang->upgrade->fromVersions['9_6_1'] = '9.6.1';
|
||||
$lang->upgrade->fromVersions['9_6_2'] = '9.6.2';
|
||||
$lang->upgrade->fromVersions['9_6_3'] = '9.6.3';
|
||||
$lang->upgrade->fromVersions['9_7'] = '9.7';
|
||||
$lang->upgrade->fromVersions['9_8'] = '9.8';
|
||||
$lang->upgrade->fromVersions['9_8_1'] = '9.8.1';
|
||||
$lang->upgrade->fromVersions['9_8_2'] = '9.8.2';
|
||||
$lang->upgrade->fromVersions['9_8_3'] = '9.8.3';
|
||||
$lang->upgrade->fromVersions['10_0_alpha'] = '10.0.alpha';
|
||||
$lang->upgrade->fromVersions['10_0_beta'] = '10.0.beta';
|
||||
$lang->upgrade->fromVersions['10_0'] = '10.0';
|
||||
$lang->upgrade->fromVersions['10_1'] = '10.1';
|
||||
$lang->upgrade->fromVersions['10_2'] = '10.2';
|
||||
$lang->upgrade->fromVersions['10_3'] = '10.3';
|
||||
$lang->upgrade->fromVersions['10_3_1'] = '10.3.1';
|
||||
$lang->upgrade->fromVersions['10_4'] = '10.4';
|
||||
$lang->upgrade->fromVersions['10_5'] = '10.5';
|
||||
$lang->upgrade->fromVersions['10_5_1'] = '10.5.1';
|
||||
$lang->upgrade->fromVersions['10_6'] = '10.6';
|
||||
$lang->upgrade->fromVersions['11_0'] = '11.0';
|
||||
$lang->upgrade->fromVersions['11_1'] = '11.1';
|
||||
$lang->upgrade->fromVersions['11_2'] = '11.2';
|
||||
$lang->upgrade->fromVersions['11_3'] = '11.3';
|
||||
$lang->upgrade->fromVersions['11_4'] = '11.4';
|
||||
$lang->upgrade->fromVersions['11_4_1'] = '11.4.1';
|
||||
$lang->upgrade->fromVersions['11_5'] = '11.5';
|
||||
$lang->upgrade->fromVersions['11_5_1'] = '11.5.1';
|
||||
$lang->upgrade->fromVersions['11_5_2'] = '11.5.2';
|
||||
$lang->upgrade->fromVersions['11_6'] = '11.6';
|
||||
$lang->upgrade->fromVersions['11_6_1'] = '11.6.1';
|
||||
$lang->upgrade->fromVersions['11_6_2'] = '11.6.2';
|
||||
$lang->upgrade->fromVersions['11_6_3'] = '11.6.3';
|
||||
$lang->upgrade->fromVersions['11_6_4'] = '11.6.4';
|
||||
$lang->upgrade->fromVersions['11_6_5'] = '11.6.5';
|
||||
$lang->upgrade->fromVersions['11_7'] = '11.7';
|
||||
$lang->upgrade->fromVersions['12_0'] = '12.0';
|
||||
$lang->upgrade->fromVersions['12_0_1'] = '12.0.1';
|
||||
$lang->upgrade->fromVersions['12_1'] = '12.1';
|
||||
$lang->upgrade->fromVersions['12_2'] = '12.2';
|
||||
$lang->upgrade->fromVersions['12_3'] = '12.3';
|
||||
$lang->upgrade->fromVersions['12_3_1'] = '12.3.1';
|
||||
$lang->upgrade->fromVersions['12_3_2'] = '12.3.2';
|
||||
$lang->upgrade->fromVersions['12_3_3'] = '12.3.3';
|
||||
$lang->upgrade->fromVersions['12_4'] = '12.4';
|
||||
$lang->upgrade->fromVersions['12_4_1'] = '12.4.1';
|
||||
$lang->upgrade->fromVersions['12_4_2'] = '12.4.2';
|
||||
$lang->upgrade->fromVersions['12_4_3'] = '12.4.3';
|
||||
$lang->upgrade->fromVersions['12_4_4'] = '12.4.4';
|
||||
$lang->upgrade->fromVersions['12_5'] = '12.5';
|
||||
$lang->upgrade->fromVersions['0_3beta'] = '0.3 BETA';
|
||||
$lang->upgrade->fromVersions['0_4beta'] = '0.4 BETA';
|
||||
$lang->upgrade->fromVersions['0_5beta'] = '0.5 BETA';
|
||||
$lang->upgrade->fromVersions['0_6beta'] = '0.6 BETA';
|
||||
$lang->upgrade->fromVersions['1_0beta'] = '1.0 BETA';
|
||||
$lang->upgrade->fromVersions['1_0rc1'] = '1.0 RC1';
|
||||
$lang->upgrade->fromVersions['1_0rc2'] = '1.0 RC2';
|
||||
$lang->upgrade->fromVersions['1_0'] = '1.0 STABLE';
|
||||
$lang->upgrade->fromVersions['1_0_1'] = '1.0.1';
|
||||
$lang->upgrade->fromVersions['1_1'] = '1.1';
|
||||
$lang->upgrade->fromVersions['1_2'] = '1.2';
|
||||
$lang->upgrade->fromVersions['1_3'] = '1.3';
|
||||
$lang->upgrade->fromVersions['1_4'] = '1.4';
|
||||
$lang->upgrade->fromVersions['1_5'] = '1.5';
|
||||
$lang->upgrade->fromVersions['2_0'] = '2.0';
|
||||
$lang->upgrade->fromVersions['2_1'] = '2.1';
|
||||
$lang->upgrade->fromVersions['2_2'] = '2.2';
|
||||
$lang->upgrade->fromVersions['2_3'] = '2.3';
|
||||
$lang->upgrade->fromVersions['2_4'] = '2.4';
|
||||
$lang->upgrade->fromVersions['3_0_beta1'] = '3.0 BETA1';
|
||||
$lang->upgrade->fromVersions['3_0_beta2'] = '3.0 BETA2';
|
||||
$lang->upgrade->fromVersions['3_0'] = '3.0 STABLE';
|
||||
$lang->upgrade->fromVersions['3_1'] = '3.1';
|
||||
$lang->upgrade->fromVersions['3_2'] = '3.2';
|
||||
$lang->upgrade->fromVersions['3_2_1'] = '3.2.1';
|
||||
$lang->upgrade->fromVersions['3_3'] = '3.3';
|
||||
$lang->upgrade->fromVersions['4_0_beta1'] = '4.0 BETA1';
|
||||
$lang->upgrade->fromVersions['4_0_beta2'] = '4.0 BETA2';
|
||||
$lang->upgrade->fromVersions['4_0'] = '4.0';
|
||||
$lang->upgrade->fromVersions['4_0_1'] = '4.0.1';
|
||||
$lang->upgrade->fromVersions['4_1'] = '4.1';
|
||||
$lang->upgrade->fromVersions['4_2_beta'] = '4.2.beta';
|
||||
$lang->upgrade->fromVersions['4_3_beta'] = '4.3.beta';
|
||||
$lang->upgrade->fromVersions['5_0_beta1'] = '5.0.beta1';
|
||||
$lang->upgrade->fromVersions['5_0_beta2'] = '5.0.beta2';
|
||||
$lang->upgrade->fromVersions['5_0'] = '5.0';
|
||||
$lang->upgrade->fromVersions['5_1'] = '5.1';
|
||||
$lang->upgrade->fromVersions['5_2'] = '5.2';
|
||||
$lang->upgrade->fromVersions['5_2_1'] = '5.2.1';
|
||||
$lang->upgrade->fromVersions['5_3'] = '5.3';
|
||||
$lang->upgrade->fromVersions['6_0_beta1'] = '6.0.beta1';
|
||||
$lang->upgrade->fromVersions['6_0'] = '6.0';
|
||||
$lang->upgrade->fromVersions['6_1'] = '6.1';
|
||||
$lang->upgrade->fromVersions['6_2'] = '6.2';
|
||||
$lang->upgrade->fromVersions['6_3'] = '6.3';
|
||||
$lang->upgrade->fromVersions['6_4'] = '6.4';
|
||||
$lang->upgrade->fromVersions['7_0'] = '7.0';
|
||||
$lang->upgrade->fromVersions['7_1'] = '7.1';
|
||||
$lang->upgrade->fromVersions['7_2'] = '7.2';
|
||||
$lang->upgrade->fromVersions['7_2_4'] = '7.2.4';
|
||||
$lang->upgrade->fromVersions['7_2_5'] = '7.2.5';
|
||||
$lang->upgrade->fromVersions['7_3'] = '7.3';
|
||||
$lang->upgrade->fromVersions['7_4_beta'] = '7.4.beta';
|
||||
$lang->upgrade->fromVersions['8_0'] = '8.0';
|
||||
$lang->upgrade->fromVersions['8_0_1'] = '8.0.1';
|
||||
$lang->upgrade->fromVersions['8_1'] = '8.1';
|
||||
$lang->upgrade->fromVersions['8_1_3'] = '8.1.3';
|
||||
$lang->upgrade->fromVersions['8_2_beta'] = '8.2.beta';
|
||||
$lang->upgrade->fromVersions['8_2'] = '8.2';
|
||||
$lang->upgrade->fromVersions['8_2_1'] = '8.2.1';
|
||||
$lang->upgrade->fromVersions['8_2_2'] = '8.2.2';
|
||||
$lang->upgrade->fromVersions['8_2_3'] = '8.2.3';
|
||||
$lang->upgrade->fromVersions['8_2_4'] = '8.2.4';
|
||||
$lang->upgrade->fromVersions['8_2_5'] = '8.2.5';
|
||||
$lang->upgrade->fromVersions['8_2_6'] = '8.2.6';
|
||||
$lang->upgrade->fromVersions['8_3'] = '8.3';
|
||||
$lang->upgrade->fromVersions['8_3_1'] = '8.3.1';
|
||||
$lang->upgrade->fromVersions['8_4'] = '8.4';
|
||||
$lang->upgrade->fromVersions['8_4_1'] = '8.4.1';
|
||||
$lang->upgrade->fromVersions['9_0_beta'] = '9.0.beta';
|
||||
$lang->upgrade->fromVersions['9_0'] = '9.0';
|
||||
$lang->upgrade->fromVersions['9_0_1'] = '9.0.1';
|
||||
$lang->upgrade->fromVersions['9_1'] = '9.1';
|
||||
$lang->upgrade->fromVersions['9_1_1'] = '9.1.1';
|
||||
$lang->upgrade->fromVersions['9_1_2'] = '9.1.2';
|
||||
$lang->upgrade->fromVersions['9_2'] = '9.2';
|
||||
$lang->upgrade->fromVersions['9_2_1'] = '9.2.1';
|
||||
$lang->upgrade->fromVersions['9_3_beta'] = '9.3.beta';
|
||||
$lang->upgrade->fromVersions['9_4'] = '9.4';
|
||||
$lang->upgrade->fromVersions['9_5'] = '9.5';
|
||||
$lang->upgrade->fromVersions['9_5_1'] = '9.5.1';
|
||||
$lang->upgrade->fromVersions['9_6'] = '9.6';
|
||||
$lang->upgrade->fromVersions['9_6_1'] = '9.6.1';
|
||||
$lang->upgrade->fromVersions['9_6_2'] = '9.6.2';
|
||||
$lang->upgrade->fromVersions['9_6_3'] = '9.6.3';
|
||||
$lang->upgrade->fromVersions['9_7'] = '9.7';
|
||||
$lang->upgrade->fromVersions['9_8'] = '9.8';
|
||||
$lang->upgrade->fromVersions['9_8_1'] = '9.8.1';
|
||||
$lang->upgrade->fromVersions['9_8_2'] = '9.8.2';
|
||||
$lang->upgrade->fromVersions['9_8_3'] = '9.8.3';
|
||||
$lang->upgrade->fromVersions['10_0_alpha'] = '10.0.alpha';
|
||||
$lang->upgrade->fromVersions['10_0_beta'] = '10.0.beta';
|
||||
$lang->upgrade->fromVersions['10_0'] = '10.0';
|
||||
$lang->upgrade->fromVersions['10_1'] = '10.1';
|
||||
$lang->upgrade->fromVersions['10_2'] = '10.2';
|
||||
$lang->upgrade->fromVersions['10_3'] = '10.3';
|
||||
$lang->upgrade->fromVersions['10_3_1'] = '10.3.1';
|
||||
$lang->upgrade->fromVersions['10_4'] = '10.4';
|
||||
$lang->upgrade->fromVersions['10_5'] = '10.5';
|
||||
$lang->upgrade->fromVersions['10_5_1'] = '10.5.1';
|
||||
$lang->upgrade->fromVersions['10_6'] = '10.6';
|
||||
$lang->upgrade->fromVersions['11_0'] = '11.0';
|
||||
$lang->upgrade->fromVersions['11_1'] = '11.1';
|
||||
$lang->upgrade->fromVersions['11_2'] = '11.2';
|
||||
$lang->upgrade->fromVersions['11_3'] = '11.3';
|
||||
$lang->upgrade->fromVersions['11_4'] = '11.4';
|
||||
$lang->upgrade->fromVersions['11_4_1'] = '11.4.1';
|
||||
$lang->upgrade->fromVersions['11_5'] = '11.5';
|
||||
$lang->upgrade->fromVersions['11_5_1'] = '11.5.1';
|
||||
$lang->upgrade->fromVersions['11_5_2'] = '11.5.2';
|
||||
$lang->upgrade->fromVersions['11_6'] = '11.6';
|
||||
$lang->upgrade->fromVersions['11_6_1'] = '11.6.1';
|
||||
$lang->upgrade->fromVersions['11_6_2'] = '11.6.2';
|
||||
$lang->upgrade->fromVersions['11_6_3'] = '11.6.3';
|
||||
$lang->upgrade->fromVersions['11_6_4'] = '11.6.4';
|
||||
$lang->upgrade->fromVersions['11_6_5'] = '11.6.5';
|
||||
$lang->upgrade->fromVersions['11_7'] = '11.7';
|
||||
$lang->upgrade->fromVersions['12_0'] = '12.0';
|
||||
$lang->upgrade->fromVersions['12_0_1'] = '12.0.1';
|
||||
$lang->upgrade->fromVersions['12_1'] = '12.1';
|
||||
$lang->upgrade->fromVersions['12_2'] = '12.2';
|
||||
$lang->upgrade->fromVersions['12_3'] = '12.3';
|
||||
$lang->upgrade->fromVersions['12_3_1'] = '12.3.1';
|
||||
$lang->upgrade->fromVersions['12_3_2'] = '12.3.2';
|
||||
$lang->upgrade->fromVersions['12_3_3'] = '12.3.3';
|
||||
$lang->upgrade->fromVersions['12_4'] = '12.4';
|
||||
$lang->upgrade->fromVersions['12_4_1'] = '12.4.1';
|
||||
$lang->upgrade->fromVersions['12_4_2'] = '12.4.2';
|
||||
$lang->upgrade->fromVersions['12_4_3'] = '12.4.3';
|
||||
$lang->upgrade->fromVersions['12_4_4'] = '12.4.4';
|
||||
$lang->upgrade->fromVersions['12_5'] = '12.5';
|
||||
$lang->upgrade->fromVersions['20_0_alpha1'] = '20.0.alpha1';
|
||||
|
||||
@@ -823,7 +823,8 @@ class upgradeModel extends model
|
||||
case '12_4_3':
|
||||
case '12_4_4': $confirmContent .= file_get_contents($this->getUpgradeFile('12.4.4'));
|
||||
case '12_5':
|
||||
case '20_0_alpha': $confirmContent .= file_get_contents($this->getUpgradeFile('20.0.alpha'));
|
||||
case '20_0_alpha' : $confirmContent .= file_get_contents($this->getUpgradeFile('20.0.alpha'));
|
||||
case '20_0_alpha1': $confirmContent .= file_get_contents($this->getUpgradeFile('20.0.alpha1'));
|
||||
}
|
||||
return str_replace('zt_', $this->config->db->prefix, $confirmContent);
|
||||
}
|
||||
|
||||
@@ -218,3 +218,4 @@ $lang->user->noticeResetFile = "<h5>Kontaktieren Sie den Administrator um Ihr Pa
|
||||
<li>Die Datei muss leer sein.</li>
|
||||
<li>Wenn die Datei bereits existiert löschen Sie diese und erstellen Sie eine neue.</li>
|
||||
</ol>";
|
||||
$lang->user->notice4Safe = "It is detected that you may be using the one click installation package environment, and other sites in the environment are still using a simple password. For security, please change the password in time. Login address of other sites: <br />%s";
|
||||
|
||||
@@ -218,3 +218,4 @@ $lang->user->noticeResetFile = "<h5>Contact the Administrator to reset your pass
|
||||
<li>Keep the file empty.</li>
|
||||
<li>If the file exists, remove it and create it again.</li>
|
||||
</ol>";
|
||||
$lang->user->notice4Safe = "It is detected that you may be using the one click installation package environment, and other sites in the environment are still using a simple password. For security, please change the password in time. Login address of other sites: <br />%s";
|
||||
|
||||
@@ -218,3 +218,4 @@ $lang->user->noticeResetFile = "<h5>Contactez l'administrateur pour réinitialis
|
||||
<li>Gardez ce fichier vide.</li>
|
||||
<li>Si le fichier existe déjà, supprimez le et créez le à nouveau.</li><li>Bonne chance.</li>
|
||||
</ol>";
|
||||
$lang->user->notice4Safe = "It is detected that you may be using the one click installation package environment, and other sites in the environment are still using a simple password. For security, please change the password in time. Login address of other sites: <br />%s";
|
||||
|
||||
@@ -218,3 +218,4 @@ $lang->user->noticeResetFile = "<h5>Liên hệ quản trị viên để thiết
|
||||
<li>Giữ tập tin này rỗng.</li>
|
||||
<li>Nếu tập tin đã tồn tại, xóa và tạo lại.</li>
|
||||
</ol>";
|
||||
$lang->user->notice4Safe = "It is detected that you may be using the one click installation package environment, and other sites in the environment are still using a simple password. For security, please change the password in time. Login address of other sites: <br />%s";
|
||||
|
||||
@@ -218,3 +218,4 @@ $lang->user->noticeResetFile = "<h5>普通用户请联系管理员重置密码</
|
||||
<li>文件内容为空。</li>
|
||||
<li>如果之前文件存在,删除之后重新创建。</li>
|
||||
</ol>";
|
||||
$lang->user->notice4Safe = "检测到您可能在使用一键安装包环境,该环境中其他站点还在用简单密码,安全起见,请及时修改密码。其他站点的登录地址:<br />%s";
|
||||
|
||||
@@ -60,11 +60,13 @@
|
||||
<td><?php echo html::select('role', $lang->user->roleList, '', "class='form-control' onchange='changeGroup(this.value)'");?></td>
|
||||
<td><?php echo $lang->user->placeholder->role?></td>
|
||||
</tr>
|
||||
<?php if(common::hasPriv('group', 'managemember')):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->user->group;?></th>
|
||||
<td><?php echo html::select('group', $groupList, '', "class='form-control chosen'");?></td>
|
||||
<td><?php echo $lang->user->placeholder->group?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->user->email;?></th>
|
||||
<td><?php echo html::input('email', '', "class='form-control'");?></td>
|
||||
|
||||
@@ -89,4 +89,50 @@ if(empty($config->notMd5Pwd))js::import($jsRoot . 'md5.js');
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<?php
|
||||
if(strpos('|/zentao/|/pro/|/biz/|', "|{$this->config->webRoot}|") !== false)
|
||||
{
|
||||
$databases = array('zentao' => 'zentao', 'zentaopro' => 'zentaopro', 'zentaobiz' => 'zentaobiz', 'zentaoep' => 'zentaoep');
|
||||
if($this->config->webRoot == '/zentao/') unset($databases['zentao']);
|
||||
if($this->config->webRoot == '/pro/') unset($databases['zentaopro']);
|
||||
if($this->config->webRoot == '/biz/')
|
||||
{
|
||||
unset($databases['zentaobiz']);
|
||||
unset($databases['zentaoep']);
|
||||
}
|
||||
|
||||
$users = array();
|
||||
foreach($databases as $database)
|
||||
{
|
||||
try
|
||||
{
|
||||
$webRoot = "/{$database}/";
|
||||
if($database == 'zentao') $webRoot = '/zentao/';
|
||||
if($database == 'zentaopro') $webRoot = '/pro/';
|
||||
if($database == 'zentaobiz') $webRoot = '/biz/';
|
||||
if($database == 'zentaoep') $webRoot = '/biz/';
|
||||
|
||||
$users[$webRoot] = $this->dbh->query("select * from {$database}.`zt_user` where account = 'admin' and password='" . md5('123456') . "'")->fetch();
|
||||
}
|
||||
catch(Exception $e){}
|
||||
}
|
||||
|
||||
if($users)
|
||||
{
|
||||
$sysURL = common::getSysURL();
|
||||
$links = array();
|
||||
foreach($users as $webRoot => $user) $links[] = $sysURL . $webRoot;
|
||||
|
||||
$notice = sprintf($lang->user->notice4Safe, join('<br />', $links));
|
||||
echo <<<EOD
|
||||
<script>
|
||||
\$(function()
|
||||
{
|
||||
bootbox.alert('$notice');
|
||||
})
|
||||
</script>
|
||||
EOD;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
|
||||
Reference in New Issue
Block a user