* Code for UR name and SR name.
This commit is contained in:
@@ -321,8 +321,7 @@ CREATE TABLE IF NOT EXISTS `zt_weeklyreport`(
|
||||
REPLACE INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES
|
||||
('system','custom','','hourPoint','1'),
|
||||
('system','custom','','URAndSR','1'),
|
||||
('system','custom','waterfall','URSRName','{\"URCommon\":{\"zh-cn\":\"\\u7528\\u6237\\u9700\\u6c42\"},\"SRCommon\":{\"zh-cn\":\"\\u8f6f\\u4ef6\\u9700\\u6c42\"}}'),
|
||||
('system','custom','scrum','URSRName','{\"URCommon\":{\"zh-cn\":\"\\u53f2\\u8bd7\"},\"SRCommon\":{\"zh-cn\":\"\\u6545\\u4e8b\"}}');
|
||||
('system','custom','common','URSRName','{"URCommon":{"zh-cn":"\u7528\u6237\u9700\u6c42"},"SRCommon":{"zh-cn":"\u8f6f\u4ef6\u9700\u6c42"}}');
|
||||
|
||||
ALTER TABLE `zt_block` ADD `type` char(30) NOT NULL AFTER `module`;
|
||||
ALTER TABLE `zt_block` ADD UNIQUE `account_module_type_order` (`account`, `module`, `type`, `order`), DROP INDEX `accountModuleOrder`;
|
||||
|
||||
+1
-2
@@ -4055,5 +4055,4 @@ INSERT INTO `zt_stage` (`name`,`percent`,`type`,`createdBy`,`createdDate`,`edite
|
||||
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES
|
||||
('system','custom','','hourPoint','1'),
|
||||
('system','custom','','URAndSR','1'),
|
||||
('system','custom','waterfall','URSRName','{\"URCommon\":{\"zh-cn\":\"\\u7528\\u6237\\u9700\\u6c42\"},\"SRCommon\":{\"zh-cn\":\"\\u8f6f\\u4ef6\\u9700\\u6c42\"}}'),
|
||||
('system','custom','scrum','URSRName','{\"URCommon\":{\"zh-cn\":\"\\u53f2\\u8bd7\"},\"SRCommon\":{\"zh-cn\":\"\\u6545\\u4e8b\"}}');
|
||||
('system','custom','common','URSRName','{"URCommon":{"zh-cn":"\u7528\u6237\u9700\u6c42"},"SRCommon":{"zh-cn":"\u8f6f\u4ef6\u9700\u6c42"}}');
|
||||
|
||||
@@ -154,6 +154,11 @@ class router extends baseRouter
|
||||
$model->model = 'scrum';
|
||||
if($this->session->PRJ) $model = $this->dbh->query('SELECT model FROM' . TABLE_PROJECT . "WHERE id = {$this->session->PRJ}")->fetch();
|
||||
|
||||
if(isset($model->model) && $model->model == 'waterfall')
|
||||
{
|
||||
$projectIndex = 2;
|
||||
}
|
||||
|
||||
foreach($commonSettings as $setting)
|
||||
{
|
||||
if($setting->key == 'productProject') list($productIndex, $projectIndex) = explode('_', $setting->value);
|
||||
@@ -163,21 +168,12 @@ class router extends baseRouter
|
||||
|
||||
if($setting->key == 'URSRName')
|
||||
{
|
||||
if(isset($model->model) && $setting->section == $model->model)
|
||||
{
|
||||
$URSRName = json_decode($setting->value, true);
|
||||
if(isset($URSRName['URCommon'][$this->clientLang])) $lang->URCommon = $URSRName['URCommon'][$this->clientLang];
|
||||
if(isset($URSRName['SRCommon'][$this->clientLang])) $lang->SRCommon = $URSRName['SRCommon'][$this->clientLang];
|
||||
}
|
||||
$URSRName = json_decode($setting->value, true);
|
||||
if(isset($URSRName['URCommon'][$this->clientLang])) $lang->URCommon = $URSRName['URCommon'][$this->clientLang];
|
||||
if(isset($URSRName['SRCommon'][$this->clientLang])) $lang->SRCommon = $URSRName['SRCommon'][$this->clientLang];
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($model->model) && $model->model == 'waterfall')
|
||||
{
|
||||
$projectIndex = 2;
|
||||
//$planIndex = 1;
|
||||
}
|
||||
|
||||
$config->storyCommon = $storyIndex;
|
||||
$config->URAndSR = $URAndSR;
|
||||
|
||||
|
||||
@@ -400,7 +400,7 @@ class custom extends control
|
||||
{
|
||||
if($type == 'concept')
|
||||
{
|
||||
$this->custom->setURAndSR('waterfall');
|
||||
$this->custom->setURAndSR();
|
||||
}
|
||||
|
||||
if($type == 'user' and isset($_POST['keys']))
|
||||
@@ -457,11 +457,11 @@ class custom extends control
|
||||
{
|
||||
$URSRName = $this->dao->select("`value`")->from(TABLE_CONFIG)
|
||||
->where('module')->eq('custom')
|
||||
->andWhere('section')->eq('waterfall')
|
||||
->andWhere('section')->eq('common')
|
||||
->andWhere('`key`')->eq('URSRName')
|
||||
->fetch('value');
|
||||
|
||||
$this->view->URSRName = json_decode($URSRName);
|
||||
$this->view->URSRName = json_decode($URSRName);
|
||||
}
|
||||
|
||||
$this->view->title = $this->lang->custom->common;
|
||||
@@ -487,7 +487,7 @@ class custom extends control
|
||||
if($type == 'concept')
|
||||
{
|
||||
$this->custom->setConcept();
|
||||
$this->custom->setURAndSR('scrum');
|
||||
$this->custom->setURAndSR();
|
||||
}
|
||||
|
||||
if($type == 'user' && isset($_POST['keys']))
|
||||
@@ -518,11 +518,11 @@ class custom extends control
|
||||
{
|
||||
$URSRName = $this->dao->select("`value`")->from(TABLE_CONFIG)
|
||||
->where('module')->eq('custom')
|
||||
->andWhere('section')->eq('scrum')
|
||||
->andWhere('section')->eq('common')
|
||||
->andWhere('`key`')->eq('URSRName')
|
||||
->fetch('value');
|
||||
|
||||
$this->view->URSRName = json_decode($URSRName);
|
||||
$this->view->URSRName = json_decode($URSRName);
|
||||
}
|
||||
|
||||
if($type == 'user')
|
||||
|
||||
@@ -584,7 +584,7 @@ class customModel extends model
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function setURAndSR($template = 'waterfall')
|
||||
public function setURAndSR()
|
||||
{
|
||||
$data = fixer::input('post')->get();
|
||||
|
||||
@@ -595,7 +595,7 @@ class customModel extends model
|
||||
$URSRName = isset($this->config->custom->URSRName) ? json_decode($this->config->custom->URSRName, true) : array();
|
||||
$URSRName['URCommon'][$clientLang] = $data->URCommon[$clientLang];
|
||||
$URSRName['SRCommon'][$clientLang] = $data->SRCommon[$clientLang];
|
||||
$this->setting->setItem("system.custom.$template.URSRName", json_encode($URSRName));
|
||||
$this->setting->setItem("system.custom.common.URSRName", json_encode($URSRName));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user