From c7cb9f141d64ef0b3d3dd40760fac0261241e796 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Thu, 29 Jun 2023 14:11:21 +0800 Subject: [PATCH] * Refactor block ui of plan list. --- module/block/config.php | 1 + module/block/config/planblock.php | 2 +- module/block/ui/planblock.html.php | 12 +++++++++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/module/block/config.php b/module/block/config.php index 07558708cf..7384a641e8 100644 --- a/module/block/config.php +++ b/module/block/config.php @@ -303,3 +303,4 @@ $config->block->modules['doc']->moreLinkList->projectdoc = 'doc|projectspac $config->block->size = array(); $config->block->size['product']['list'] = array('2' => '6', '1' => '6'); $config->block->size['product']['story'] = array('2' => '6', '1' => '6'); +$config->block->size['product']['plan'] = array('2' => '6', '1' => '6'); diff --git a/module/block/config/planblock.php b/module/block/config/planblock.php index 63bcb760c1..59cda4b040 100644 --- a/module/block/config/planblock.php +++ b/module/block/config/planblock.php @@ -8,7 +8,7 @@ $config->block->plan->dtable->fieldList = array(); $config->block->plan->dtable->fieldList['id'] = array('name' => 'id', 'title' => $lang->idAB, 'type' => 'id', 'sortType' => 1); $config->block->plan->dtable->fieldList['title'] = array('name' => 'title', 'title' => $lang->productplan->title, 'type' => 'title', 'sortType' => 1, 'flex' => 1); $config->block->plan->dtable->fieldList['product'] = array('name' => 'product', 'title' => $lang->productplan->product, 'type' => 'text', 'sortType' => 1, 'minWidth' => 100); -$config->block->plan->dtable->fieldList['hour'] = array('name' => 'hour', 'title' => $lang->productplan->hour, 'type' => 'count', 'sortType' => 1); +$config->block->plan->dtable->fieldList['hour'] = array('name' => 'hour', 'title' => $lang->productplan->hour, 'type' => 'text', 'sortType' => 1, 'align' => 'right'); $config->block->plan->dtable->fieldList['bugs'] = array('name' => 'bugs', 'title' => $lang->productplan->bugs, 'type' => 'number', 'sortType' => 1); $config->block->plan->dtable->fieldList['begin'] = array('name' => 'begin', 'title' => $lang->productplan->begin, 'type' => 'date', 'sortType' => 1); $config->block->plan->dtable->fieldList['end'] = array('name' => 'end', 'title' => $lang->productplan->end, 'type' => 'date', 'sortType' => 1); diff --git a/module/block/ui/planblock.html.php b/module/block/ui/planblock.html.php index 91d5eaad82..1d4c79e013 100644 --- a/module/block/ui/planblock.html.php +++ b/module/block/ui/planblock.html.php @@ -18,14 +18,20 @@ if(!$longBlock) unset($config->block->plan->dtable->fieldList['hour']); unset($config->block->plan->dtable->fieldList['bugs']); } - -foreach($plans as $plan) $plan->product = zget($products, $plan->product); +else +{ + $config->block->plan->dtable->fieldList['product']['map'] = $products; + foreach($plans as $plan) $plan->hour .= $config->hourUnit; +} panel ( - set('class', 'plan-block'), + setClass('p-0 plan-block'), + set::title($block->title), + set::bodyClass('p-0 no-shadow border-t'), dtable ( + set::fixedLeftWidth($longBlock ? '0.33' : '0.5'), set::cols(array_values($config->block->plan->dtable->fieldList)), set::data(array_values($plans)) )