diff --git a/module/block/control.php b/module/block/control.php index cd53a66a89..b63a02e337 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -1118,7 +1118,7 @@ class block extends control $productID = isset($this->session->product) ? 0 : $this->session->product; if($productID && !array_key_exists($productID, $products)) $productID = 0; - $this->view->plans = $this->loadModel('programplan')->getDataForGantt($this->session->program, $productID); + $this->view->plans = $this->loadModel('programplan')->getDataForGantt($this->session->program, $productID, 0, 'task'); $this->view->products = $products; $this->view->productID = $productID; } @@ -1585,8 +1585,8 @@ class block extends control */ public function printScrumoverallBlock() { - $programID = $this->session->program; - $totalData = $this->loadModel('program')->getUserPrograms('all','id_desc',15,$programID); + $programID = $this->session->program; + $totalData = $this->loadModel('program')->getUserPrograms('all', 'id_desc', 15, $programID); $this->view->totalData = $totalData; $this->view->programID = $programID; @@ -1611,20 +1611,29 @@ class block extends control /** * Print srcum road map block. * + * @param int $productID * @access public * @return void */ - public function printScrumroadmapBlock() + public function printScrumroadmapBlock($productID = 0) { $this->session->set('releaseList', $this->app->getURI(true)); $this->session->set('productPlanList', $this->app->getURI(true)); - $products = $this->loadModel('product')->getPairs(); -ksort($products); -$productID = key($products); - $this->view->roadmaps = $this->product->getRoadmap($productID, 0, 6); + $products = $this->loadModel('product')->getPairs(); + if(!is_numeric($productID)) $productID = key($products); + + $this->view->roadmaps = $this->product->getRoadmap($productID, 0, 6); + $this->view->productID = $productID; - $this->view->products = $products; + $this->view->products = $products; + $this->view->sync = 1; + + if($_POST) + { + $this->view->sync = 0; + $this->display('block', 'scrumroadmapblock'); + } } /** diff --git a/module/block/js/dashboard.js b/module/block/js/dashboard.js index 4be23863ba..f1f8c11f22 100644 --- a/module/block/js/dashboard.js +++ b/module/block/js/dashboard.js @@ -248,3 +248,21 @@ $(function() refreshBlock($(this).closest('.panel')); }); }); + +function reloadRoadmap(productID) +{ + $.ajax( + { + url: createLink('block', 'printScrumroadmapBlock', 'id=' + productID), + dataType: "html", + async: false, + data: {id: productID}, + type: 'post', + success: function(data) + { + $("#roadMap").html(''); + $("#roadMap").html(data); + $("#createPlanLink").attr('href',createLink('productplan', 'create', 'id=' + productID) ); + } + }) +} diff --git a/module/block/lang/en.php b/module/block/lang/en.php index a51e6543f9..a15f108193 100644 --- a/module/block/lang/en.php +++ b/module/block/lang/en.php @@ -57,6 +57,8 @@ $lang->block->scrum = 'Scrum+'; $lang->block->allProject = 'All ' . $lang->projectCommon; $lang->block->doingProject = 'Doning ' . $lang->projectCommon; $lang->block->finishProject = 'Finish ' . $lang->projectCommon; +$lang->block->estimatedHours = 'Estimated Hours'; +$lang->block->consumedHours = 'Consumed Hours'; $lang->block->params = new stdclass(); $lang->block->params->name = 'Name'; @@ -247,6 +249,7 @@ $lang->block->default['full']['my']['1']['title'] = 'Welcome'; $lang->block->default['full']['my']['1']['block'] = 'welcome'; $lang->block->default['full']['my']['1']['grid'] = 8; $lang->block->default['full']['my']['1']['source'] = ''; + $lang->block->default['full']['my']['2']['title'] = 'Dynamics'; $lang->block->default['full']['my']['2']['block'] = 'dynamic'; $lang->block->default['full']['my']['2']['grid'] = 4; @@ -259,7 +262,7 @@ $lang->block->default['full']['my']['3']['source'] = 'todo'; $lang->block->default['full']['my']['3']['params']['num'] = '20'; $lang->block->default['full']['my']['4']['title'] = $lang->projectCommon . ' Statistic'; -$lang->block->default['full']['my']['4']['source'] = 'statistic'; +$lang->block->default['full']['my']['4']['block'] = 'statistic'; $lang->block->default['full']['my']['4']['source'] = 'program'; $lang->block->default['full']['my']['4']['grid'] = 8; diff --git a/module/block/lang/zh-cn.php b/module/block/lang/zh-cn.php index 0cfdd89c52..605fcfae1e 100644 --- a/module/block/lang/zh-cn.php +++ b/module/block/lang/zh-cn.php @@ -83,6 +83,13 @@ $lang->block->totalStory = '总' . $lang->storyCommon; $lang->block->totalBug = '总Bug'; $lang->block->totalRelease = '发布次数'; +$lang->block->totalInvestment = '总投入'; +$lang->block->totalPeople = '总人数'; +$lang->block->spent = '已花费'; +$lang->block->budget = '预算'; +$lang->block->left = '剩余'; + + $lang->block->default['cmmi']['program']['1']['title'] = '项目周报'; $lang->block->default['cmmi']['program']['1']['block'] = 'cmmireport'; $lang->block->default['cmmi']['program']['1']['source'] = 'program'; @@ -334,7 +341,6 @@ $lang->block->modules['scrum']['index']->availableBlocks->scrumlist = $lang- $lang->block->modules['scrum']['index']->availableBlocks->scrumproject = $lang->projectCommon . '总览'; $lang->block->modules['scrum']['index']->availableBlocks->scrumproduct = $lang->productCommon . '总览'; $lang->block->modules['scrum']['index']->availableBlocks->scrumtest = '待测版本'; -$lang->block->modules['scrum']['index']->availableBlocks->scrumroadmap = $lang->productCommon . '路线图'; $lang->block->modules['cmmi']['index'] = new stdclass(); $lang->block->modules['cmmi']['index']->availableBlocks = new stdclass(); diff --git a/module/block/view/recentprogramblock.html.php b/module/block/view/recentprogramblock.html.php index 0e61fabbb7..27a1c35d0a 100644 --- a/module/block/view/recentprogramblock.html.php +++ b/module/block/view/recentprogramblock.html.php @@ -5,10 +5,10 @@ #cards .panel:hover {border-color: #006AF1; box-shadow: 0 0 10px 0 rgba(0,0,100,.25);} #cards .panel-heading {padding: 12px 24px 10px 16px;} #cards .panel-body {padding: 0 16px 16px;} -#cards .panel-actions {padding: 7px 0;} +#cards .panel-actions {padding: 7px 0;} #cards .panel-actions .dropdown-menu > li > a {padding-left: 5px; text-align: left;} #cards .panel-actions .dropdown-menu > li > a > i {opacity: .5; display: inline-block; margin-right: 4px; width: 18px; text-align: center;} -#cards .panel-actions .dropdown-menu > li > a:hover > i {opacity: 1;} +#cards .panel-actions .dropdown-menu > li > a:hover > i {opacity: 1;} #cards .program-type-label {padding: 1px 2px;} #cards .program-name {font-size: 16px; font-weight: normal; display: inline-block; max-width: 80%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;} #cards .program-infos {font-size: 12px;} @@ -21,10 +21,13 @@ #cards .program-detail .progress-text-left .progress-text {width: 50px; left: -50px;} #cards .panel-heading {cursor: pointer;} #cards .program-stages-container {margin: 0 -16px -16px -16px; padding: 0 4px; height: 46px; overflow-x: auto; position: relative;} -#cards .program-stages:after {content: ' '; width: 30px; display: block; right: -16px; top: 16px; bottom: -6px; z-index: 1; background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%); position: absolute;}#cards .program-stages-row {position: relative; height: 30px; z-index: 0;} +#cards .program-stages:after {content: ' '; width: 30px; display: block; right: -16px; top: 16px; bottom: -6px; z-index: 1; background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%); position: absolute;} +#cards .program-stages-row {position: relative; height: 30px; z-index: 0;} #cards .program-stage-item {white-space: nowrap; position: absolute; top: 0; min-width: 48px; padding-top: 13px; color: #838A9D;} #cards .program-stage-item > div {white-space: nowrap; overflow: visible; text-align: center; text-overflow: ellipsis;} -#cards .program-stage-item:before {content: ' '; display: block; width: 8px; height: 8px; border-radius: 50%; background: #D1D1D1; position: absolute; left: 50%; margin-left: -4px; top: 0; z-index: 1;}#cards .program-stage-item + .program-stage-item:after {content: ' '; display: block; left: -50%; right: 50%; height: 2px; background-color: #D1D1D1; top: 3px; position: absolute; z-index: 0;}#cards .program-stage-item.is-going {color: #333;} +#cards .program-stage-item:before {content: ' '; display: block; width: 8px; height: 8px; border-radius: 50%; background: #D1D1D1; position: absolute; left: 50%; margin-left: -4px; top: 0; z-index: 1;} +#cards .program-stage-item + .program-stage-item:after {content: ' '; display: block; left: -50%; right: 50%; height: 2px; background-color: #D1D1D1; top: 3px; position: absolute; z-index: 0;} +#cards .program-stage-item.is-going {color: #333;} #cards .program-stage-item.is-going::before {background-color: #0C64EB;}