From 87f0f8e458c297192d7e626c4f86202a33379b47 Mon Sep 17 00:00:00 2001 From: wangyuting Date: Tue, 7 Nov 2023 03:00:00 +0000 Subject: [PATCH] * Adjust importcard page css. --- module/kanban/config/table.php | 41 +++++++++++++++++++++++++++- module/kanban/model.php | 4 +-- module/kanban/ui/importcard.html.php | 16 +++++++++++ 3 files changed, 58 insertions(+), 3 deletions(-) diff --git a/module/kanban/config/table.php b/module/kanban/config/table.php index 8087ad067c..44c721ac51 100644 --- a/module/kanban/config/table.php +++ b/module/kanban/config/table.php @@ -28,7 +28,7 @@ $config->kanban->dtable->card->fieldList['pri']['group'] = 2; $config->kanban->dtable->card->fieldList['assignedTo']['name'] = 'assignedTo'; $config->kanban->dtable->card->fieldList['assignedTo']['title'] = $lang->kanbancard->assignedTo; -$config->kanban->dtable->card->fieldList['assignedTo']['type'] = 'text'; +$config->kanban->dtable->card->fieldList['assignedTo']['type'] = 'user'; $config->kanban->dtable->card->fieldList['assignedTo']['group'] = 3; $config->kanban->dtable->card->fieldList['begin']['name'] = 'begin'; @@ -40,3 +40,42 @@ $config->kanban->dtable->card->fieldList['end']['name'] = 'end'; $config->kanban->dtable->card->fieldList['end']['title'] = $lang->kanbancard->end; $config->kanban->dtable->card->fieldList['end']['type'] = 'date'; $config->kanban->dtable->card->fieldList['end']['group'] = 4; + +$config->kanban->dtable->plan = new stdclass(); +$config->kanban->dtable->plan->fieldList['id']['name'] = 'id'; +$config->kanban->dtable->plan->fieldList['id']['title'] = $lang->idAB; +$config->kanban->dtable->plan->fieldList['id']['type'] = 'checkID'; +$config->kanban->dtable->plan->fieldList['id']['fixed'] = 'left'; +$config->kanban->dtable->plan->fieldList['id']['group'] = 1; + +$config->kanban->dtable->plan->fieldList['title']['name'] = 'kanban'; +$config->kanban->dtable->plan->fieldList['title']['title'] = $lang->kanban->name; +$config->kanban->dtable->plan->fieldList['title']['type'] = 'title'; +$config->kanban->dtable->plan->fieldList['title']['fixed'] = 'left'; +$config->kanban->dtable->plan->fieldList['title']['group'] = 1; + +$config->kanban->dtable->plan->fieldList['card']['name'] = 'name'; +$config->kanban->dtable->plan->fieldList['card']['title'] = $lang->kanbancard->name; +$config->kanban->dtable->plan->fieldList['card']['type'] = 'title'; +$config->kanban->dtable->plan->fieldList['card']['fixed'] = 'left'; +$config->kanban->dtable->plan->fieldList['card']['group'] = 1; + +$config->kanban->dtable->plan->fieldList['pri']['name'] = 'pri'; +$config->kanban->dtable->plan->fieldList['pri']['title'] = $lang->kanbancard->pri; +$config->kanban->dtable->plan->fieldList['pri']['type'] = 'pri'; +$config->kanban->dtable->plan->fieldList['pri']['group'] = 2; + +$config->kanban->dtable->plan->fieldList['assignedTo']['name'] = 'assignedTo'; +$config->kanban->dtable->plan->fieldList['assignedTo']['title'] = $lang->kanbancard->assignedTo; +$config->kanban->dtable->plan->fieldList['assignedTo']['type'] = 'text'; +$config->kanban->dtable->plan->fieldList['assignedTo']['group'] = 3; + +$config->kanban->dtable->plan->fieldList['begin']['name'] = 'begin'; +$config->kanban->dtable->plan->fieldList['begin']['title'] = $lang->kanbancard->begin; +$config->kanban->dtable->plan->fieldList['begin']['type'] = 'date'; +$config->kanban->dtable->plan->fieldList['begin']['group'] = 4; + +$config->kanban->dtable->plan->fieldList['end']['name'] = 'end'; +$config->kanban->dtable->plan->fieldList['end']['title'] = $lang->kanbancard->end; +$config->kanban->dtable->plan->fieldList['end']['type'] = 'date'; +$config->kanban->dtable->plan->fieldList['end']['group'] = 4; diff --git a/module/kanban/model.php b/module/kanban/model.php index cc8ce6e2d7..5659431f98 100755 --- a/module/kanban/model.php +++ b/module/kanban/model.php @@ -2647,11 +2647,11 @@ class kanbanModel extends model * @param int $laneID * @param int $colID * @param string $type story|task|bug|card - * @param int $cardID + * @param string $cardID * @access public * @return void */ - public function addKanbanCell(int $kanbanID, int $laneID, int $colID, string $type, int $cardID = 0): void + public function addKanbanCell(int $kanbanID, int $laneID, int $colID, string $type, string $cardID = ''): void { $cell = $this->dao->select('id, cards')->from(TABLE_KANBANCELL) ->where('kanban')->eq($kanbanID) diff --git a/module/kanban/ui/importcard.html.php b/module/kanban/ui/importcard.html.php index ef7c639574..33c8b83427 100644 --- a/module/kanban/ui/importcard.html.php +++ b/module/kanban/ui/importcard.html.php @@ -14,6 +14,22 @@ jsVar('regionID', $regionID); jsVar('groupID', $groupID); jsVar('columnID', $columnID); jsVar('methodName', $this->app->rawMethod); + +$config->kanban->dtable->card->fieldList['title']['map'] = $kanbanPairs; +foreach($cards2Imported as $card) +{ + $assignedToList = ''; + if($card->assignedTo) + { + foreach(explode(',', $card->assignedTo) as $assignedTo) + { + $userName = zget($users, $assignedTo, ''); + if($userName) $assignedToList .= $userName . ' '; + } + $card->assignedTo = $assignedToList; + } +} + featureBar ( inputGroup