- loadModel('program')->getSwapper($this->program->getPairs(), $this->session->program, $app->rawModule, $app->rawMethod);?>
- loadModel('custom')->getSwapper();?>
+ loadModel('program')->getSwitcher($this->program->getPairs(), $this->session->program, $app->rawModule, $app->rawMethod);?>
+ loadModel('custom')->getModeSwitcher();?>
@@ -52,18 +52,24 @@ include 'chosen.html.php';
-
-config->qcVersion)):?>
-
sso->redirect)) echo "class='ranzhiFixedTfootAction'";?> >
diff --git a/module/company/view/browse.html.php b/module/company/view/browse.html.php
index 557d65fa4b..7e88791b50 100644
--- a/module/company/view/browse.html.php
+++ b/module/company/view/browse.html.php
@@ -24,8 +24,8 @@ js::set('confirmDelete', $lang->user->confirmDelete);
- createLink('company', 'browse', 'browseType=inside'), '' . $lang->user->inside . '', '', 'class="btn btn-link inside"');?>
- createLink('company', 'browse', 'browseType=outside'), '' . $lang->user->outside . '', '', 'class="btn btn-link outside"');?>
+ createLink('company', 'browse', 'browseType=inside'), '' . $lang->user->inside . '', '', 'class="btn btn-link inside hidden"');?>
+ createLink('company', 'browse', 'browseType=outside'), '' . $lang->user->outside . '', '', 'class="btn btn-link outside hidden"');?>
user->search;?>
diff --git a/module/custom/lang/de.php b/module/custom/lang/de.php
index 235353bc18..0f44e7ff45 100644
--- a/module/custom/lang/de.php
+++ b/module/custom/lang/de.php
@@ -1,24 +1,67 @@
custom->common = 'Custom';
-$lang->custom->index = 'Home';
-$lang->custom->set = 'Customize';
-$lang->custom->restore = 'Reset to Default';
-$lang->custom->key = 'Key';
-$lang->custom->value = 'Value';
-$lang->custom->flow = 'Concept';
-$lang->custom->working = 'WorkStyle';
-$lang->custom->select = 'Select Concept';
-$lang->custom->branch = 'Multi Branch';
-$lang->custom->owner = 'Owner';
-$lang->custom->module = 'Module';
-$lang->custom->section = 'Section';
-$lang->custom->lang = 'Language';
-$lang->custom->setPublic = 'Set Public';
-$lang->custom->required = 'Required';
-$lang->custom->score = 'Score';
-$lang->custom->timezone = 'Timezone';
-$lang->custom->scoreReset = 'Reset Score';
-$lang->custom->scoreTitle = 'Point Feature';
+$lang->custom->common = 'Custom';
+$lang->custom->index = 'Home';
+$lang->custom->set = 'Customize';
+$lang->custom->restore = 'Reset to Default';
+$lang->custom->key = 'Key';
+$lang->custom->value = 'Value';
+$lang->custom->flow = 'Concept';
+$lang->custom->working = 'WorkStyle';
+$lang->custom->select = 'Select Concept';
+$lang->custom->branch = 'Multi Branch';
+$lang->custom->owner = 'Owner';
+$lang->custom->module = 'Module';
+$lang->custom->section = 'Section';
+$lang->custom->lang = 'Language';
+$lang->custom->setPublic = 'Set Public';
+$lang->custom->required = 'Required';
+$lang->custom->score = 'Score';
+$lang->custom->timezone = 'Timezone';
+$lang->custom->scoreReset = 'Reset Score';
+$lang->custom->scoreTitle = 'Point Feature';
+$lang->custom->setscrum = 'Interval Hint';
+$lang->custom->setWaterfall = 'Switch Views';
+$lang->custom->estimate = 'Estimated configuration';
+$lang->custom->estimateConfig = 'Estimated configuration';
+$lang->custom->estimateUnit = 'Estimating Unit';
+$lang->custom->estimateEfficiency = 'Productivity';
+$lang->custom->estimateCost = 'Unit Labour Cost';
+$lang->custom->estimateHours = 'Daily Working Hours';
+$lang->custom->estimateDays = 'Working Days Per Week';
+$lang->custom->region = 'Interval';
+$lang->custom->tips = 'Tips';
+$lang->custom->setTips = 'Set Tips';
+$lang->custom->isRange = 'Is Target Control';
+$lang->custom->plan = 'Plan';
+$lang->custom->planStatus = 'Enable Plan';
+$lang->custom->concept = 'Concept';
+
+$lang->custom->object['program'] = 'Program';
+$lang->custom->program->fields['unitList'] = 'Unit List';
+
+$lang->custom->unitList['efficiency'] = 'Working Hours/';
+$lang->custom->unitList['manhour'] = 'Man-hour/';
+$lang->custom->unitList['cost'] = 'Yuan/Hour';
+$lang->custom->unitList['hours'] = 'Hours';
+$lang->custom->unitList['days'] = 'Days';
+$lang->custom->unitList['loc'] = 'KLOC';
+
+$lang->custom->tipProgressList['SPI'] = 'Schedule Performance Index(SPI)';
+$lang->custom->tipProgressList['SV'] = 'Schedule Variance(SV%)';
+
+$lang->custom->tipCostList['CPI'] = 'Cost Performed Index(CPI)';
+$lang->custom->tipCostList['CV'] = 'Cost Variance(CV%)';
+
+$lang->custom->planStatusList[0] = 'No';
+$lang->custom->planStatusList[1] = 'Yes';
+
+$lang->custom->tipRangeList[0] = 'No';
+$lang->custom->tipRangeList[1] = 'Yes';
+
+$lang->custom->regionMustNumber = 'The interval must be a number!';
+$lang->custom->tipNotEmpty = 'The prompt can not be empty!';
+
+$lang->custom->numberError = 'The interval must be greater than zero!';
$lang->custom->object['story'] = 'Story';
$lang->custom->object['task'] = 'Task';
@@ -127,9 +170,6 @@ $lang->custom->weekendList[1] = '1-Day Off';
$lang->custom->productProject = new stdclass();
$lang->custom->productProject->relation['0_0'] = 'Product - Project';
$lang->custom->productProject->relation['0_1'] = 'Product - Iteration';
-$lang->custom->productProject->relation['1_1'] = 'Project - Iteration';
-$lang->custom->productProject->relation['0_2'] = 'Product - Sprint';
-$lang->custom->productProject->relation['1_2'] = 'Project - Sprint';
$lang->custom->productProject->notice = 'Please select a concept according to your team.';
@@ -158,6 +198,6 @@ $lang->custom->conceptOptions->story['0'] = 'Requiremenet';
$lang->custom->conceptOptions->story['1'] = 'Story';
$lang->custom->conceptOptions->hourPoint = array();
-$lang->custom->conceptOptions->hourPoint['0'] = 'Hour';
$lang->custom->conceptOptions->hourPoint['1'] = 'Story Point';
$lang->custom->conceptOptions->hourPoint['2'] = 'Function Point';
+$lang->custom->conceptOptions->hourPoint['3'] = 'Code Line';
diff --git a/module/custom/lang/en.php b/module/custom/lang/en.php
index e6ca436090..ac93f64768 100644
--- a/module/custom/lang/en.php
+++ b/module/custom/lang/en.php
@@ -198,7 +198,6 @@ $lang->custom->conceptOptions->story['0'] = 'Requiremenet';
$lang->custom->conceptOptions->story['1'] = 'Story';
$lang->custom->conceptOptions->hourPoint = array();
-$lang->custom->conceptOptions->hourPoint['0'] = 'Hour';
$lang->custom->conceptOptions->hourPoint['1'] = 'Story Point';
$lang->custom->conceptOptions->hourPoint['2'] = 'Function Ponit';
$lang->custom->conceptOptions->hourPoint['3'] = 'Code Line';
diff --git a/module/custom/lang/fr.php b/module/custom/lang/fr.php
index e20e039409..8595526b3f 100644
--- a/module/custom/lang/fr.php
+++ b/module/custom/lang/fr.php
@@ -1,24 +1,67 @@
custom->common = 'Personnalisation';
-$lang->custom->index = 'Accueil';
-$lang->custom->set = 'Personnaliser';
-$lang->custom->restore = 'Réinitialiser';
-$lang->custom->key = 'Clé';
-$lang->custom->value = 'Valeur';
-$lang->custom->flow = 'Concept';
-$lang->custom->working = 'Mode';
-$lang->custom->select = 'Choix du Concept';
-$lang->custom->branch = 'Multi-Branches';
-$lang->custom->owner = 'Propriétaire';
-$lang->custom->module = 'Module';
-$lang->custom->section = 'Section';
-$lang->custom->lang = 'Langue';
-$lang->custom->setPublic = 'Set Public';
-$lang->custom->required = 'Champ Obligatoire';
-$lang->custom->score = 'Point';
-$lang->custom->timezone = 'Timezone';
-$lang->custom->scoreReset = 'Réinit Points';
-$lang->custom->scoreTitle = 'Fonctionnalité des Points';
+$lang->custom->common = 'Personnalisation';
+$lang->custom->index = 'Accueil';
+$lang->custom->set = 'Personnaliser';
+$lang->custom->restore = 'Réinitialiser';
+$lang->custom->key = 'Clé';
+$lang->custom->value = 'Valeur';
+$lang->custom->flow = 'Concept';
+$lang->custom->working = 'Mode';
+$lang->custom->select = 'Choix du Concept';
+$lang->custom->branch = 'Multi-Branches';
+$lang->custom->owner = 'Propriétaire';
+$lang->custom->module = 'Module';
+$lang->custom->section = 'Section';
+$lang->custom->lang = 'Langue';
+$lang->custom->setPublic = 'Set Public';
+$lang->custom->required = 'Champ Obligatoire';
+$lang->custom->score = 'Point';
+$lang->custom->timezone = 'Timezone';
+$lang->custom->scoreReset = 'Réinit Points';
+$lang->custom->scoreTitle = 'Fonctionnalité des Points';
+$lang->custom->setscrum = 'Interval Hint';
+$lang->custom->setWaterfall = 'Switch Views';
+$lang->custom->estimate = 'Estimated configuration';
+$lang->custom->estimateConfig = 'Estimated configuration';
+$lang->custom->estimateUnit = 'Estimating Unit';
+$lang->custom->estimateEfficiency = 'Productivity';
+$lang->custom->estimateCost = 'Unit Labour Cost';
+$lang->custom->estimateHours = 'Daily Working Hours';
+$lang->custom->estimateDays = 'Working Days Per Week';
+$lang->custom->region = 'Interval';
+$lang->custom->tips = 'Tips';
+$lang->custom->setTips = 'Set Tips';
+$lang->custom->isRange = 'Is Target Control';
+$lang->custom->plan = 'Plan';
+$lang->custom->planStatus = 'Enable Plan';
+$lang->custom->concept = 'Concept';
+
+$lang->custom->object['program'] = 'Program';
+$lang->custom->program->fields['unitList'] = 'Unit List';
+
+$lang->custom->unitList['efficiency'] = 'Working Hours/';
+$lang->custom->unitList['manhour'] = 'Man-hour/';
+$lang->custom->unitList['cost'] = 'Yuan/Hour';
+$lang->custom->unitList['hours'] = 'Hours';
+$lang->custom->unitList['days'] = 'Days';
+$lang->custom->unitList['loc'] = 'KLOC';
+
+$lang->custom->tipProgressList['SPI'] = 'Schedule Performance Index(SPI)';
+$lang->custom->tipProgressList['SV'] = 'Schedule Variance(SV%)';
+
+$lang->custom->tipCostList['CPI'] = 'Cost Performed Index(CPI)';
+$lang->custom->tipCostList['CV'] = 'Cost Variance(CV%)';
+
+$lang->custom->planStatusList[0] = 'No';
+$lang->custom->planStatusList[1] = 'Yes';
+
+$lang->custom->tipRangeList[0] = 'No';
+$lang->custom->tipRangeList[1] = 'Yes';
+
+$lang->custom->regionMustNumber = 'The interval must be a number!';
+$lang->custom->tipNotEmpty = 'The prompt can not be empty!';
+
+$lang->custom->numberError = 'The interval must be greater than zero!';
$lang->custom->object['story'] = 'Story';
$lang->custom->object['task'] = 'Tâche';
@@ -127,9 +170,6 @@ $lang->custom->weekendList[1] = '1-Jour';
$lang->custom->productProject = new stdclass();
$lang->custom->productProject->relation['0_0'] = 'Product - Project';
$lang->custom->productProject->relation['0_1'] = 'Product - Iteration';
-$lang->custom->productProject->relation['1_1'] = 'Project - Iteration';
-$lang->custom->productProject->relation['0_2'] = 'Product - Sprint';
-$lang->custom->productProject->relation['1_2'] = 'Project - Sprint';
$lang->custom->productProject->notice = 'Sélectionnez le concept qui correspond à votre équipe.';
@@ -158,6 +198,6 @@ $lang->custom->conceptOptions->story['0'] = 'Exigence';
$lang->custom->conceptOptions->story['1'] = 'Story';
$lang->custom->conceptOptions->hourPoint = array();
-$lang->custom->conceptOptions->hourPoint['0'] = 'Heures';
$lang->custom->conceptOptions->hourPoint['1'] = 'Points de Story';
$lang->custom->conceptOptions->hourPoint['2'] = 'Points de Fonction';
+$lang->custom->conceptOptions->hourPoint['3'] = 'Code Line';
diff --git a/module/custom/lang/vi.php b/module/custom/lang/vi.php
index ebbe49bd0f..b2242a89ca 100644
--- a/module/custom/lang/vi.php
+++ b/module/custom/lang/vi.php
@@ -1,24 +1,67 @@
custom->common = 'Tùy biến';
-$lang->custom->index = 'Trang chủ';
-$lang->custom->set = 'Tùy biến';
-$lang->custom->restore = 'Thiết lập lại';
-$lang->custom->key = 'Khóa';
-$lang->custom->value = 'Giá trị';
-$lang->custom->flow = 'Mô hình';
-$lang->custom->working = 'Chế độ';
-$lang->custom->select = 'Chọn mô hình';
-$lang->custom->branch = 'Multi-Branch';
-$lang->custom->owner = 'Sở hữu';
-$lang->custom->module = 'Module';
-$lang->custom->section = 'Section';
-$lang->custom->lang = 'Ngôn ngữ';
-$lang->custom->setPublic = 'Thiết lập Public';
-$lang->custom->required = 'Trường bắt buộc';
-$lang->custom->score = 'Điểm';
-$lang->custom->timezone = 'Timezone';
-$lang->custom->scoreReset = 'Thiết lập lại điểm';
-$lang->custom->scoreTitle = 'Tính năng điểm';
+$lang->custom->common = 'Tùy biến';
+$lang->custom->index = 'Trang chủ';
+$lang->custom->set = 'Tùy biến';
+$lang->custom->restore = 'Thiết lập lại';
+$lang->custom->key = 'Khóa';
+$lang->custom->value = 'Giá trị';
+$lang->custom->flow = 'Mô hình';
+$lang->custom->working = 'Chế độ';
+$lang->custom->select = 'Chọn mô hình';
+$lang->custom->branch = 'Multi-Branch';
+$lang->custom->owner = 'Sở hữu';
+$lang->custom->module = 'Module';
+$lang->custom->section = 'Section';
+$lang->custom->lang = 'Ngôn ngữ';
+$lang->custom->setPublic = 'Thiết lập Public';
+$lang->custom->required = 'Trường bắt buộc';
+$lang->custom->score = 'Điểm';
+$lang->custom->timezone = 'Timezone';
+$lang->custom->scoreReset = 'Thiết lập lại điểm';
+$lang->custom->scoreTitle = 'Tính năng điểm';
+$lang->custom->setscrum = 'Interval Hint';
+$lang->custom->setWaterfall = 'Switch Views';
+$lang->custom->estimate = 'Estimated configuration';
+$lang->custom->estimateConfig = 'Estimated configuration';
+$lang->custom->estimateUnit = 'Estimating Unit';
+$lang->custom->estimateEfficiency = 'Productivity';
+$lang->custom->estimateCost = 'Unit Labour Cost';
+$lang->custom->estimateHours = 'Daily Working Hours';
+$lang->custom->estimateDays = 'Working Days Per Week';
+$lang->custom->region = 'Interval';
+$lang->custom->tips = 'Tips';
+$lang->custom->setTips = 'Set Tips';
+$lang->custom->isRange = 'Is Target Control';
+$lang->custom->plan = 'Plan';
+$lang->custom->planStatus = 'Enable Plan';
+$lang->custom->concept = 'Concept';
+
+$lang->custom->object['program'] = 'Program';
+$lang->custom->program->fields['unitList'] = 'Unit List';
+
+$lang->custom->unitList['efficiency'] = 'Working Hours/';
+$lang->custom->unitList['manhour'] = 'Man-hour/';
+$lang->custom->unitList['cost'] = 'Yuan/Hour';
+$lang->custom->unitList['hours'] = 'Hours';
+$lang->custom->unitList['days'] = 'Days';
+$lang->custom->unitList['loc'] = 'KLOC';
+
+$lang->custom->tipProgressList['SPI'] = 'Schedule Performance Index(SPI)';
+$lang->custom->tipProgressList['SV'] = 'Schedule Variance(SV%)';
+
+$lang->custom->tipCostList['CPI'] = 'Cost Performed Index(CPI)';
+$lang->custom->tipCostList['CV'] = 'Cost Variance(CV%)';
+
+$lang->custom->planStatusList[0] = 'No';
+$lang->custom->planStatusList[1] = 'Yes';
+
+$lang->custom->tipRangeList[0] = 'No';
+$lang->custom->tipRangeList[1] = 'Yes';
+
+$lang->custom->regionMustNumber = 'The interval must be a number!';
+$lang->custom->tipNotEmpty = 'The prompt can not be empty!';
+
+$lang->custom->numberError = 'The interval must be greater than zero!';
$lang->custom->object['story'] = 'Câu chuyện';
$lang->custom->object['task'] = 'Nhiệm vụ';
@@ -127,9 +170,6 @@ $lang->custom->weekendList[1] = '1 ngày nghỉ';
$lang->custom->productProject = new stdclass();
$lang->custom->productProject->relation['0_0'] = 'Sản phẩm - Dự án';
$lang->custom->productProject->relation['0_1'] = 'Sản phẩm - lặp lại';
-$lang->custom->productProject->relation['1_1'] = 'Dự án - lặp lại';
-$lang->custom->productProject->relation['0_2'] = 'Sản phẩm - Sprint';
-$lang->custom->productProject->relation['1_2'] = 'Dự án - Sprint';
$lang->custom->productProject->notice = 'Chọn một mô hình phù hợp với doanh nghiệp của bạn.';
@@ -158,6 +198,6 @@ $lang->custom->conceptOptions->story['0'] = 'Điều kiện';
$lang->custom->conceptOptions->story['1'] = 'Câu chuyện';
$lang->custom->conceptOptions->hourPoint = array();
-$lang->custom->conceptOptions->hourPoint['0'] = 'Giờ';
$lang->custom->conceptOptions->hourPoint['1'] = 'Điểm';
$lang->custom->conceptOptions->hourPoint['2'] = 'Function Point';
+$lang->custom->conceptOptions->hourPoint['3'] = 'Code Line';
diff --git a/module/custom/model.php b/module/custom/model.php
index 44843e9782..41612151ec 100644
--- a/module/custom/model.php
+++ b/module/custom/model.php
@@ -362,13 +362,13 @@ class customModel extends model
}
/**
- * Get system swapper.
+ * Get system mode switcher.
* @param string $module
* @param string $method
* @access public
* @return array
*/
- public function getSwapper()
+ public function getModeSwitcher()
{
$current = (isset($_COOKIE['systemModel']) and $_COOKIE['systemModel'] == 'scrum') ? 'Scrum' : 'CMMI';
$link = (isset($_COOKIE['systemModel']) and $_COOKIE['systemModel'] == 'scrum') ? html::a(helper::createLink('custom', 'setwaterfall'), 'CMMI') : html::a(helper::createLink('custom', 'setscrum'), 'Scrum');
diff --git a/module/dept/model.php b/module/dept/model.php
index 49add44902..4e735cc36e 100644
--- a/module/dept/model.php
+++ b/module/dept/model.php
@@ -349,7 +349,10 @@ class deptModel extends model
/**
* Get users of a deparment.
*
- * @param int $deptID
+ * @param varchar $browseType inside|outside|all
+ * @param int $deptID
+ * @param object $pager
+ * @param varchar $orderBy
* @access public
* @return array
*/
@@ -357,7 +360,7 @@ class deptModel extends model
{
return $this->dao->select('*')->from(TABLE_USER)
->where('deleted')->eq(0)
- ->beginIF($browseType == 'inside')->andWhere('type')->eq('')->fi()
+ ->beginIF($browseType == 'inside')->andWhere('type')->eq('inside')->fi()
->beginIF($browseType == 'outside')->andWhere('type')->eq('outside')->fi()
->beginIF($deptID)->andWhere('dept')->in($deptID)->fi()
->orderBy($orderBy)
diff --git a/module/design/config.php b/module/design/config.php
index 92ff3e5832..61486c4830 100644
--- a/module/design/config.php
+++ b/module/design/config.php
@@ -21,8 +21,6 @@ $config->design->search['fields']['commit'] = $lang->design->submission;
$config->design->search['fields']['createdBy'] = $lang->design->createdBy;
$config->design->search['fields']['createdDate'] = $lang->design->createdDate;
$config->design->search['fields']['assignedTo'] = $lang->design->assignedTo;
-$config->design->search['fields']['commitBy'] = $lang->design->commitBy;
-$config->design->search['fields']['commitDate'] = $lang->design->commitDate;
$config->design->search['fields']['story'] = $lang->design->story;
$config->design->search['params']['type'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->design->typeList);
@@ -31,6 +29,4 @@ $config->design->search['params']['commit'] = array('operator' => 'include'
$config->design->search['params']['createdBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
$config->design->search['params']['createdDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
$config->design->search['params']['assignedTo'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
-$config->design->search['params']['commitBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users');
-$config->design->search['params']['commitDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
$config->design->search['params']['story'] = array('operator' => '=', 'control' => 'select', 'values' => '');
diff --git a/module/design/control.php b/module/design/control.php
index 74373af463..1baf251190 100644
--- a/module/design/control.php
+++ b/module/design/control.php
@@ -2,7 +2,7 @@
/**
* The control file of design module of ZenTaoPMS.
*
- * @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
+ * @copyright Copyright 2009-2020 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang
* @package design
@@ -220,13 +220,16 @@ class design extends control
*/
public function linkCommit($designID = 0, $repoID = 0, $begin = '', $end = '', $recTotal = 0, $recPerPage = 50, $pageID = 1)
{
+ /* Init pager and get designs. */
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
+ /* Get program and date. */
$program = $this->loadModel('project')->getByID($this->session->program);
$begin = $begin ? date('Y-m-d', strtotime($begin)) : $program->begin;
$end = $end ? date('Y-m-d', strtotime($end)) : helper::today();
+ /* Get the repository information through the repoID. */
$repos = $this->loadModel('repo')->getRepoPairs($this->session->program);
$repoID = $repoID ? $repoID : key($repos);
$repo = $repoID ? $this->loadModel('repo')->getRepoByID($repoID) : '';
@@ -243,6 +246,7 @@ class design extends control
$this->send($result);
}
+ /* Linked submission. */
$linkedRevisions = array();
$relations = $this->loadModel('common')->getRelations('design', $designID, 'commit');
foreach($relations as $relation) $linkedRevisions[] = $relation->BID;
@@ -265,7 +269,29 @@ class design extends control
}
/**
- * A version of the code base.
+ * Design unlink commits.
+ *
+ * @param int $designID
+ * @param int $commitID
+ * @param string $confirm
+ * @access public
+ * @return void
+ */
+ public function unlinkCommit($designID = 0, $commitID = 0, $confirm = 'no')
+ {
+ if($confirm == 'no')
+ {
+ die(js::confirm($this->lang->design->confirmUnlink, inlink('unlinkCommit', "designID=$designID&commitID=$commitID&confirm=yes")));
+ }
+ else
+ {
+ $this->design->unlinkCommit($designID, $commitID);
+ die(js::reload('parent'));
+ }
+ }
+
+ /**
+ * A version of the repository.
*
* @param int $repoID
* @access public
@@ -278,6 +304,31 @@ class design extends control
header("location:" . $repoURL);
}
+ /**
+ * View a design's commit.
+ *
+ * @param int $designID
+ * @param int $recTotal
+ * @param int $recPerPage
+ * @param int $pageID
+ * @access public
+ * @return void
+ */
+ public function viewCommit($designID = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
+ {
+ /* Init pager and get designs. */
+ $this->app->loadClass('pager', $static = true);
+ $pager = pager::init($recTotal, $recPerPage, $pageID);
+
+ $this->view->title = $this->lang->design->common . $this->lang->colon . $this->lang->design->submission;
+ $this->view->position[] = $this->lang->design->submission;
+
+ $this->view->design = $this->design->getCommit($designID, $pager);
+ $this->view->pager = $pager;
+
+ $this->display();
+ }
+
/**
* Delete a design.
*
diff --git a/module/design/js/linkcommit.js b/module/design/js/linkcommit.js
index 3e15d442a5..ffeae66e03 100644
--- a/module/design/js/linkcommit.js
+++ b/module/design/js/linkcommit.js
@@ -17,5 +17,12 @@ $('#begin, #end, #repo').change(function()
for(i = 0 ; i < endarray.length ; i++) end = end + endarray[i];
}
+ if(begin > end)
+ {
+ alert(error);
+ location.href = createLink('design', 'linkCommit', "designID=" + designID + '&repoID=' + repo);
+ die;
+ }
+
location.href = createLink('design', 'linkCommit', "designID=" + designID + '&repoID=' + repo + '&begin=' + begin + '&end=' + end);
})
diff --git a/module/design/lang/en.php b/module/design/lang/en.php
index 9979ec2d85..7c9ada42ac 100644
--- a/module/design/lang/en.php
+++ b/module/design/lang/en.php
@@ -27,8 +27,8 @@ $lang->design->desc = 'Description';
$lang->design->range = 'Impact';
$lang->design->product = 'Linked Product';
$lang->design->basicInfo = 'Basic Information';
-$lang->design->commitDate = 'Committed Date';
$lang->design->commitBy = 'Commit By';
+$lang->design->commitDate = 'Committed Date';
$lang->design->affectedStory = "{$lang->storyCommon}";
$lang->design->affectedTasks = 'Task';
$lang->design->reviewObject = 'Review Object';
@@ -38,17 +38,19 @@ $lang->design->basicInfo = 'Basic Information';
$lang->design->noAssigned = 'Unassigned';
/* Action list. */
-$lang->design->common = 'Design';
-$lang->design->create = 'Create Design';
-$lang->design->batchCreate = 'Batch Create';
-$lang->design->edit = 'Edit';
-$lang->design->delete = 'Delete';
-$lang->design->view = 'View';
-$lang->design->browse = 'List';
-$lang->design->commit = 'Link Commit';
-$lang->design->submit = 'Submit Review';
-$lang->design->assignTo = 'Assign';
-$lang->design->revision = 'Linked Code';
+$lang->design->common = 'Design';
+$lang->design->create = 'Create Design';
+$lang->design->batchCreate = 'Batch Create';
+$lang->design->edit = 'Edit';
+$lang->design->delete = 'Delete';
+$lang->design->view = 'View';
+$lang->design->browse = 'List';
+$lang->design->viewCommit = 'View Commit';
+$lang->design->linkCommit = 'Link Commit';
+$lang->design->unlinkCommit = 'Unlink Commit';
+$lang->design->submit = 'Submit Review';
+$lang->design->assignTo = 'Assign';
+$lang->design->revision = 'Linked Code';
/* Field value. */
$lang->design->typeList = array();
@@ -69,4 +71,6 @@ $lang->design->featureBar += $lang->design->typeList;
$lang->design->errorSelection = 'No record selected!';
$lang->design->noDesign = 'No record.';
$lang->design->noCommit = 'No record commited.';
-$lang->design->confirmDelete = 'Do you want to delete this design?';
+$lang->design->confirmDelete = 'Do you want to delete this design?';
+$lang->design->confirmUnlink = 'Are you sure you want to remove this submission?';
+$lang->design->errorDate = 'The start date can not be greater than the end date.';
diff --git a/module/design/lang/zh-cn.php b/module/design/lang/zh-cn.php
index 7b8cb6bae4..be1155fe7e 100644
--- a/module/design/lang/zh-cn.php
+++ b/module/design/lang/zh-cn.php
@@ -38,17 +38,19 @@ $lang->design->basicInfo = '基本信息';
$lang->design->noAssigned = '未指派';
/* 动作列表. */
-$lang->design->common = '设计';
-$lang->design->create = '创建设计';
-$lang->design->batchCreate = '批量创建';
-$lang->design->edit = '变更';
-$lang->design->delete = '删除';
-$lang->design->view = '设计概况';
-$lang->design->browse = '浏览列表';
-$lang->design->linkCommit = '关联提交';
-$lang->design->submit = '提交评审';
-$lang->design->assignTo = '指派';
-$lang->design->revision = '查看关联代码';
+$lang->design->common = '设计';
+$lang->design->create = '创建设计';
+$lang->design->batchCreate = '批量创建';
+$lang->design->edit = '变更';
+$lang->design->delete = '删除';
+$lang->design->view = '设计概况';
+$lang->design->browse = '浏览列表';
+$lang->design->viewCommit = '查看提交';
+$lang->design->linkCommit = '关联提交';
+$lang->design->unlinkCommit = '取消关联';
+$lang->design->submit = '提交评审';
+$lang->design->assignTo = '指派';
+$lang->design->revision = '查看关联代码';
/* 字段取值. */
$lang->design->typeList = array();
@@ -70,3 +72,5 @@ $lang->design->errorSelection = '还没有选中记录!';
$lang->design->noDesign = '暂时没有记录';
$lang->design->noCommit = '暂时没有提交记录';
$lang->design->confirmDelete = '您确定要删除这个设计吗?';
+$lang->design->confirmUnlink = '您确定要移除这个提交吗?';
+$lang->design->errorDate = '开始日期不能大于结束日期';
diff --git a/module/design/model.php b/module/design/model.php
index 009ec8dfbd..02634d4131 100644
--- a/module/design/model.php
+++ b/module/design/model.php
@@ -2,7 +2,7 @@
/**
* The model file of design module of ZenTaoPMS.
*
- * @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
+ * @copyright Copyright 2009-2020 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang
* @package design
@@ -172,8 +172,6 @@ class designModel extends model
*/
public function linkCommit($designID = 0, $repoID = 0)
{
- $this->dao->delete()->from(TABLE_RELATION)->where('AType')->eq('design')->andWhere('AID')->eq($designID)->andWhere('BType')->eq('commit')->andWhere('relation')->eq('completedin')->exec();
- $this->dao->delete()->from(TABLE_RELATION)->where('AType')->eq('commit')->andWhere('BID')->eq($designID)->andWhere('BType')->eq('design')->andWhere('relation')->eq('completedfrom')->exec();
$revisions = $_POST['revision'];
foreach($revisions as $revision)
@@ -199,28 +197,41 @@ class designModel extends model
$this->dao->replace(TABLE_RELATION)->data($data)->autoCheck()->exec();
}
$design = new stdclass();
- $design->commit = implode(",", $revisions);
+ $design->commit = $this->dao->select('commit')->from(TABLE_DESIGN)->where('id')->eq($designID)->fetch('commit');
+
+ if($design->commit)
+ {
+ $design->commit = implode(",", $revisions) . "," . $design->commit;
+ }
+ else
+ {
+ $design->commit = implode(",", $revisions);
+ }
+
$design->commitDate = helper::now();
$design->commitBy = $this->app->user->account;
$this->dao->update(TABLE_DESIGN)->data($design)->autoCheck()->where('id')->eq($designID)->exec();
}
/**
- * Set product menu.
+ * Unlink commit.
*
- * @param int $productID
+ * @param int $designID
+ * @param int $commitID
* @access public
* @return void
*/
- public function setProductMenu($productID = 0)
+ public function unlinkCommit($designID = 0, $commitID = 0)
{
- $programID = $this->session->program;
- $program = $this->loadModel('project')->getByID($programID);
- $products = $this->loadModel('product')->getPairs('', $programID);
- $productID = in_array($productID, array_keys($products)) ? $productID : key($products);
+ /* Delete data in the zt_relation.*/
+ $this->dao->delete()->from(TABLE_RELATION)->where('AType')->eq('design')->andwhere('AID')->eq($designID)->andwhere('BType')->eq('commit')->andwhere('relation')->eq('completedin')->andWhere('BID')->eq($commitID)->exec();
+ $this->dao->delete()->from(TABLE_RELATION)->where('AType')->eq('commit')->andwhere('BID')->eq($designID)->andwhere('BType')->eq('design')->andwhere('relation')->eq('completedfrom')->andWhere('AID')->eq($commitID)->exec();
- $productID = $this->loadModel('product')->saveState($productID, $products);
- if($program->category == 'multiple') $this->loadModel('product')->setMenu($products, $productID);
+ /* Commit after unlinking. */
+ $commit = $this->dao->select('BID')->from(TABLE_RELATION)->where('AType')->eq('design')->andWhere('AID')->eq($designID)->fetchAll('BID');
+ $commit = implode(",", array_keys($commit));
+
+ $this->dao->update(TABLE_DESIGN)->set('commit')->eq($commit)->where('id')->eq($designID)->exec();
}
/**
@@ -240,6 +251,7 @@ class designModel extends model
$design->commit = '';
$relations = $this->loadModel('common')->getRelations('design', $designID, 'commit');
foreach($relations as $relation) $design->commit .= html::a(helper::createLink('design', 'revision', "repoID=$relation->BID"), "#$relation->BID", '_blank');
+
return $this->loadModel('file')->replaceImgURL($design, 'desc');
}
@@ -312,16 +324,44 @@ class designModel extends model
->fetchAll('id');
}
- foreach($designs as $id => $design)
- {
- $design->commit = '';
- $relations = $this->loadModel('common')->getRelations('design', $id, 'commit');
- foreach($relations as $relation) $design->commit .= html::a(helper::createLink('design', 'revision', "repoID=$relation->BID", '', true), "#$relation->BID", '_blank');
- }
-
return $designs;
}
+ /**
+ * Get commit.
+ *
+ * @param int $designID
+ * @param int $pager
+ * @access public
+ * @return object
+ */
+ public function getCommit($designID = 0, $pager = null)
+ {
+ $design = $this->dao->select('*')->from(TABLE_DESIGN)->where('id')->eq($designID)->fetch();
+
+ $design->commit = $this->dao->select('*')->from(TABLE_REPOHISTORY)->where('id')->in($design->commit)->page($pager)->fetchAll('id');
+
+ return $design;
+ }
+
+ /**
+ * Set product menu.
+ *
+ * @param int $productID
+ * @access public
+ * @return void
+ */
+ public function setProductMenu($productID = 0)
+ {
+ $programID = $this->session->program;
+ $program = $this->loadModel('project')->getByID($programID);
+ $products = $this->loadModel('product')->getPairs('', $programID);
+ $productID = in_array($productID, array_keys($products)) ? $productID : key($products);
+
+ $productID = $this->loadModel('product')->saveState($productID, $products);
+ if($program->category == 'multiple') $this->loadModel('product')->setMenu($products, $productID);
+ }
+
/**
* Get designs by search.
*
diff --git a/module/design/view/browse.html.php b/module/design/view/browse.html.php
index ba4ad2968f..63b3205ad6 100644
--- a/module/design/view/browse.html.php
+++ b/module/design/view/browse.html.php
@@ -42,10 +42,9 @@
recTotal}&recPerPage={$pager->recPerPage}";?>
- idAB);?>
+ design->id);?>
design->type);?>
design->name);?>
- design->submission);?>
design->createdBy);?>
design->createdDate);?>
design->assignedTo);?>
@@ -58,23 +57,22 @@
id);?>
design->typeList, $design->type);?>
createLink('design', 'view', "id={$design->id}"), $design->name);?>
- commit;?>
createdBy;?>
createdDate, 0, 11);?>
design->printAssignedHtml($design, $users);?>
id}";
- common::printIcon('design', 'edit', $vars, $design, 'list', 'fork', '', '', '', '', '', $design->program);
- common::printIcon('design', 'linkCommit', $vars, $design, 'list', 'link', '', 'iframe showinonlybody', true);
- common::printIcon('design', 'delete', $vars, $design, 'list', 'trash', 'hiddenwin', '', '', '', '', $design->program);
+ common::printIcon('design', 'edit', $vars, $design, 'list', 'fork', '', '', '', '', '', $design->program);
+ common::printIcon('design', 'viewCommit', $vars, $design, 'list', 'glasses', '', 'iframe showinonlybody', true);
+ common::printIcon('design', 'delete', $vars, $design, 'list', 'trash', 'hiddenwin', '', '', '', '', $design->program);
?>
-
@@ -84,4 +85,5 @@
+design->errorDate);?>
diff --git a/module/design/view/viewcommit.html.php b/module/design/view/viewcommit.html.php
new file mode 100644
index 0000000000..d0982c8b8a
--- /dev/null
+++ b/module/design/view/viewcommit.html.php
@@ -0,0 +1,57 @@
+
+ * @package design
+ * @version $Id: commit.html.php 4903 2013-06-26 05:32:59Z wyd621@gmail.com $
+ * @link http://www.zentao.net
+ */
+?>
+
+
- createLink('doc', 'browse', "libID={$lib->id}&browseType=all¶m=0&orderBy=$orderBy&from=$from"), " " . $lib->name);?>
+ id}&browseType=all¶m=0&orderBy=$orderBy&from=$from"), " " . $lib->name);?>
@@ -124,9 +124,9 @@ var browseType = '';
$attachLib):?>
- createLink('doc', 'allLibs', "type=project&product={$currentLib->product}"), " " . $attachLib->name);?>
+ product}"), " " . $attachLib->name);?>
- createLink('doc', 'showFiles', "type=$type&objectID={$currentLib->$type}"), " " . $attachLib->name);?>
+ $type}"), " " . $attachLib->name);?>
@@ -141,7 +141,7 @@ var browseType = '';
collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
- createLink('doc', 'browse', "libID=$libID&browseType=bymodule¶m=$module->id&orderBy=$orderBy&from=$from"), " " . $module->name);?>
+ id&orderBy=$orderBy&from=$from"), " " . $module->name);?>
@@ -158,7 +158,7 @@ var browseType = '';
collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
- createLink('doc', 'view', "docID=$doc->id"), " " . $doc->title);?>
+ id"), " " . $doc->title);?>
fileSize ? $doc->fileSize : '-';?>
addedBy);?>
addedDate, 'y-m-d');?>
diff --git a/module/doc/view/side.html.php b/module/doc/view/side.html.php
index 2dbf572ce4..f2d940ea7c 100644
--- a/module/doc/view/side.html.php
+++ b/module/doc/view/side.html.php
@@ -66,19 +66,19 @@ $sideWidth = common::checkNotCN() ? '270' : '238';
createLink('doc', 'allLibs', "type=project&product=$tabMenu->id");
+ $subLibLink = inlink('allLibs', "type=project&product=$tabMenu->id");
$activeClass = ($this->methodName == 'alllibs' && $type == 'project' && $$tabValue == $tabMenu->id) ? "class='active'" : '';
$icon = 'icon-stack';
}
elseif($subLibID == 'files')
{
- $subLibLink = $this->createLink('doc', 'showFiles', "type=$tabValue&objectID=$tabMenu->id");
+ $subLibLink = inlink('showFiles', "type=$tabValue&objectID=$tabMenu->id");
$activeClass = ($this->methodName == 'showfiles' && $type == $tabValue && $object->id == $tabMenu->id) ? "class='active'" : '';
$icon = 'icon-paper-clip';
}
else
{
- $subLibLink = $this->createLink('doc', 'browse', "libID=$subLibID");
+ $subLibLink = inlink('browse', "libID=$subLibID");
$activeClass = ($this->methodName == 'browse' && $browseType != 'bymodule' && $subLibID == $libID) ? "class='active'" : '';
$icon = 'icon-folder-outline';
}
@@ -181,7 +181,7 @@ $sideWidth = common::checkNotCN() ? '270' : '238';
doc->customShowLibs;?>
+
+ id, $linkedRevisions)) continue;?>
show('right', 'pagerjs');?>
diff --git a/module/design/view/linkcommit.html.php b/module/design/view/linkcommit.html.php
index edd10c77a9..ad88e3a651 100644
--- a/module/design/view/linkcommit.html.php
+++ b/module/design/view/linkcommit.html.php
@@ -54,10 +54,11 @@
- revision, $linkedRevisions)) echo 'checked="checked"'?>/>
+
+
+
+
+
+
diff --git a/module/doc/control.php b/module/doc/control.php
index b2d425559a..df3cab5819 100644
--- a/module/doc/control.php
+++ b/module/doc/control.php
@@ -302,7 +302,7 @@ class doc extends control
if(!$docResult or dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$docID = $docResult['id'];
- $files = isset($docResult['files']) ? $docResult['files'] : '';
+ $files = zget($docResult, 'files', '');
$lib = $this->doc->getLibByID($this->post->lib);
if($docResult['status'] == 'exists')
{
diff --git a/module/doc/view/browse.html.php b/module/doc/view/browse.html.php
index ea07434a31..16f0bda852 100644
--- a/module/doc/view/browse.html.php
+++ b/module/doc/view/browse.html.php
@@ -105,7 +105,7 @@ var browseType = '';
collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
+
+ + id;?> + name?> + arrow . $lang->design->submission;?> +
+
+ id", "" . $lang->design->linkCommit, '_blank', "class='btn btn-primary'");?>
+
+ commit)):?>
+
+
+
+ design->noCommit;?>
+| design->submission;?> | +design->commitBy;?> | +design->commitDate;?> | +design->actions;?> | +
|---|---|---|---|
| id"), "#$commit->id", '_blank');?> | +committer;?> | +time, 0, 11);?> | ++ id&commitID=$commit->id", $design, 'list', 'unlink', 'hiddenwin', 'iframe showinonlybody', true);?> + | +
+ show('right', 'pagerjs');?>
+
+
+
-