diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000..319fd640ef --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,13 @@ +sonarqube: + variables: + SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache + GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task + cache: + key: "${CI_JOB_NAME}" + paths: + - .sonar/cache + script: + - sonar-scanner -Dsonar.inclusions=$(git diff --name-only HEAD~1|tr '\n' ',') + allow_failure: true + only: + - master # or the name of your main branch diff --git a/module/custom/config.php b/module/custom/config.php index ff9462b546..9b42284642 100644 --- a/module/custom/config.php +++ b/module/custom/config.php @@ -48,8 +48,8 @@ $config->custom->fieldList['release']['create'] = 'desc'; $config->custom->fieldList['release']['edit'] = 'desc'; $config->custom->fieldList['execution']['create'] = 'days,desc,PO,PM,QD,RD'; $config->custom->fieldList['execution']['edit'] = 'days,desc,PO,PM,QD,RD'; -$config->custom->fieldList['task']['create'] = 'story,pri,estimate,desc,estStarted,deadline'; -$config->custom->fieldList['task']['edit'] = 'pri,estimate,estStarted,deadline'; +$config->custom->fieldList['task']['create'] = 'module,story,pri,estimate,desc,estStarted,deadline'; +$config->custom->fieldList['task']['edit'] = 'module,pri,estimate,estStarted,deadline'; $config->custom->fieldList['task']['finish'] = 'comment'; $config->custom->fieldList['task']['activate'] = 'assignedTo,comment'; $config->custom->fieldList['build'] = 'scmPath,filePath,desc'; diff --git a/module/kanban/control.php b/module/kanban/control.php index ae243b271c..72fc0b3a02 100644 --- a/module/kanban/control.php +++ b/module/kanban/control.php @@ -1320,8 +1320,14 @@ class kanban extends control { $region = $this->kanban->getRegionByID($regionID); + $cards = $this->kanban->getCardsByObject('region', $regionID, 1); + foreach($this->config->kanban->fromType as $fromType) + { + $cards = $this->kanban->getImportedCards($region->kanban, $cards, $fromType, 1); + } + $this->view->kanban = $this->kanban->getByID($region->kanban); - $this->view->cards = $this->kanban->getCardsByObject('region', $regionID, 1); + $this->view->cards = $cards; $this->view->users = $this->loadModel('user')->getPairs('noletter|nodeleted'); $this->view->userIdPairs = $this->user->getPairs('noletter|nodeleted|showid'); $this->view->usersAvatar = $this->user->getAvatarPairs(); @@ -1374,13 +1380,20 @@ class kanban extends control */ public function deleteCard($cardID, $confirm = 'no') { + $card = $this->kanban->getCardByID($cardID); if($confirm == 'no') { - return print(js::confirm($this->lang->kanbancard->confirmDelete, $this->createLink('kanban', 'deleteCard', "cardID=$cardID&confirm=yes"))); + $confirmTip = $card->fromType == '' ? $this->lang->kanbancard->confirmDelete : $this->lang->kanbancard->confirmRemove; + return print(js::confirm($confirmTip, $this->createLink('kanban', 'deleteCard', "cardID=$cardID&confirm=yes"))); } else { - $this->kanban->delete(TABLE_KANBANCARD, $cardID); + if($card->fromType == '') $this->kanban->delete(TABLE_KANBANCARD, $cardID); + if($card->fromType != '') + { + $this->dao->delete()->from(TABLE_KANBANCARD)->where('id')->eq($cardID)->exec(); + $this->loadModel('action')->create('kanbancard', $cardID, 'Deleted', '', $cardID); + } if(isonlybody()) return print(js::reload('parent.parent')); return print(js::reload('parent')); diff --git a/module/kanban/css/view.css b/module/kanban/css/view.css index 52ff8d0e5b..313bd267e2 100644 --- a/module/kanban/css/view.css +++ b/module/kanban/css/view.css @@ -121,13 +121,13 @@ .label-closed, .label-terminate {background: #e5e5e5 !important; color: #b8b8b8;} .label-deleted {background: #ff5d5d !important; color: #fff;} .label-normal {background: #e1e8d9 !important; color: #9abe76;} -.kanban-item > .kanban-card > .execInfo > .user, .kanban-item > .kanban-card > .releaseInfo > .user, .kanban-item > .kanban-card > .productplanInfo > .user {position: absolute; right: 13px; bottom: 1px} +.kanban-item > .kanban-card > .execInfo > .user, .kanban-item > .kanban-card > .releaseInfo > .user, .kanban-item > .kanban-card > .productplanInfo > .user {float:right} .kanban-item > .kanban-card > .execInfo > .user > .avatar, .kanban-item > .kanban-card > .releaseInfo > .user > .avatar, .kanban-item > .kanban-card > .productplanInfo > .user > .avatar {display: inline-block; width: 24px; height: 24px; line-height: 24px; margin-right: 0px; margin-left: 2px} .kanban-card .releaseTitle .icon, .kanban-card .title .icon, .kanban-card .productplanTitle .icon, .kanban-card .title .icon, .kanban-card .buildTitle .icon{padding-right: 5px;} .kanban-card .label-finish {margin-right: 7px; margin-top: -1px; padding: 3px 5px; float: left; background-color:#2a5f29;} .kanban-card .releaseTitle, .kanban-card .productplanTitle {width: 100%; float: left;} -.progress-box {display: flex; flex-direction: row; margin-top: 10px;} +.progress-box {width:100%; display: flex; flex-direction: row; margin-top: 10px;} .progress {flex: auto; margin: 5px auto 5px;} .progress-number {padding-left: 5px;} diff --git a/module/kanban/js/view.js b/module/kanban/js/view.js index 0d0b723b39..1ba790454f 100644 --- a/module/kanban/js/view.js +++ b/module/kanban/js/view.js @@ -278,6 +278,22 @@ function renderKanbanItem(item, $item) var whiteStyle = null; if(item.color == '#2a5f29' || item.color == '#b10b0b' || item.color == '#cfa227') whiteStyle = 'style="color:#FFFFFF"'; + var privs = item.actions; + var printMoreBtn = (privs.includes('editCard') || privs.includes('archiveCard') || privs.includes('copyCard') || privs.includes('deleteCard') || privs.includes('moveCard') || privs.includes('setCardColor')); + var $actions = $item.children('.actions'); + var $title = $item.children('.title'); + if(printMoreBtn && !$actions.length) + { + $( + [ + '
', + '', + '', + '', + '
' + ].join('')).appendTo($item); + } + if(item.fromType == 'execution') { renderExecutionItem(item, $item); @@ -296,53 +312,13 @@ function renderKanbanItem(item, $item) } else { - var $title = $item.children('.title'); - var privs = item.actions; - var printMoreBtn = (privs.includes('editCard') || privs.includes('archiveCard') || privs.includes('copyCard') || privs.includes('deleteCard') || privs.includes('moveCard') || privs.includes('setCardColor')); - - if(privs.includes('sortCard')) $item.parent().addClass('sort'); if(!$title.length) { - $('
' + kanbanLang.finished + '
').appendTo($item); if(privs.includes('viewCard')) $title = $('').appendTo($item).attr('href', createLink('kanban', 'viewCard', 'cardID=' + item.id, '', true)); if(!privs.includes('viewCard')) $title = $('

