From 2ab2e3a2fb3464431ee6302a6fc2a7c044e78fce Mon Sep 17 00:00:00 2001 From: liumengyi Date: Wed, 3 Aug 2022 11:18:14 +0800 Subject: [PATCH] * Finish task #62958. --- module/kanban/js/view.js | 4 ++-- module/kanban/view/viewarchivedcard.html.php | 21 ++++++++++++++++---- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/module/kanban/js/view.js b/module/kanban/js/view.js index 7e39e60137..5bec4a50a1 100644 --- a/module/kanban/js/view.js +++ b/module/kanban/js/view.js @@ -407,7 +407,7 @@ function renderKanbanItem(item, $item) $user.html(renderUsersAvatar(assignedTo, item.id)).attr('title', title); } - if(kanban.performable == 1) + if(kanban.performable == 1 && (item.fromType == '' || item.fromType == 'execution')) { var $progress = $item.children('.progress-box'); if(!$progress.length) $progress = $('
' + item.progress + '%
').appendTo($item); @@ -1189,7 +1189,7 @@ function createCardMenu(options) var items = []; if(privs.includes('editCard') && card.fromType == '') items.push({label: kanbanLang.editCard, icon: 'edit', url: createLink('kanban', 'editCard', 'cardID=' + card.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); if(privs.includes('deleteCard')) items.push({label: card.fromType == '' ? kanbanLang.deleteCard : kanbanLang.removeCard, icon: card.fromType == '' ? 'trash' : 'unlink', url: createLink('kanban', 'deleteCard', 'cardID=' + card.id), attrs: {'target': 'hiddenwin'}}); - if(kanban.performable == 1) + if(kanban.performable == 1 && card.fromType == '') { if(card.status == 'done') { diff --git a/module/kanban/view/viewarchivedcard.html.php b/module/kanban/view/viewarchivedcard.html.php index 74a334d0c1..d12d129862 100644 --- a/module/kanban/view/viewarchivedcard.html.php +++ b/module/kanban/view/viewarchivedcard.html.php @@ -47,7 +47,12 @@ #archivedCards .card-item .has-color .info > .label-pri {border-color: #FFFFFF;} #archivedCards .card-item .has-color .progress-box > .progress-number {color: #FFFFFF;} #archivedCards .progress-box {width: 97%;} -#performable {padding: 25px 10px !important;} +#archivedCards .no-progress {padding: 7px 10px !important;} +#archivedCards .has-progress {padding: 21px 10px !important;} +#archivedCards .has-desc.has-progress {padding: 26px 10px !important;} +#archivedCards .has-desc.no-progress {padding: 19px 10px !important;} +#archivedCards .has-avatar.has-progress {padding: 24px 10px !important;} +#archivedCards .has-avatar.no-progress {padding: 9px 10px !important;} loadLang('execution'); @@ -71,6 +76,7 @@ js::set('systemMode', $this->config->systemMode);
color == '#b10b0b') $color = 'has-color red'; if($card->color == '#cfa227') $color = 'has-color yellow'; @@ -98,7 +104,11 @@ js::set('systemMode', $this->config->systemMode); $name = isset($card->title) ? $card->title : $card->name; if(common::hasPriv($card->fromType, 'view')) echo html::a($this->createLink($card->fromType, 'view', "id=$card->fromID"), $name, '', "class='cardName' title='$name'"); if(!common::hasPriv($card->fromType, 'view')) echo "
$name
"; - if($card->fromType == 'productplan' or $card->fromType == 'build') echo "
$card->desc
"; + if($card->fromType == 'productplan' or $card->fromType == 'build') + { + echo "
$card->desc
"; + if(!empty($card->desc)) $class .= ' has-desc'; + } echo "
"; if(isset($lang->{$card->fromType}->statusList[$card->objectStatus])) echo "" . $lang->{$card->fromType}->statusList[$card->objectStatus] . ''; if(isset($card->date) and !helper::isZeroDate($card->date)) echo "" . date("Y-m-d", strtotime($card->date)) . "" @@ -147,6 +157,7 @@ js::set('systemMode', $this->config->systemMode); if($count > 2) continue; echo html::smallAvatar(array('avatar' => $usersAvatar[$account], 'account' => $account, 'name' => $users[$account]), 'avatar-circle'); $count ++; + $class .= ' has-avatar'; } ?> 2) echo "...";?> @@ -159,11 +170,12 @@ js::set('systemMode', $this->config->systemMode); echo "
"; echo html::smallAvatar(array('avatar' => $usersAvatar[$assignedToList], 'account' => $assignedToList, 'name' => $users[$assignedToList]), 'avatar-circle'); echo "
"; + $class .= ' has-avatar'; } ?>
- performable):?> + performable and ($card->fromType == 'execution' or empty($card->fromType))):?>
@@ -173,7 +185,8 @@ js::set('systemMode', $this->config->systemMode);
-
performable) echo "id='performable'";?>> + performable) and ($card->fromType == 'execution' or empty($card->fromType))) ? ' has-progress' : ' no-progress';?> +
config->CRKanban) and $this->config->CRKanban == '0' and $kanban->status == 'closed'); $canRestore = (commonModel::hasPriv('kanban', 'restoreCard') and $CRKanban);