* Optimize config items for list pages.

This commit is contained in:
wangyuting
2023-05-16 09:10:00 +08:00
parent da46ef626c
commit ac62abc1c2
11 changed files with 73 additions and 139 deletions
+9 -8
View File
@@ -3,11 +3,12 @@ global $lang, $app;
$app->loadLang('productplan');
$config->block->plan = new stdclass();
$config->block->plan->dtable = array();
$config->block->plan->dtable['id'] = array('name' => 'id', 'title' => $lang->idAB, 'type' => 'id', 'sortType' => 1);
$config->block->plan->dtable['title'] = array('name' => 'title', 'title' => $lang->productplan->title, 'type' => 'title', 'sortType' => 1, 'flex' => 1);
$config->block->plan->dtable['product'] = array('name' => 'product', 'title' => $lang->productplan->product, 'type' => 'text', 'sortType' => 1, 'minWidth' => 100);
$config->block->plan->dtable['hour'] = array('name' => 'hour', 'title' => $lang->productplan->hour, 'type' => 'count', 'sortType' => 1);
$config->block->plan->dtable['bugs'] = array('name' => 'bugs', 'title' => $lang->productplan->bugs, 'type' => 'number', 'sortType' => 1);
$config->block->plan->dtable['begin'] = array('name' => 'begin', 'title' => $lang->productplan->begin, 'type' => 'date', 'sortType' => 1);
$config->block->plan->dtable['end'] = array('name' => 'end', 'title' => $lang->productplan->end, 'type' => 'date', 'sortType' => 1);
$config->block->plan->dtable = new stdclass();
$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['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);
+8 -42
View File
@@ -5,45 +5,11 @@ $app->loadLang('product');
$config->block->product = new stdclass();
$config->block->product->dtable = new stdclass();
$config->block->product->dtable->fieldList = array();
$config->block->product->dtable->fieldList['name']['name'] = 'name';
$config->block->product->dtable->fieldList['name']['title'] = $lang->product->name;
$config->block->product->dtable->fieldList['name']['type'] = 'title';
$config->block->product->dtable->fieldList['name']['sortType'] = 1;
$config->block->product->dtable->fieldList['name']['width'] = 250;
$config->block->product->dtable->fieldList['name']['type'] = 'link';
$config->block->product->dtable->fieldList['manager']['name'] = 'product';
$config->block->product->dtable->fieldList['manager']['title'] = $lang->product->manager;
$config->block->product->dtable->fieldList['manager']['type'] = 'avatarBtn';
$config->block->product->dtable->fieldList['manager']['sortType'] = 1;
$config->block->product->dtable->fieldList['manager']['minWidth'] = 100;
$config->block->product->dtable->fieldList['unclosedFeedback']['name'] = 'unclosedFeedback';
$config->block->product->dtable->fieldList['unclosedFeedback']['title'] = $lang->block->productlist->unclosedFeedback;
$config->block->product->dtable->fieldList['unclosedFeedback']['type'] = 'count';
$config->block->product->dtable->fieldList['unclosedFeedback']['sortType'] = 1;
$config->block->product->dtable->fieldList['activatedStory']['name'] = 'activatedStory';
$config->block->product->dtable->fieldList['activatedStory']['title'] = $lang->block->productlist->activatedStory;
$config->block->product->dtable->fieldList['activatedStory']['type'] = 'number';
$config->block->product->dtable->fieldList['activatedStory']['sortType'] = 1;
$config->block->product->dtable->fieldList['storyCompleteRate']['name'] = 'storyCompleteRate';
$config->block->product->dtable->fieldList['storyCompleteRate']['title'] = $lang->block->productlist->storyCompleteRate;
$config->block->product->dtable->fieldList['storyCompleteRate']['type'] = 'date';
$config->block->product->dtable->fieldList['storyCompleteRate']['sortType'] = 1;
$config->block->product->dtable->fieldList['plan']['name'] = 'plan';
$config->block->product->dtable->fieldList['plan']['title'] = $lang->product->plan;
$config->block->product->dtable->fieldList['plan']['type'] = 'date';
$config->block->product->dtable->fieldList['plan']['sortType'] = 1;
$config->block->product->dtable->fieldList['activatedBug']['name'] = 'activatedBug';
$config->block->product->dtable->fieldList['activatedBug']['title'] = $lang->block->productlist->activatedBug;
$config->block->product->dtable->fieldList['activatedBug']['type'] = 'date';
$config->block->product->dtable->fieldList['activatedBug']['sortType'] = 1;
$config->block->product->dtable->fieldList['release']['name'] = 'release';
$config->block->product->dtable->fieldList['release']['title'] = $lang->product->release;
$config->block->product->dtable->fieldList['release']['type'] = 'date';
$config->block->product->dtable->fieldList['release']['sortType'] = 1;
$config->block->product->dtable->fieldList['name'] = array('name' => 'name', 'title' => $lang->product->name, 'type' => 'title', 'sortType' => 1, 'flex' => 1);
$config->block->product->dtable->fieldList['manager'] = array('name' => 'manager', 'title' => $lang->product->manager, 'type' => 'avatarBtn', 'sortType' => 1);
$config->block->product->dtable->fieldList['unclosedFeedback'] = array('name' => 'unclosedFeedback', 'title' => $lang->block->productlist->unclosedFeedback, 'type' => 'number', 'sortType' => 1);
$config->block->product->dtable->fieldList['activatedStory'] = array('name' => 'activatedStory', 'title' => $lang->block->productlist->activatedStory, 'type' => 'number', 'sortType' => 1);
$config->block->product->dtable->fieldList['storyCompleteRate'] = array('name' => 'storyCompleteRate', 'title' => $lang->block->productlist->storyCompleteRate, 'type' => 'number', 'sortType' => 1);
$config->block->product->dtable->fieldList['plan'] = array('name' => 'plan', 'title' => $lang->product->plan, 'type' => 'number', 'sortType' => 1);
$config->block->product->dtable->fieldList['activatedBug'] = array('name' => 'activatedBug', 'title' => $lang->block->productlist->activatedBug, 'type' => 'number', 'sortType' => 1);
$config->block->product->dtable->fieldList['release'] = array('name' => 'release', 'title' => $lang->product->release, 'type' => 'number', 'sortType' => 1);
@@ -1,38 +0,0 @@
<?php
global $lang, $app;
$app->loadLang('release');
if(!isset($config->block->dtable)) $config->block->dtable = new stdclass();
$config->block->dtable->release = new stdclass();
$config->block->dtable->release->fieldList['id']['name'] = 'id';
$config->block->dtable->release->fieldList['id']['title'] = $lang->idAB;
$config->block->dtable->release->fieldList['id']['type'] = 'id';
$config->block->dtable->release->fieldList['id']['sortType'] = true;
$config->block->dtable->release->fieldList['name']['name'] = 'name';
$config->block->dtable->release->fieldList['name']['title'] = $lang->release->name;
$config->block->dtable->release->fieldList['name']['type'] = 'title';
$config->block->dtable->release->fieldList['name']['flex'] = 1;
$config->block->dtable->release->fieldList['name']['sortType'] = true;
$config->block->dtable->release->fieldList['productName']['name'] = 'productName';
$config->block->dtable->release->fieldList['productName']['title'] = $lang->release->product;
$config->block->dtable->release->fieldList['productName']['type'] = 'text';
$config->block->dtable->release->fieldList['productName']['minWidth'] = '100';
$config->block->dtable->release->fieldList['productName']['sortType'] = true;
$config->block->dtable->release->fieldList['buildName']['name'] = 'buildName';
$config->block->dtable->release->fieldList['buildName']['title'] = $lang->release->build;
$config->block->dtable->release->fieldList['buildName']['type'] = 'text';
$config->block->dtable->release->fieldList['buildName']['minWidth'] = '100';
$config->block->dtable->release->fieldList['buildName']['sortType'] = true;
$config->block->dtable->release->fieldList['date']['name'] = 'date';
$config->block->dtable->release->fieldList['date']['title'] = $lang->release->date;
$config->block->dtable->release->fieldList['date']['type'] = 'date';
$config->block->dtable->release->fieldList['date']['sortType'] = true;
$config->block->dtable->release->fieldList['status']['name'] = 'status';
$config->block->dtable->release->fieldList['status']['title'] = $lang->release->status;
$config->block->dtable->release->fieldList['status']['type'] = 'status';
$config->block->dtable->release->fieldList['status']['sortType'] = true;
+17
View File
@@ -0,0 +1,17 @@
<?php
global $lang, $app;
$app->loadLang('project');
$app->loadLang('task');
$config->block->project = new stdclass();
$config->block->project->dtable = new stdclass();
$config->block->project->dtable->fieldList = array();
$config->block->project->dtable->fieldList['name'] = array('name' => 'name', 'title' => $lang->project->name, 'type' => 'title', 'sortType' => true, 'flex' => 1);
$config->block->project->dtable->fieldList['PM'] = array('name' => 'PM', 'title' => $lang->project->PM, 'type' => 'text', 'sortType' => true);
$config->block->project->dtable->fieldList['status'] = array('name' => 'status', 'title' => $lang->project->status, 'type' => 'status', 'sortType' => true);
$config->block->project->dtable->fieldList['teamCount'] = array('name' => 'teamCount', 'title' => $lang->project->teamCount, 'type' => 'count', 'sortType' => true);
$config->block->project->dtable->fieldList['consumed'] = array('name' => 'consumed', 'title' => $lang->task->consumed, 'type' => 'count', 'sortType' => true);
$config->block->project->dtable->fieldList['budget'] = array('name' => 'budget', 'title' => $lang->project->budget, 'type' => 'count', 'sortType' => true);
$config->block->project->dtable->fieldList['leftStories'] = array('name' => 'leftStories', 'title' => $lang->project->leftStories, 'type' => 'count', 'sortType' => true);
$config->block->project->dtable->fieldList['leftTasks'] = array('name' => 'leftTasks', 'title' => $lang->project->leftTasks, 'type' => 'count', 'sortType' => true);
$config->block->project->dtable->fieldList['leftBugs'] = array('name' => 'leftBugs', 'title' => $lang->project->leftBugs, 'type' => 'count', 'sortType' => true);
+13
View File
@@ -0,0 +1,13 @@
<?php
global $lang, $app;
$app->loadLang('release');
$config->block->release = new stdclass();
$config->block->release->dtable = new stdclass();
$config->block->release->dtable->fieldList = array();
$config->block->release->dtable->fieldList['id'] = array('name' => 'id', 'title' => $lang->idAB, 'type' => 'id', 'sortType' => true);
$config->block->release->dtable->fieldList['name'] = array('name' => 'name', 'title' => $lang->release->name, 'type' => 'title', 'sortType' => true, 'flex' => 1);
$config->block->release->dtable->fieldList['productName'] = array('name' => 'productName', 'title' => $lang->release->product, 'type' => 'text', 'sortType' => true, 'minWidth' => '100');
$config->block->release->dtable->fieldList['buildName'] = array('name' => 'buildName', 'title' => $lang->release->build, 'type' => 'text', 'sortType' => true, 'minWidth' => '100');
$config->block->release->dtable->fieldList['date'] = array('name' => 'date', 'title' => $lang->release->date, 'type' => 'date', 'sortType' => true);
$config->block->release->dtable->fieldList['status'] = array('name' => 'status', 'title' => $lang->release->status, 'type' => 'status', 'sortType' => true);
+11 -41
View File
@@ -1,44 +1,14 @@
<?php
global $lang, $app;
$app->loadLang('story');
if(!isset($config->block->dtable->stories)) $config->block->dtable->stories = new stdclass();
$config->block->dtable->stories->fieldList['id']['name'] = 'id';
$config->block->dtable->stories->fieldList['id']['title'] = $this->lang->story->id;
$config->block->dtable->stories->fieldList['id']['width'] = 80;
$config->block->dtable->stories->fieldList['id']['align'] = 'center';
$config->block->dtable->stories->fieldList['id']['sortType'] = true;
$config->block->dtable->stories->fieldList['title']['name'] = 'title';
$config->block->dtable->stories->fieldList['title']['title'] = $this->lang->story->title;
$config->block->dtable->stories->fieldList['title']['width'] = 80;
$config->block->dtable->stories->fieldList['title']['align'] = 'center';
$config->block->dtable->stories->fieldList['title']['sortType'] = true;
$config->block->dtable->stories->fieldList['pri']['name'] = 'pri';
$config->block->dtable->stories->fieldList['pri']['title'] = $this->lang->story->pri;
$config->block->dtable->stories->fieldList['pri']['width'] = 80;
$config->block->dtable->stories->fieldList['pri']['align'] = 'center';
$config->block->dtable->stories->fieldList['pri']['sortType'] = true;
$config->block->dtable->stories->fieldList['status']['name'] = 'status';
$config->block->dtable->stories->fieldList['status']['title'] = $this->lang->story->statusAB;
$config->block->dtable->stories->fieldList['status']['width'] = 80;
$config->block->dtable->stories->fieldList['status']['align'] = 'center';
$config->block->dtable->stories->fieldList['status']['sortType'] = true;
$config->block->dtable->stories->fieldList['estimate']['name'] = 'estimate';
$config->block->dtable->stories->fieldList['estimate']['title'] = $this->lang->story->estimateAB;
$config->block->dtable->stories->fieldList['estimate']['width'] = 80;
$config->block->dtable->stories->fieldList['estimate']['align'] = 'center';
$config->block->dtable->stories->fieldList['estimate']['sortType'] = true;
$config->block->dtable->stories->fieldList['stage']['name'] = 'stage';
$config->block->dtable->stories->fieldList['stage']['title'] = $this->lang->story->stageAB;
$config->block->dtable->stories->fieldList['stage']['width'] = 80;
$config->block->dtable->stories->fieldList['stage']['align'] = 'center';
$config->block->dtable->stories->fieldList['stage']['sortType'] = true;
$config->block->dtable->stories->fieldList['category']['name'] = 'category';
$config->block->dtable->stories->fieldList['category']['title'] = $this->lang->story->category;
$config->block->dtable->stories->fieldList['category']['width'] = 80;
$config->block->dtable->stories->fieldList['category']['align'] = 'center';
$config->block->dtable->stories->fieldList['category']['sortType'] = true;
$config->block->story = new stdclass();
$config->block->story->dtable = new stdclass();
$config->block->story->dtable->fieldList = array();
$config->block->story->dtable->fieldList['id'] = array('name' => 'id', 'title' => $this->lang->story->id, 'type' => 'id', 'sortType' => true);
$config->block->story->dtable->fieldList['title'] = array('name' => 'title', 'title' => $this->lang->story->title, 'type' => 'title', 'sortType' => true, 'flex' => 1);
$config->block->story->dtable->fieldList['pri'] = array('name' => 'pri', 'title' => $this->lang->story->pri, 'type' => 'pri', 'sortType' => true);
$config->block->story->dtable->fieldList['status'] = array('name' => 'status', 'title' => $this->lang->story->statusAB, 'type' => 'status', 'sortType' => true);
$config->block->story->dtable->fieldList['estimate'] = array('name' => 'estimate', 'title' => $this->lang->story->estimateAB, 'type' => 'category', 'sortType' => true);
$config->block->story->dtable->fieldList['stage'] = array('name' => 'stage', 'title' => $this->lang->story->stageAB, 'type' => 'count', 'sortType' => true);
$config->block->story->dtable->fieldList['category'] = array('name' => 'category', 'title' => $this->lang->story->category, 'type' => 'category', 'sortType' => true);
-1
View File
@@ -1 +0,0 @@
.block-table {height:386px}
+5 -5
View File
@@ -13,10 +13,10 @@ namespace zin;
if(!$longBlock)
{
unset($config->block->plan->dtable['id']);
unset($config->block->plan->dtable['product']);
unset($config->block->plan->dtable['hour']);
unset($config->block->plan->dtable['bugs']);
unset($config->block->plan->dtable->fieldList['id']);
unset($config->block->plan->dtable->fieldList['product']);
unset($config->block->plan->dtable->fieldList['hour']);
unset($config->block->plan->dtable->fieldList['bugs']);
}
foreach($plans as $plan) $plan->product = zget($products, $plan->product);
@@ -26,7 +26,7 @@ panel
set('class', 'plan-block'),
dtable
(
set::cols(array_values($config->block->plan->dtable)),
set::cols(array_values($config->block->plan->dtable->fieldList)),
set::data(array_values($plans))
)
);
+8 -1
View File
@@ -11,6 +11,14 @@ declare(strict_types=1);
namespace zin;
if(!$longBlock)
{
unset($config->block->product->dtable->fieldList['unclosedFeedback']);
unset($config->block->product->dtable->fieldList['storyCompleteRate']);
unset($config->block->product->dtable->fieldList['plan']);
unset($config->block->product->dtable->fieldList['activatedBug']);
}
foreach($productStats as $product)
{
if(!empty($product->PO))
@@ -26,7 +34,6 @@ panel
(
dtable
(
setClass('shadow rounded'),
set::cols(array_values($config->block->product->dtable->fieldList)),
set::data(array_values($productStats))
)
+1 -1
View File
@@ -22,7 +22,7 @@ panel
(
set::width('100%'),
set::height('auto'),
set::cols(array_values($config->block->dtable->release->fieldList)),
set::cols(array_values($config->block->release->dtable->fieldList)),
set::data(array_values($releases))
)
);
+1 -2
View File
@@ -20,11 +20,10 @@ foreach($stories as $story)
panel
(
set::class('block-table'),
dtable
(
set::width('100%'),
set::cols(array_values($config->block->dtable->stories->fieldList)),
set::cols(array_values($config->block->story->dtable->fieldList)),
set::data(array_values($stories))
)
);