diff --git a/db/update20.0.sql b/db/update20.0.sql index 3526ffbd58..89a37c56a8 100644 --- a/db/update20.0.sql +++ b/db/update20.0.sql @@ -2,9 +2,9 @@ DELETE FROM `zt_block` WHERE `type` IN ('news', 'patch', 'plugin', 'puglicclass' ALTER TABLE `zt_block` ADD `dashboard` varchar(20) NOT NULL DEFAULT '' AFTER `account`; ALTER TABLE `zt_block` CHANGE `block` `code` varchar(30) NOT NULL DEFAULT '' AFTER `module`; -ALTER TABLE `zt_block` ADD `width` enum ('1', '2', '3') NOT NULL DEFAULT 1 AFTER `code`; +ALTER TABLE `zt_block` ADD `width` enum ('1', '2', '3') NOT NULL DEFAULT '1' AFTER `code`; ALTER TABLE `zt_block` MODIFY `height` smallint(5) UNSIGNED NOT NULL DEFAULT 3 AFTER `width`; -ALTER TABLE `zt_block` ADD `left` enum('0', '1', '2') NOT NULL DEFAULT 0 AFTER `height`; +ALTER TABLE `zt_block` ADD `left` enum('0', '1', '2') NOT NULL DEFAULT '0' AFTER `height`; ALTER TABLE `zt_block` ADD `top` smallint(5) UNSIGNED NOT NULL DEFAULT 0 AFTER `left`; ALTER TABLE `zt_block` MODIFY `vision` varchar(10) NOT NULL DEFAULT 'rnd' AFTER `hidden`; diff --git a/module/block/control.php b/module/block/control.php index 5a52712eb5..7d116feac1 100755 --- a/module/block/control.php +++ b/module/block/control.php @@ -218,13 +218,12 @@ class block extends control * 输出一个区块信息。 * Print a block. * - * @param string $blockID + * @param int $blockID * @access public * @return string */ - public function printBlock(string $blockID) + public function printBlock(int $blockID) { - $blockID = (int)$blockID; $block = $this->block->getByID($blockID); /* 如果是外部调用,判断密码并组织外部需要的返回信息。 */ diff --git a/module/block/lang/zh-cn.php b/module/block/lang/zh-cn.php index 22412fe344..62c5d05d95 100644 --- a/module/block/lang/zh-cn.php +++ b/module/block/lang/zh-cn.php @@ -265,62 +265,18 @@ $lang->block->default['qa']['4']['params']['count'] = 15; $lang->block->default['qa']['4']['params']['orderBy'] = 'id_desc'; $lang->block->default['qa']['4']['params']['type'] = 'wait'; -$lang->block->default['full']['my']['1']['title'] = '欢迎'; -$lang->block->default['full']['my']['1']['module'] = 'welcome'; -$lang->block->default['full']['my']['1']['code'] = 'welcome'; - -$lang->block->default['full']['my']['2']['title'] = '最新动态'; -$lang->block->default['full']['my']['2']['module'] = 'dynamic'; -$lang->block->default['full']['my']['2']['code'] = 'dynamic'; - -$lang->block->default['full']['my']['3']['title'] = '使用帮助'; -$lang->block->default['full']['my']['3']['module'] = 'guide'; -$lang->block->default['full']['my']['3']['code'] = 'guide'; - -$lang->block->default['full']['my']['4']['title'] = '我的待办'; -$lang->block->default['full']['my']['4']['module'] = 'todo'; -$lang->block->default['full']['my']['4']['code'] = 'list'; - -$lang->block->default['full']['my']['4']['params']['count'] = '20'; - -$lang->block->default['full']['my']['5']['title'] = "{$lang->projectCommon}统计"; -$lang->block->default['full']['my']['5']['module'] = 'project'; -$lang->block->default['full']['my']['5']['code'] = 'statistic'; - -$lang->block->default['full']['my']['5']['params']['count'] = '20'; - -$lang->block->default['full']['my']['6']['title'] = '我的贡献'; -$lang->block->default['full']['my']['6']['module'] = 'contribute'; -$lang->block->default['full']['my']['6']['code'] = 'contribute'; - -$lang->block->default['full']['my']['7']['title'] = "我近期参与的{$lang->projectCommon}"; -$lang->block->default['full']['my']['7']['module'] = 'project'; -$lang->block->default['full']['my']['7']['code'] = 'recentproject'; - -$lang->block->default['full']['my']['8']['title'] = '我的待处理'; -$lang->block->default['full']['my']['8']['module'] = 'assigntome'; -$lang->block->default['full']['my']['8']['code'] = 'assigntome'; - -$lang->block->default['full']['my']['8']['params']['todoCount'] = '20'; -$lang->block->default['full']['my']['8']['params']['taskCount'] = '20'; -$lang->block->default['full']['my']['8']['params']['bugCount'] = '20'; -$lang->block->default['full']['my']['8']['params']['riskCount'] = '20'; -$lang->block->default['full']['my']['8']['params']['issueCount'] = '20'; -$lang->block->default['full']['my']['8']['params']['storyCount'] = '20'; -$lang->block->default['full']['my']['8']['params']['reviewCount'] = '20'; -$lang->block->default['full']['my']['8']['params']['meetingCount'] = '20'; -$lang->block->default['full']['my']['8']['params']['feedbackCount'] = '20'; - -$lang->block->default['full']['my']['9']['title'] = "{$lang->projectCommon}人力投入"; -$lang->block->default['full']['my']['9']['module'] = 'project'; -$lang->block->default['full']['my']['9']['code'] = 'projectteam'; - -$lang->block->default['full']['my']['10']['title'] = "{$lang->projectCommon}列表"; -$lang->block->default['full']['my']['10']['module'] = 'project'; -$lang->block->default['full']['my']['10']['code'] = 'project'; - -$lang->block->default['full']['my']['10']['params']['orderBy'] = 'id_desc'; -$lang->block->default['full']['my']['10']['params']['count'] = '15'; +$lang->block->default['full']['my'][] = array('title' => '欢迎总览', 'module' => 'welcome', 'code' => 'welcome', 'width' => '2', 'height' => '3', 'left' => '0', 'top' => '0'); +$lang->block->default['full']['my'][] = array('title' => "使用帮助", 'module' => 'guide', 'code' => 'guide', 'width' => '2', 'height' => '6', 'left' => '0', 'top' => '3'); +$lang->block->default['full']['my'][] = array('title' => "我近期参与的{$lang->projectCommon}", 'module' => 'project', 'code' => 'recentproject', 'width' => '2', 'height' => '4', 'left' => '0', 'top' => '9'); +$lang->block->default['full']['my'][] = array('title' => "未完成的{$lang->execution->common}统计", 'module' => 'execution', 'code' => 'statistic', 'width' => '2', 'height' => '5', 'left' => '0', 'top' => '13', 'params' => array('type' => 'undone', 'count' => '20')); +$lang->block->default['full']['my'][] = array('title' => "未关闭{$lang->productCommon}的测试统计", 'module' => 'qa', 'code' => 'statistic', 'width' => '2', 'height' => '5', 'left' => '0', 'top' => '18', 'params' => array('type' => 'noclosed', 'count' => '20')); +$lang->block->default['full']['my'][] = array('title' => "未关闭的{$lang->productCommon}统计", 'module' => 'product', 'code' => 'statistic', 'width' => '2', 'height' => '5', 'left' => '0', 'top' => '23', 'params' => array('type' => 'noclosed', 'count' => '20')); +$lang->block->default['full']['my'][] = array('title' => "{$lang->projectCommon}统计", 'module' => 'project', 'code' => 'statistic', 'width' => '2', 'height' => '5', 'left' => '0', 'top' => '28', 'params' => array('type' => 'undone', 'count' => '20')); +$lang->block->default['full']['my'][] = array('title' => "未完成的{$lang->projectCommon}列表", 'module' => 'project', 'code' => 'project', 'width' => '2', 'height' => '6', 'left' => '0', 'top' => '34', 'params' => array('type' => 'undone', 'count' => '20', 'orderBy' => 'id_desc')); +$lang->block->default['full']['my'][] = array('title' => "我的待处理", 'module' => 'assigntome', 'code' => 'assigntome', 'width' => '2', 'height' => '6', 'left' => '0', 'top' => '40', 'params' => array('todoCount' => '20', 'taskCount' => '20', 'bugCount' => '20', 'riskCount' => '20', 'issueCount' => '20', 'storyCount' => '20', 'reviewCount' => '20', 'meetingCount' => '20', 'feedbackCount' => '20')); +$lang->block->default['full']['my'][] = array('title' => "禅道动态", 'module' => 'dynamic', 'code' => 'dynamic', 'width' => '1', 'height' => '8', 'left' => '2', 'top' => '0'); +$lang->block->default['full']['my'][] = array('title' => "{$lang->projectCommon}总览", 'module' => 'project', 'code' => 'overview', 'width' => '1', 'height' => '3', 'left' => '2', 'top' => '8'); +$lang->block->default['full']['my'][] = array('title' => "{$lang->productCommon}总览", 'module' => 'product', 'code' => 'overview', 'width' => '1', 'height' => '3', 'left' => '2', 'top' => '11'); /* Doc module block. */ $lang->block->default['doc']['1']['title'] = '文档统计'; diff --git a/module/block/ui/assigntomeblock.html.php b/module/block/ui/assigntomeblock.html.php index 23104b76f0..03ad886bd5 100644 --- a/module/block/ui/assigntomeblock.html.php +++ b/module/block/ui/assigntomeblock.html.php @@ -11,4 +11,14 @@ declare(strict_types=1); namespace zin; +panel +( + set('class', 'assigntome-block'), + div + ( + '我的待处理', + '正在开发中...' + ) +); + render('|fragment'); diff --git a/module/block/ui/dynamicblock.html.php b/module/block/ui/dynamicblock.html.php index 7be1e20c13..2126a9260f 100644 --- a/module/block/ui/dynamicblock.html.php +++ b/module/block/ui/dynamicblock.html.php @@ -1,7 +1,7 @@ @@ -13,9 +13,10 @@ namespace zin; panel ( - set('class', 'projectteam-block'), + set('class', 'dynamic-block'), div ( + '最新动态', '正在开发中...' ) ); diff --git a/module/block/ui/executionstatisticblock.html.php b/module/block/ui/executionstatisticblock.html.php new file mode 100644 index 0000000000..9f5fdb9491 --- /dev/null +++ b/module/block/ui/executionstatisticblock.html.php @@ -0,0 +1,24 @@ + +* @package block +* @link https://www.zentao.net +*/ + +namespace zin; + +panel +( + set('class', 'executionstatistic-block'), + div + ( + '执行统计', + '正在开发中...' + ) +); + +render('|fragment'); diff --git a/module/block/ui/productstatisticblock.html.php b/module/block/ui/productstatisticblock.html.php index de9f8baa72..e42335dc23 100644 --- a/module/block/ui/productstatisticblock.html.php +++ b/module/block/ui/productstatisticblock.html.php @@ -310,6 +310,7 @@ function getProductInfo(array $products, string $blockNavID, bool $longBlock): a return $tabItems; } +$longBlock = $block->width >= 2; $blockNavCode = 'nav-' . uniqid(); div ( diff --git a/module/block/ui/projectoverviewblock.html.php b/module/block/ui/projectoverviewblock.html.php new file mode 100644 index 0000000000..26cec23d5b --- /dev/null +++ b/module/block/ui/projectoverviewblock.html.php @@ -0,0 +1,24 @@ + +* @package block +* @link https://www.zentao.net +*/ + +namespace zin; + +panel +( + set('class', 'projectoverview-block'), + div + ( + '项目总览', + '正在开发中...' + ) +); + +render('|fragment'); diff --git a/module/block/ui/projectteamblock.html.php b/module/block/ui/projectteamblock.html.php index 7be1e20c13..1c39089b2b 100644 --- a/module/block/ui/projectteamblock.html.php +++ b/module/block/ui/projectteamblock.html.php @@ -16,6 +16,7 @@ panel set('class', 'projectteam-block'), div ( + '项目人力投入', '正在开发中...' ) ); diff --git a/module/block/ui/releaseblock.html.php b/module/block/ui/releaseblock.html.php index 246e37593f..387fd11e8b 100644 --- a/module/block/ui/releaseblock.html.php +++ b/module/block/ui/releaseblock.html.php @@ -1,7 +1,7 @@ diff --git a/module/block/ui/storyblock.html.php b/module/block/ui/storyblock.html.php index b7f374b802..33ad3d7100 100644 --- a/module/block/ui/storyblock.html.php +++ b/module/block/ui/storyblock.html.php @@ -1,7 +1,7 @@ diff --git a/module/block/ui/todolistblock.html.php b/module/block/ui/todolistblock.html.php index 7be1e20c13..c28027aa4e 100644 --- a/module/block/ui/todolistblock.html.php +++ b/module/block/ui/todolistblock.html.php @@ -1,7 +1,7 @@ @@ -13,9 +13,10 @@ namespace zin; panel ( - set('class', 'projectteam-block'), + set('class', 'todolist-block'), div ( + '待办列表', '正在开发中...' ) );