From a623b9016b84c8acbffb8704f533283854dd474b Mon Sep 17 00:00:00 2001 From: wangyidong Date: Tue, 6 Feb 2018 10:42:51 +0800 Subject: [PATCH] * change for upgrade. --- config/config.php | 8 +- module/block/control.php | 35 - module/block/lang/en.php | 2 - module/block/lang/zh-cn.php | 2 - module/block/model.php | 8 - .../block/view/printassigntomeblock.html.php | 2 +- module/block/view/todoblock.html.php | 4 +- module/common/model.php | 4 +- module/common/view/footer.html.php | 8 +- module/common/view/header.html.php | 6 +- module/install/view/step3.html.php | 10 +- module/message/control.php | 4 +- module/message/lang/en.php | 2 +- module/message/lang/zh-cn.php | 2 +- module/product/model.php | 61 +- module/project/control.php | 2 +- module/project/lang/en.php | 2 +- module/project/lang/zh-cn.php | 8 +- module/task/model.php | 3 +- module/upgrade/model.php | 28 +- www/theme/default/style.css | 716 ---------- www/theme/zui/css/min.css | 1249 +++++++---------- www/upgrade.php.tmp | 19 +- 23 files changed, 654 insertions(+), 1531 deletions(-) diff --git a/config/config.php b/config/config.php index 60ff25b5be..8ae1a225ed 100644 --- a/config/config.php +++ b/config/config.php @@ -115,6 +115,10 @@ if(file_exists($filterConfig)) include $filterConfig; $dbConfig = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'db.php'; if(file_exists($dbConfig)) include $dbConfig; +/* 引用自定义的配置。 Include the custom config file. */ +$myConfig = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'my.php'; +if(file_exists($myConfig)) include $myConfig; + /* 禅道配置文件。zentaopms settings. */ $zentaopmsConfig = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'zentaopms.php'; if(file_exists($zentaopmsConfig)) include $zentaopmsConfig; @@ -122,7 +126,3 @@ if(file_exists($zentaopmsConfig)) include $zentaopmsConfig; /* Include extension config files. */ $extConfigFiles = glob(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'ext/*.php'); if($extConfigFiles) foreach($extConfigFiles as $extConfigFile) include $extConfigFile; - -/* 引用自定义的配置。 Include the custom config file. */ -$myConfig = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'my.php'; -if(file_exists($myConfig)) include $myConfig; diff --git a/module/block/control.php b/module/block/control.php index 4dd3789dca..aa14fda530 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -710,10 +710,8 @@ class block extends control public function printAssignToMeBlock($longBlock = true) { if(common::hasPriv('todo', 'view')) $hasViewPriv['todo'] = true; - if(common::hasPriv('story', 'view')) $hasViewPriv['story'] = true; if(common::hasPriv('task', 'view')) $hasViewPriv['task'] = true; if(common::hasPriv('bug', 'view')) $hasViewPriv['bug'] = true; - if(common::hasPriv('testcase', 'view')) $hasViewPriv['case'] = true; $params = $this->get->param; $params = json_decode(base64_decode($params)); @@ -738,20 +736,6 @@ class block extends control if(empty($todos)) unset($hasViewPriv['todo']); $this->view->todos = $todos; } - if(isset($hasViewPriv['story'])) - { - $this->app->loadLang('story'); - $stmt = $this->dao->select('*')->from(TABLE_STORY) - ->where('assignedTo')->eq($this->app->user->account) - ->andWhere('deleted')->eq('0') - ->andWhere('status')->ne('closed') - ->orderBy('id_desc'); - if(isset($params->storyNum)) $stmt->limit($params->storyNum); - $stories = $stmt->fetchAll(); - - if(empty($stories)) unset($hasViewPriv['story']); - $this->view->stories = $stories; - } if(isset($hasViewPriv['task'])) { $this->app->loadLang('task'); @@ -780,25 +764,6 @@ class block extends control if(empty($bugs)) unset($hasViewPriv['bug']); $this->view->bugs = $bugs; } - if(isset($hasViewPriv['case'])) - { - $this->app->loadLang('testcase'); - $this->app->loadLang('testtask'); - $stmt = $this->dao->select('t1.assignedTo AS assignedTo, t2.*')->from(TABLE_TESTRUN)->alias('t1') - ->leftJoin(TABLE_CASE)->alias('t2')->on('t1.case = t2.id') - ->leftJoin(TABLE_TESTTASK)->alias('t3')->on('t1.task = t3.id') - ->Where('t1.assignedTo')->eq($this->app->user->account) - ->andWhere('t1.status')->ne('done') - ->andWhere('t3.status')->ne('done') - ->andWhere('t3.deleted')->eq(0) - ->andWhere('t2.deleted')->eq(0) - ->orderBy('id_desc'); - if(isset($params->testcaseNum)) $stmt->limit($params->testcaseNum); - $cases = $stmt->fetchAll(); - - if(empty($cases)) unset($hasViewPriv['case']); - $this->view->cases = $cases; - } $this->view->hasViewPriv = $hasViewPriv; $this->view->longBlock = $longBlock; diff --git a/module/block/lang/en.php b/module/block/lang/en.php index 6a25508cd8..aa74dd0005 100644 --- a/module/block/lang/en.php +++ b/module/block/lang/en.php @@ -269,10 +269,8 @@ $lang->block->orderByList->story['stage_asc'] = 'Stage Ascending'; $lang->block->orderByList->story['stage_desc'] = 'Stage Descending'; $lang->block->todoNum = 'Todo Number'; -$lang->block->storyNum = 'Story Number'; $lang->block->taskNum = 'Task Number'; $lang->block->bugNum = 'Bug Number'; -$lang->block->testcaseNum = 'Case Number'; $lang->block->typeList = new stdclass(); diff --git a/module/block/lang/zh-cn.php b/module/block/lang/zh-cn.php index b14ea7d225..622c452691 100644 --- a/module/block/lang/zh-cn.php +++ b/module/block/lang/zh-cn.php @@ -269,10 +269,8 @@ $lang->block->orderByList->story['stage_asc'] = '阶段正序'; $lang->block->orderByList->story['stage_desc'] = '阶段倒序'; $lang->block->todoNum = '待办数'; -$lang->block->storyNum = '需求数'; $lang->block->taskNum = '任务数'; $lang->block->bugNum = 'Bug数'; -$lang->block->testcaseNum = '用例数'; $lang->block->typeList = new stdclass(); diff --git a/module/block/model.php b/module/block/model.php index d7cd2d5fd7..6b0bf0fcc5 100644 --- a/module/block/model.php +++ b/module/block/model.php @@ -414,10 +414,6 @@ class blockModel extends model $params->todoNum['default'] = 20; $params->todoNum['control'] = 'input'; - $params->storyNum['name'] = $this->lang->block->storyNum; - $params->storyNum['default'] = 20; - $params->storyNum['control'] = 'input'; - $params->taskNum['name'] = $this->lang->block->taskNum; $params->taskNum['default'] = 20; $params->taskNum['control'] = 'input'; @@ -426,10 +422,6 @@ class blockModel extends model $params->bugNum['default'] = 20; $params->bugNum['control'] = 'input'; - $params->testcaseNum['name'] = $this->lang->block->testcaseNum; - $params->testcaseNum['default'] = 20; - $params->testcaseNum['control'] = 'input'; - return json_encode($params); } diff --git a/module/block/view/printassigntomeblock.html.php b/module/block/view/printassigntomeblock.html.php index b04474aeb9..a320f0fdb4 100644 --- a/module/block/view/printassigntomeblock.html.php +++ b/module/block/view/printassigntomeblock.html.php @@ -12,7 +12,7 @@ ?>
$bool):?> -
" id=""> +
diff --git a/module/block/view/todoblock.html.php b/module/block/view/todoblock.html.php index 3a7d67ccfd..8fd74cc90d 100644 --- a/module/block/view/todoblock.html.php +++ b/module/block/view/todoblock.html.php @@ -28,7 +28,7 @@
- +
@@ -56,7 +56,7 @@
- save, '', "btn btn-primary btn-wide");?> + save, "onclick='ajaxCreateTodo(this)'", "btn btn-primary btn-wide");?>
diff --git a/module/common/model.php b/module/common/model.php index bc2a96f49b..4c288350ad 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -237,7 +237,7 @@ class commonModel extends model $isGuest = $app->user->account == 'guest'; echo ""; - echo "
" . strtoupper($app->user->account{0}) . '
'; + echo "
" . strtoupper($app->user->account{0}) . "
\n"; echo "" . (empty($app->user->realname) ? $app->user->account : $app->user->realname) . ''; echo ""; echo '
'; @@ -297,7 +297,7 @@ class commonModel extends model if(!commonModel::isTutorialMode() and $app->user->account != 'guest') echo '
  • ' . html::a(helper::createLink('tutorial', 'start'), $lang->tutorial, '', "class='iframe' data-width='800' data-headerless='true' data-backdrop='true' data-keyboard='true'") . "
  • "; echo '
  • ' . html::a('javascript:;', $lang->manual, '', "class='open-help-tab'") . '
  • '; echo '
  • ' . html::a(helper::createLink('misc', 'changeLog'), $lang->changeLog, '', "class='iframe' data-width='800' data-headerless='true' data-backdrop='true' data-keyboard='true'") . '
  • '; - echo ""; + echo "\n"; echo '
  • ' . html::a(helper::createLink('misc', 'about'), $lang->aboutZenTao, '', "class='about iframe' data-width='900' data-headerless='true' data-backdrop='true' data-keyboard='true' data-class='modal-about'") . '
  • '; echo ''; } diff --git a/module/common/view/footer.html.php b/module/common/view/footer.html.php index a52f881314..1ae1b27311 100755 --- a/module/common/view/footer.html.php +++ b/module/common/view/footer.html.php @@ -8,7 +8,7 @@