From b07caeefae6a4a24661765a7109860c8aa98925c Mon Sep 17 00:00:00 2001 From: Catouse Date: Wed, 27 Apr 2016 08:59:20 +0800 Subject: [PATCH] * finish task #2526, task #2525. --- module/block/control.php | 19 +++++++++++-- module/block/js/admin.js | 2 +- module/block/lang/en.php | 7 +++++ module/block/lang/zh-cn.php | 7 +++++ module/block/view/flowchart.html.php | 41 ++++++++++++++++++++++++++++ 5 files changed, 73 insertions(+), 3 deletions(-) create mode 100644 module/block/view/flowchart.html.php diff --git a/module/block/control.php b/module/block/control.php index 08bdf7e039..e91e0f4eb0 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -48,8 +48,9 @@ class block extends control if(!common::hasPriv($moduleKey, 'index')) unset($modules[$moduleKey]); } - $modules['dynamic'] = $this->lang->block->dynamic; - $modules['html'] = 'HTML'; + $modules['dynamic'] = $this->lang->block->dynamic; + $modules['html'] = 'HTML'; + $modules['flowchart'] = '流程图'; $modules = array('' => '') + $modules; $hiddenBlocks = $this->block->getHiddenBlocks(); @@ -262,6 +263,10 @@ class block extends control { $html = $this->fetch('block', 'dynamic'); } + elseif($block->block == 'flowchart') + { + $html = $this->fetch('block', 'flowchart'); + } die($html); } @@ -568,4 +573,14 @@ class block extends control $pager = pager::init(0, $num, 1); $this->view->projectStats = $this->loadModel('project')->getProjectStats($type, $productID = 0, $branch = 0, $itemCounts = 30, $orderBy = 'order_desc', $this->viewType != 'json' ? $pager : ''); } + + /** + * Print flow chart block + * @access public + * @return void + */ + public function flowchart() + { + $this->display(); + } } diff --git a/module/block/js/admin.js b/module/block/js/admin.js index 5373850afb..883c36a2ae 100644 --- a/module/block/js/admin.js +++ b/module/block/js/admin.js @@ -18,7 +18,7 @@ function getBlocks(moduleID) getRssAndHtmlParams('html', moduleID.replace('hiddenBlock', '')); return true; } - if(moduleID == 'html' || moduleID == 'dynamic') + if(moduleID == 'html' || moduleID == 'dynamic' || moduleID == 'flowchart') { getRssAndHtmlParams(moduleID); return true; diff --git a/module/block/lang/en.php b/module/block/lang/en.php index b9cbda2f46..ea3231303a 100644 --- a/module/block/lang/en.php +++ b/module/block/lang/en.php @@ -231,3 +231,10 @@ $lang->block->modules['qa']->moreLinkList->case = 'my|testcase|type=%s'; $lang->block->modules['qa']->moreLinkList->testtask = 'my|testtask|type=%s'; $lang->block->modules['todo']->moreLinkList = new stdclass(); $lang->block->modules['todo']->moreLinkList->list = 'my|todo|type=all'; + +$lang->block->flowchart = array(); +$lang->block->flowchart[] = array('Administrator', 'Manage company', 'Add user', 'Manage privilege'); +$lang->block->flowchart[] = array('Product manager', 'Create product', 'Manage odules', 'manage plans', 'manage stories', 'Create release'); +$lang->block->flowchart[] = array('Project manager', 'Create project', 'Manage team', 'Link products', 'Link stories', 'Create task'); +$lang->block->flowchart[] = array('Developer', 'Get tasks/bugs', 'Update status', 'Finish tasks/bugs'); +$lang->block->flowchart[] = array('Tester', 'Create testcase', 'Run testcases', 'Create bug', 'Confirm bug', 'Close bug'); diff --git a/module/block/lang/zh-cn.php b/module/block/lang/zh-cn.php index 2f04e72505..4137657c8c 100644 --- a/module/block/lang/zh-cn.php +++ b/module/block/lang/zh-cn.php @@ -231,3 +231,10 @@ $lang->block->modules['qa']->moreLinkList->case = 'my|testcase|type=%s'; $lang->block->modules['qa']->moreLinkList->testtask = 'my|testtask|type=%s'; $lang->block->modules['todo']->moreLinkList = new stdclass(); $lang->block->modules['todo']->moreLinkList->list = 'my|todo|type=all'; + +$lang->block->flowchart = array(); +$lang->block->flowchart[] = array('管理员', '维护公司', '添加用户', '维护权限'); +$lang->block->flowchart[] = array('产品经理', '创建产品', '维护模块', '维护计划', '维护需求', '创建发布'); +$lang->block->flowchart[] = array('项目经理', '创建项目', '维护团队', '关联产品', '关联需求', '分解任务'); +$lang->block->flowchart[] = array('研发人员', '领取任务和Bug', '更新状态', '完成任务和Bug'); +$lang->block->flowchart[] = array('测试人员', '撰写用例', '执行用例', '提交Bug', '验证Bug', '关闭Bug'); diff --git a/module/block/view/flowchart.html.php b/module/block/view/flowchart.html.php new file mode 100644 index 0000000000..3423493c58 --- /dev/null +++ b/module/block/view/flowchart.html.php @@ -0,0 +1,41 @@ +
+block->flowchart as $flow):?> + +
+ +
+ +
+ +
+