diff --git a/module/block/config.php b/module/block/config.php index 8a27435115..0cdef575af 100644 --- a/module/block/config.php +++ b/module/block/config.php @@ -344,6 +344,9 @@ $config->block->size['scrumproject']['projectdynamic'] = array('1' => '8', '2' = $config->block->size['execution']['overview'] = array('1' => '3'); $config->block->size['execution']['statistic'] = array('2' => '5', '1' => '8'); +$config->block->size['execution']['list'] = array('2' => '6', '1' => '6'); +$config->block->size['execution']['task'] = array('2' => '6', '1' => '6'); +$config->block->size['execution']['build'] = array('2' => '6', '1' => '6'); $config->block->size['qa']['statistic'] = array('2' => '5', '1' => '8'); $config->block->size['qa']['testtask'] = array('2' => '6', '1' => '6'); diff --git a/module/block/config/executionblock.php b/module/block/config/executionblock.php new file mode 100644 index 0000000000..ec35997df8 --- /dev/null +++ b/module/block/config/executionblock.php @@ -0,0 +1,43 @@ +loadLang('execution'); + +$config->block->execution = new stdclass(); +$config->block->execution->dtable = new stdclass(); +$config->block->execution->dtable->fieldList = array(); +$config->block->execution->dtable->fieldList['name']['name'] = 'name'; +$config->block->execution->dtable->fieldList['name']['title'] = $lang->execution->name; +$config->block->execution->dtable->fieldList['name']['link'] = array('module' => 'execution', 'method' => 'task', 'params' => 'executionID={id}'); +$config->block->execution->dtable->fieldList['name']['data-toggle'] = 'modal'; +$config->block->execution->dtable->fieldList['name']['data-size'] = 'lg'; +$config->block->execution->dtable->fieldList['name']['type'] = 'title'; + +$config->block->execution->dtable->fieldList['end']['name'] = 'end'; +$config->block->execution->dtable->fieldList['end']['title'] = $lang->execution->end; +$config->block->execution->dtable->fieldList['end']['type'] = 'date'; +$config->block->execution->dtable->fieldList['end']['sortType'] = true; + +$config->block->execution->dtable->fieldList['status']['name'] = 'status'; +$config->block->execution->dtable->fieldList['status']['title'] = $lang->execution->status; +$config->block->execution->dtable->fieldList['status']['type'] = 'status'; +$config->block->execution->dtable->fieldList['status']['statusMap'] = $lang->execution->statusList; + +$config->block->execution->dtable->fieldList['totalEstimate']['name'] = 'totalEstimate'; +$config->block->execution->dtable->fieldList['totalEstimate']['title'] = $lang->execution->totalEstimate; +$config->block->execution->dtable->fieldList['totalEstimate']['type'] = 'number'; +$config->block->execution->dtable->fieldList['totalEstimate']['sortType'] = true; + +$config->block->execution->dtable->fieldList['totalConsumed']['name'] = 'totalConsumed'; +$config->block->execution->dtable->fieldList['totalConsumed']['title'] = $lang->execution->totalConsumed; +$config->block->execution->dtable->fieldList['totalConsumed']['type'] = 'number'; +$config->block->execution->dtable->fieldList['totalConsumed']['sortType'] = true; + +$config->block->execution->dtable->fieldList['progress']['name'] = 'progress'; +$config->block->execution->dtable->fieldList['progress']['title'] = $lang->execution->progress; +$config->block->execution->dtable->fieldList['progress']['type'] = 'progress'; +$config->block->execution->dtable->fieldList['progress']['sortType'] = true; + +$config->block->execution->dtable->fieldList['burns']['name'] = 'burns'; +$config->block->execution->dtable->fieldList['burns']['title'] = $lang->execution->burn; +$config->block->execution->dtable->fieldList['burns']['type'] = 'burn'; +$config->block->execution->dtable->fieldList['burns']['sortType'] = true; diff --git a/module/block/ui/buildblock.html.php b/module/block/ui/buildblock.html.php index ef30f181e8..7d09c1693f 100644 --- a/module/block/ui/buildblock.html.php +++ b/module/block/ui/buildblock.html.php @@ -33,8 +33,8 @@ panel ), dtable ( - set::bordered(false), set::height(318), + set::bordered(false), set::horzScrollbarPos('inside'), set::cols(array_values($config->block->build->dtable->fieldList)), set::data(array_values($builds)), diff --git a/module/block/ui/executionblock.html.php b/module/block/ui/executionblock.html.php deleted file mode 100644 index 51f894a176..0000000000 --- a/module/block/ui/executionblock.html.php +++ /dev/null @@ -1,24 +0,0 @@ - -* @package block -* @link https://www.zentao.net -*/ - -namespace zin; - -panel -( - set('headingClass', 'border-b'), - set::title($block->title), - div - ( - '正在开发中...' - ) -); - -render(); diff --git a/module/block/ui/executionlistblock.html.php b/module/block/ui/executionlistblock.html.php new file mode 100644 index 0000000000..62467e9d2f --- /dev/null +++ b/module/block/ui/executionlistblock.html.php @@ -0,0 +1,39 @@ + +* @package block +* @link https://www.zentao.net +*/ + +namespace zin; + +panel +( + set::title($block->title), + set::class('executionlist-block list-block ' . ($longBlock ? 'block-long' : 'block-sm')), + set::headingClass('border-b'), + to::headingActions + ( + a + ( + set('class', 'text-gray'), + set('href', $block->moreLink), + $lang->more, + icon('caret-right') + ) + ), + dtable + ( + set::height(318), + set::bordered(false), + set::horzScrollbarPos('inside'), + set::cols(array_values($config->block->execution->dtable->fieldList)), + set::data(array_values($executions)), + ) +); + +render(); diff --git a/module/block/ui/projectdynamicblock.html.php b/module/block/ui/projectdynamicblock.html.php index d61dd3b454..14c2fe7091 100644 --- a/module/block/ui/projectdynamicblock.html.php +++ b/module/block/ui/projectdynamicblock.html.php @@ -10,14 +10,59 @@ declare(strict_types=1); */ namespace zin; +?> + +