Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms into sprint/daitingting_buildoperatemenu_productplan

This commit is contained in:
daitingting
2022-05-11 01:47:04 +00:00
10 changed files with 165 additions and 83 deletions
+13
View File
@@ -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
+2 -2
View File
@@ -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';
+16 -3
View File
@@ -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'));
+2 -2
View File
@@ -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;}
+89 -73
View File
@@ -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)
{
$(
[
'<div class="actions" title="' + kanbanLang.more + '">',
'<a data-contextmenu="card"' + whiteStyle + 'data-id="' + item.id + '">',
'<i class="icon icon-ellipsis-v"></i>',
'</a>',
'</div>'
].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)
{
$('<div class="label label-finish">' + kanbanLang.finished + '</div>').appendTo($item);
if(privs.includes('viewCard')) $title = $('<a class="title iframe" data-toggle="modal" data-width="80%"></a>').appendTo($item).attr('href', createLink('kanban', 'viewCard', 'cardID=' + item.id, '', true));
if(!privs.includes('viewCard')) $title = $('<p class="title"></p>').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)
{
$(
[
'<div class="actions" title="' + kanbanLang.more + '">',
'<a data-contextmenu="card"' + whiteStyle + 'data-id="' + item.id + '">',
'<i class="icon icon-ellipsis-v"></i>',
'</a>',
'</div>'
].join('')).appendTo($item);
}
var $info = $item.children('.info');
if(!$info.length) $info = $(
[
@@ -353,11 +329,6 @@ function renderKanbanItem(item, $item)
'<div class="user"></div>',
'</div>'
].join('')).appendTo($item);
if(kanban.performable == 1)
{
var $progress = $item.children('.progress-box');
if(!$progress.length) $progress = $('<div class="progress-box"><div class="progress"><div class="progress-bar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: ' + item.progress + '%;"></div></div><div class="progress-number">' + item.progress + '%</div></div>').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 = $('<div class="progress-box"><div class="progress"><div class="progress-bar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: ' + item.progress + '%;"></div></div><div class="progress-number">' + item.progress + '%</div></div>').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('<div class="label label-finish">' + kanbanLang.finished + '</div>');
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 = $('<a class="title"><i class="icon icon-' + icon + '"></i>' + item.name + '</a>').appendTo($titleBox).attr('href', createLink('execution', viewMethod, 'executionID=' + item.fromID));
if(!privs.includes('viewExecution') || item.deleted == '1') $title = $('<div class="title"><i class="icon icon-' + icon + '"></i>' + item.name + '</div>').appendTo($titleBox);
if(privs.includes('viewExecution') && item.deleted == '0') $title = $('<a class="title"><i class="icon icon-' + icon + '"></i>' + name + '</a>').appendTo($titleBox).attr('href', createLink('execution', viewMethod, 'executionID=' + item.fromID));
if(!privs.includes('viewExecution') || item.deleted == '1') $title = $('<div class="title"><i class="icon icon-' + icon + '"></i>' + name + '</div>').appendTo($titleBox);
}
$title.attr('title', item.name);
if(!$title.children('i').length)
{
$title.append('<i class="icon icon-run"></i>' + item.title);
}
$title.attr('title', name);
if(item.delay)
{
@@ -477,7 +479,7 @@ function renderExecutionItem(item, $item)
{
if(item.deleted == '0')
{
$statusBox = $('<span class="execStatus label label-' + item.status + '">' + executionLang.statusList[item.status] + '</span>').appendTo($info);
$statusBox = $('<span class="execStatus label label-' + item.objectStatus + '">' + executionLang.statusList[item.objectStatus] + '</span>').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 = $('<a class="releaseTitle title"><i class="icon icon-publish"></i>' + item.name + '</a>').appendTo($item).attr('href', createLink('release', 'view', 'releaseID=' + item.fromID));
if(!privs.includes('viewRelease') || item.deleted == '1') $title = $('<div class="releaseTitle"><i class="icon icon-publish"></i>' + item.name + '</div>').appendTo($item);
if(privs.includes('viewRelease') && item.deleted == '0') $title = $('<a class="releaseTitle title"><i class="icon icon-publish"></i>' + name + '</a>').appendTo($item).attr('href', createLink('release', 'view', 'releaseID=' + item.fromID));
if(!privs.includes('viewRelease') || item.deleted == '1') $title = $('<div class="releaseTitle"><i class="icon icon-publish"></i>' + name + '</div>').appendTo($item);
}
$title.attr('title', item.name);
if(!$title.children('i').length)
{
$title.prepend('<i class="icon icon-publish"></i>');
}
$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 = $('<span class="releaseStatus label label-' + item.status + '">' + releaseLang.statusList[item.status] + '</span>').appendTo($info);
$statusBox = $('<span class="releaseStatus label label-' + item.objectStatus + '">' + releaseLang.statusList[item.objectStatus] + '</span>').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 = $('<a class="productplanTitle title"><i class="icon icon-delay"></i>' + item.title + '</a>').appendTo($item).attr('href', createLink('productplan', 'view', 'productplanID=' + item.fromID));
if(!privs.includes('viewPlan') || item.deleted == '1') $title = $('<div class="productplanTitle"><i class="icon icon-delay"></i>' + item.title + '</div>').appendTo($item);
if(privs.includes('viewPlan') && item.deleted == '0') $title = $('<a class="productplanTitle title"><i class="icon icon-delay"></i>' + name + '</a>').appendTo($item).attr('href', createLink('productplan', 'view', 'productplanID=' + item.fromID));
if(!privs.includes('viewPlan') || item.deleted == '1') $title = $('<div class="productplanTitle"><i class="icon icon-delay"></i>' + name + '</div>').appendTo($item);
}
if(!$title.children('i').length)
{
$title.append('<i class="icon icon-delay"></i>' + name);
}
$title.attr('title', item.title);
@@ -597,7 +609,7 @@ function renderProductplanItem(item, $item)
{
if(item.deleted == '0')
{
$statusBox = $('<span class="productplanStatus label label-' + item.status + '">' + productplanLang.statusList[item.status] + '</span>').appendTo($info);
$statusBox = $('<span class="productplanStatus label label-' + item.objectStatus + '">' + productplanLang.statusList[item.objectStatus] + '</span>').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 = $('<a class="buildTitle" data-app="project"><i class="icon icon-ver"></i>' + item.name + '</a>').appendTo($item).attr('href', createLink('build', 'view', 'buildID=' + item.fromID));
if(!privs.includes('viewBuild') || item.deleted == '1') $title = $('<div class="buildTitle"><i class="icon icon-ver"></i>' + item.name + '</div>').appendTo($item);
if(privs.includes('viewBuild') && item.deleted == '0') $title = $('<a class="buildTitle title" data-app="project"><i class="icon icon-ver"></i>' + name + '</a>').appendTo($item).attr('href', createLink('build', 'view', 'buildID=' + item.fromID));
if(!privs.includes('viewBuild') || item.deleted == '1') $title = $('<div class="buildTitle title"><i class="icon icon-ver"></i>' + name + '</div>').appendTo($item);
}
$title.attr('title', item.name);
if(!$title.children('i').length)
{
$title.append('<i class="icon icon-ver"></i>' + 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] ? '<i class="icon icon-check" style="margin-left: 5px"></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};
+2
View File
@@ -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;
+2
View File
@@ -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;
+5 -2
View File
@@ -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;
}
}
+31 -1
View File
@@ -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;}
</style>
<?php
$app->loadLang('execution');
$app->loadLang('release');
$app->loadLang('build');
$app->loadLang('productplan');
?>
<div class='panel'>
<div class='panel-heading text-center'>
<strong><?php echo $lang->kanban->archivedCard;?></strong>
@@ -76,10 +83,21 @@
<?php if($card->status == 'done'):?>
<div class="label" style="<?php echo $labelColor;?>"><?php echo $lang->kanban->finished;?></div>
<?php endif;?>
<?php if(empty($card->fromType)):?>
<?php echo html::a($this->createLink('kanban', 'viewCard', "cardID=$card->id", '', true), $card->name, '', "class='cardName iframe' data-toggle='modal' data-width='80%' title='$card->name'");?>
<div class="info">
<span class="pri label-pri label-pri-<?php echo $card->pri;?>"><?php echo $card->pri;?></span>
<?php if($card->estimate and $card->estimate != 0) echo "<span class='text-gray'>{$card->estimate}h</span>";?>
<?php else:?>
<?php
$name = isset($card->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 "<div class='cardName' title='$name'>$name</div>";
echo "<div class='info $card->fromType'>";
if($card->fromType != 'release' and isset($lang->{$card->fromType}->statusList[$card->objectStatus])) echo "<span class='label label-$card->objectStatus'>" . $lang->{$card->fromType}->statusList[$card->objectStatus] . '</span>';
if(isset($card->date) and !helper::isZeroDate($card->date)) echo "<span class='time label label-light'>" . date("m/d", strtotime($card->date)) . "</span>"
?>
<?php endif;?>
<?php if(helper::isZeroDate($card->end) and !helper::isZeroDate($card->begin)):?>
<span class="time label label-light"><?php echo date("m/d", strtotime($card->begin)) . $lang->kanbancard->beginAB;?></span>
<?php endif;?>
@@ -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'");
?>
</div>
</div>
@@ -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 = '<i class="icon icon-ver">';
if($item.children('.execution').length) icon = '<i class="icon icon-run">';
if($item.children('.productplan').length) icon = '<i class="icon icon-delay">';
if($item.children('.release').length) icon = '<i class="icon icon-publish">';
$item.children('.cardName').prepend(icon);
});
})
</script>
+3
View File
@@ -0,0 +1,3 @@
sonar.projectKey=zentaopms
sonar.qualitygate.wait=true
sonar.coverage.exclusions=**/*.*