').appendTo($item); } $title.text(item.name).attr('title', item.name); - if(kanban.performable == 1 && item.status == 'done' ) - { - var finishColor = '#2a5f29'; - if(item.color == '#2a5f29') finishColor = '#FFFFFF'; - $title.text(item.name).css('color', finishColor); - $item.children('.label-finish').show(); - if(item.color == '#2a5f29') - { - $item.children('.label-finish').css({'background-color':'#FFFFFF','color':'#2a5f29'}); - } - else - { - $item.children('.label-finish').css({'background-color':'','color':'#FFFFFF'}); - } - } - else - { - $title.text(item.name).css('color', ''); - $item.children('.label-finish').hide(); - } - - var $actions = $item.children('.actions'); - if(printMoreBtn && !$actions.length) - { - $( - [ - '
', - '', - '', - '', - '
' - ].join('')).appendTo($item); - } - var $info = $item.children('.info'); if(!$info.length) $info = $( [ @@ -353,11 +329,6 @@ function renderKanbanItem(item, $item) '
', '' ].join('')).appendTo($item); - if(kanban.performable == 1) - { - var $progress = $item.children('.progress-box'); - if(!$progress.length) $progress = $('
' + item.progress + '%
').appendTo($item); - } $item.data('card', item); @@ -367,15 +338,6 @@ function renderKanbanItem(item, $item) $info.children('.pri') .attr('class', 'pri label-pri label-pri-' + item.pri) .text(item.pri); - if(kanban.performable == 1) - { - $progress.find('.progress-bar').css('width', item.progress + '%'); - $progress.find('.progress-number').html(item.progress + '%'); - } - - $item.css('background-color', item.color); - $item.toggleClass('has-color', item.color != '#fff' && item.color != ''); - $item.find('.info > .label-light').css('background-color', item.color); var $time = $info.children('.time'); if(item.end == '0000-00-00' && item.begin == '0000-00-00') @@ -413,6 +375,41 @@ function renderKanbanItem(item, $item) for(i = 0; i < assignedTo.length; i++) title.push(users[assignedTo[i]]); $user.html(renderUsersAvatar(assignedTo, item.id)).attr('title', title); } + + if(kanban.performable == 1) + { + var $progress = $item.children('.progress-box'); + if(!$progress.length) $progress = $('
' + item.progress + '%
').appendTo($item); + $progress.find('.progress-bar').css('width', item.progress + '%'); + $progress.find('.progress-number').html(item.progress + '%'); + } + $item.css('background-color', item.color); + $item.toggleClass('has-color', item.color != '#fff' && item.color != ''); + $item.find('.info > .label-light').css('background-color', item.color); + + $title = item.fromType == 'execution' ? $item.children('.header').children('.executionName').children('.title') : $item.children('.title'); + if(!$title.children('.label-finish').length) $title.prepend('
' + kanbanLang.finished + '
'); + var name = item.title ? item.title : item.name; + if(kanban.performable == 1 && item.status == 'done' ) + { + var finishColor = '#2a5f29'; + if(item.color == '#2a5f29') finishColor = '#FFFFFF'; + $title.css('color', finishColor); + $title.children('.label-finish').show(); + if(item.color == '#2a5f29') + { + $item.children('.label-finish').css({'background-color':'#FFFFFF','color':'#2a5f29'}); + } + else + { + $item.children('.label-finish').css({'background-color':'','color':'#FFFFFF'}); + } + } + else + { + $title.css('color', ''); + $title.children('.label-finish').hide(); + } } /** @@ -445,14 +442,19 @@ function renderExecutionItem(item, $item) /* Print execution name. */ var $title = $titleBox.children('.title'); + var name = item.title ? item.title : item.name; if(!$title.length) { var icon = mode == 'new' ? 'run' : 'project'; var viewMethod = item.execType == 'kanban' ? 'kanban' : 'view'; - if(privs.includes('viewExecution') && item.deleted == '0') $title = $('' + item.name + '').appendTo($titleBox).attr('href', createLink('execution', viewMethod, 'executionID=' + item.fromID)); - if(!privs.includes('viewExecution') || item.deleted == '1') $title = $('
' + item.name + '
').appendTo($titleBox); + if(privs.includes('viewExecution') && item.deleted == '0') $title = $('' + name + '').appendTo($titleBox).attr('href', createLink('execution', viewMethod, 'executionID=' + item.fromID)); + if(!privs.includes('viewExecution') || item.deleted == '1') $title = $('
' + name + '
').appendTo($titleBox); } - $title.attr('title', item.name); + if(!$title.children('i').length) + { + $title.append('' + item.title); + } + $title.attr('title', name); if(item.delay) { @@ -477,7 +479,7 @@ function renderExecutionItem(item, $item) { if(item.deleted == '0') { - $statusBox = $('' + executionLang.statusList[item.status] + '').appendTo($info); + $statusBox = $('' + executionLang.statusList[item.objectStatus] + '').appendTo($info); } else { @@ -519,12 +521,17 @@ function renderReleaseItem(item, $item) /* Print name. */ var $title = $item.children('.releaseTitle'); + var name = item.title ? item.title : item.name; if(!$title.length) { - if(privs.includes('viewRelease') && item.deleted == '0') $title = $('' + item.name + '').appendTo($item).attr('href', createLink('release', 'view', 'releaseID=' + item.fromID)); - if(!privs.includes('viewRelease') || item.deleted == '1') $title = $('
' + item.name + '
').appendTo($item); + if(privs.includes('viewRelease') && item.deleted == '0') $title = $('' + name + '').appendTo($item).attr('href', createLink('release', 'view', 'releaseID=' + item.fromID)); + if(!privs.includes('viewRelease') || item.deleted == '1') $title = $('
' + name + '
').appendTo($item); } - $title.attr('title', item.name); + if(!$title.children('i').length) + { + $title.prepend(''); + } + $title.attr('title', name); var $info = $item.children('.releaseInfo'); if(!$info.length) $info = $( @@ -538,7 +545,7 @@ function renderReleaseItem(item, $item) { if(item.deleted == '0') { - $statusBox = $('' + releaseLang.statusList[item.status] + '').appendTo($info); + $statusBox = $('' + releaseLang.statusList[item.objectStatus] + '').appendTo($info); } else { @@ -578,10 +585,15 @@ function renderProductplanItem(item, $item) /* Print name. */ var $title = $item.children('.productplanTitle'); + var name = item.title ? item.title : item.name; if(!$title.length) { - if(privs.includes('viewPlan') && item.deleted == '0') $title = $('' + item.title + '').appendTo($item).attr('href', createLink('productplan', 'view', 'productplanID=' + item.fromID)); - if(!privs.includes('viewPlan') || item.deleted == '1') $title = $('
' + item.title + '
').appendTo($item); + if(privs.includes('viewPlan') && item.deleted == '0') $title = $('' + name + '').appendTo($item).attr('href', createLink('productplan', 'view', 'productplanID=' + item.fromID)); + if(!privs.includes('viewPlan') || item.deleted == '1') $title = $('
' + name + '
').appendTo($item); + } + if(!$title.children('i').length) + { + $title.append('' + name); } $title.attr('title', item.title); @@ -597,7 +609,7 @@ function renderProductplanItem(item, $item) { if(item.deleted == '0') { - $statusBox = $('' + productplanLang.statusList[item.status] + '').appendTo($info); + $statusBox = $('' + productplanLang.statusList[item.objectStatus] + '').appendTo($info); } else { @@ -646,12 +658,17 @@ function renderBuildItem(item, $item) /* Print name. */ var $title = $item.children('.buildTitle'); + var name = item.title ? item.title : item.name; if(!$title.length) { - if(privs.includes('viewBuild') && item.deleted == '0') $title = $('' + item.name + '').appendTo($item).attr('href', createLink('build', 'view', 'buildID=' + item.fromID)); - if(!privs.includes('viewBuild') || item.deleted == '1') $title = $('
' + item.name + '
').appendTo($item); + if(privs.includes('viewBuild') && item.deleted == '0') $title = $('' + name + '').appendTo($item).attr('href', createLink('build', 'view', 'buildID=' + item.fromID)); + if(!privs.includes('viewBuild') || item.deleted == '1') $title = $('
' + name + '
').appendTo($item); } - $title.attr('title', item.name); + if(!$title.children('i').length) + { + $title.append('' + item.title); + } + $title.attr('title', name); var $info = $item.children('.info'); if(!$info.length) $info = $( @@ -1069,7 +1086,7 @@ function createCardMenu(options) if(!privs.length) return []; var items = []; - if(privs.includes('editCard')) 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('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('performable') && kanban.performable == 1) { if(card.status == 'done') @@ -1081,9 +1098,6 @@ function createCardMenu(options) items.push({label: kanbanLang.finishCard, icon: 'checked', onClick: function(){finishCard(card.id, card.kanban, card.region);}}); } } - if(privs.includes('archiveCard') && kanban.archived == '1') items.push({label: kanbanLang.archiveCard, icon: 'card-archive', url: createLink('kanban', 'archiveCard', 'cardID=' + card.id), attrs: {'target': 'hiddenwin'}}); - if(privs.includes('copyCard')) items.push({label: kanbanLang.copyCard, icon: 'copy', url: createLink('kanban', 'copyCard', 'cardID=' + card.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal'}}); - if(privs.includes('deleteCard')) items.push({label: kanbanLang.deleteCard, icon: 'trash', url: createLink('kanban', 'deleteCard', 'cardID=' + card.id), attrs: {'target': 'hiddenwin'}}); if(privs.includes('moveCard')) { var moveCardItems = []; @@ -1107,10 +1121,11 @@ function createCardMenu(options) moveCardItems = moveCardItems.reverse(); items.push({label: kanbanLang.moveCard, icon: 'move', items: moveCardItems}); } + if(privs.includes('archiveCard') && kanban.archived == '1') items.push({label: kanbanLang.archiveCard, icon: 'card-archive', url: createLink('kanban', 'archiveCard', 'cardID=' + card.id), attrs: {'target': 'hiddenwin'}}); if(privs.includes('setCardColor')) { var cardColoritems = []; - if(!card.color) color = "#fff"; + if(!card.color) card.color = "#fff"; for(let i = 0 ; i < colorList.length ; i ++ ) { var attr = card.color == colorList[i] ? '' : ''; @@ -1120,6 +1135,7 @@ function createCardMenu(options) }; items.push({label: kanbanLang.cardColor, icon: 'color', items: cardColoritems}); } + 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'}}); var bounds = options.$trigger[0].getBoundingClientRect(); items.$options = {x: bounds.right, y: bounds.top}; diff --git a/module/kanban/lang/en.php b/module/kanban/lang/en.php index b6d8efb4a2..cce018447c 100644 --- a/module/kanban/lang/en.php +++ b/module/kanban/lang/en.php @@ -40,6 +40,7 @@ $lang->kanban->moveCard = 'Move Card'; $lang->kanban->cardColor = 'Card Color'; $lang->kanban->setCardColor = 'Set Card Color'; $lang->kanban->deleteCard = 'Delete Card'; +$lang->kanban->removeCard = 'Remove Card'; $lang->kanban->assigntoCard = 'Assign'; $lang->kanban->setting = 'Setting'; $lang->kanban->enableArchived = 'Enable Archived'; @@ -365,6 +366,7 @@ $lang->kanbancard->confirmArchive = 'Are you sure to archive this card? After $lang->kanbancard->confirmDelete = 'Are you sure to delete this card? After deleting the card, it will be deleted from the Kanban. You can only view it in the system recycle bin.'; $lang->kanbancard->confirmRestore = "Are you sure you want to restore this card? After the card is restored, the card will be restored to the '%s' Kanban column."; $lang->kanbancard->confirmRestoreTip = "The card's column has been archived or deleted, please restore '%s' column first."; +$lang->kanbancard->confirmRemove = 'Are you sure to remove this card? After removing the card, the original data would not be affected.The card would be removed from the Kanban and counld not be restored.'; $lang->kanbancard->priList[1] = 1; $lang->kanbancard->priList[2] = 2; diff --git a/module/kanban/lang/zh-cn.php b/module/kanban/lang/zh-cn.php index 3b30ccdcdf..00a8305975 100644 --- a/module/kanban/lang/zh-cn.php +++ b/module/kanban/lang/zh-cn.php @@ -40,6 +40,7 @@ $lang->kanban->moveCard = '移动卡片'; $lang->kanban->cardColor = '卡片颜色'; $lang->kanban->setCardColor = '设置卡片颜色'; $lang->kanban->deleteCard = '删除卡片'; +$lang->kanban->removeCard = '移除卡片'; $lang->kanban->assigntoCard = '指派'; $lang->kanban->setting = '设置'; $lang->kanban->enableArchived = '设置归档功能'; @@ -365,6 +366,7 @@ $lang->kanbancard->confirmArchive = '您确认归档该卡片吗?归档卡 $lang->kanbancard->confirmDelete = '您确认删除该卡片吗?删除卡片后,该卡片将从看板中删除,您只能通过系统回收站查看。'; $lang->kanbancard->confirmRestore = '您确定要还原该卡片吗?还原卡片后,该卡片将还原到“%s”看板列中。'; $lang->kanbancard->confirmRestoreTip = '该卡片所属的看板列已被归档或删除,请先还原“%s”看板列。'; +$lang->kanbancard->confirmRemove = '您确认移除该卡片吗?移除卡片后,源数据不会受到影响,卡片将从看板中移除且无法恢复。'; $lang->kanbancard->priList[1] = 1; $lang->kanbancard->priList[2] = 2; diff --git a/module/kanban/model.php b/module/kanban/model.php index 78ad667080..b3f439b886 100644 --- a/module/kanban/model.php +++ b/module/kanban/model.php @@ -1113,16 +1113,17 @@ class kanbanModel extends model * @param int $kanbanID * @param object $cards * @param string $fromType + * @param int $archived * @access public * @return array */ - public function getImportedCards($kanbanID, $cards, $fromType) + public function getImportedCards($kanbanID, $cards, $fromType, $archived = 0) { /* Get imported cards based on imported object type. */ $objectCards = $this->dao->select('*')->from(TABLE_KANBANCARD) ->where('deleted')->eq(0) ->andWhere('kanban')->eq($kanbanID) - ->andWhere('archived')->eq(0) + ->andWhere('archived')->eq($archived) ->andWhere('fromType')->eq($fromType) ->fetchGroup('fromID', 'id'); @@ -1168,6 +1169,8 @@ class kanbanModel extends model $objectCard->execType = $object->type; } + $objectCard->objectStatus = $objectCard->status; + $objectCard->status = $objectCard->progress == 100 ? 'done' : 'doing'; $cards[$cardID] = $objectCard; } } diff --git a/module/kanban/view/viewarchivedcard.html.php b/module/kanban/view/viewarchivedcard.html.php index 551ca80854..09da6b4a0f 100644 --- a/module/kanban/view/viewarchivedcard.html.php +++ b/module/kanban/view/viewarchivedcard.html.php @@ -31,6 +31,7 @@ #archivedCards .info > .users > span:after {right: -4px; content: ''; display: block; position: absolute; width: 2px; height: 2px; background-color: #8990a2; top: 0px; border-radius: 50%;} #archivedCards .info > .users .avatar {display: inline-block; position: relative; border-radius: 50%; top: -5px; margin: 5px; right: -7px; margin-left: -4px;} #archivedCards .cardName {word-wrap: break-word;} +#archivedCards .card-item .icon {margin-right:2px;} #archivedCards .card-item .red {background-color: #b10b0b;} #archivedCards .card-item .yellow {background-color: #cfa227;} #archivedCards .card-item .green {background-color: #2a5f29;} @@ -44,6 +45,12 @@ #archivedCards .progress-box {width: 97%;} #performable {padding: 25px 10px !important;} +loadLang('execution'); +$app->loadLang('release'); +$app->loadLang('build'); +$app->loadLang('productplan'); +?>
kanban->archivedCard;?> @@ -76,10 +83,21 @@ status == 'done'):?>
kanban->finished;?>
+ fromType)):?> createLink('kanban', 'viewCard', "cardID=$card->id", '', true), $card->name, '', "class='cardName iframe' data-toggle='modal' data-width='80%' title='$card->name'");?>
pri;?> estimate and $card->estimate != 0) echo "{$card->estimate}h";?> + + title) ? $card->title : $card->name; + if(common::hasPriv($card->fromType, 'view')) echo html::a($this->createLink('productplan', 'view', "id=$card->fromID"), $name, '', "class='cardName' title='$name'"); + if(!common::hasPriv($card->fromType, 'view')) echo "
$name
"; + echo "
"; + if($card->fromType != 'release' and 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("m/d", strtotime($card->date)) . "" + ?> + end) and !helper::isZeroDate($card->begin)):?> begin)) . $lang->kanbancard->beginAB;?> @@ -137,7 +155,7 @@ if($canRestore) echo html::a(inlink('restoreCard', "cardID={$card->id}"), $lang->kanban->restore, '', "class='btn btn-xs btn-primary' target='hiddenwin'"); - if($canDelete) echo html::a($this->createLink('kanban', 'deleteCard', "cardID=$card->id"), $lang->delete, '', "class='btn btn-xs delete-card' target='hiddenwin'"); + if($canDelete) echo html::a($this->createLink('kanban', 'deleteCard', "cardID=$card->id"), $card->fromType == '' ? $lang->delete : $lang->unlink, '', "class='btn btn-xs delete-card' target='hiddenwin'"); ?>
@@ -152,5 +170,17 @@ $(function() { $('#archivedCards').animate({right: -400}, 500); }); + $('.card-item').each(function() + { + var $item = $(this).children('.col-xs-10').children('.kanban-item'); + var icon = ''; + + if($item.children('.build').length) icon = ''; + if($item.children('.execution').length) icon = ''; + if($item.children('.productplan').length) icon = ''; + if($item.children('.release').length) icon = ''; + + $item.children('.cardName').prepend(icon); + }); }) diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000000..53903424ea --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,3 @@ +sonar.projectKey=zentaopms +sonar.qualitygate.wait=true +sonar.coverage.exclusions=**/*.*