diff --git a/module/kanban/config.php b/module/kanban/config.php index 2a30d9f20c..3a08fde5c7 100644 --- a/module/kanban/config.php +++ b/module/kanban/config.php @@ -46,7 +46,7 @@ $config->kanban->editor->viewcard = array('id' => 'comment', 'tools' => 'simp $config->kanban->fromType = array('execution', 'productplan', 'release', 'build'); $config->kanban->executionField = array('name', 'status', 'end', 'PM', 'type', 'deleted'); -$config->kanban->productplanField = array(); +$config->kanban->productplanField = array('title', 'status', 'begin', 'end', 'deleted'); $config->kanban->releaseField = array('name', 'status', 'date', 'deleted'); $config->kanban->buildField = array('name', 'date', 'builder'); diff --git a/module/kanban/css/view.css b/module/kanban/css/view.css index 731bde545c..5efe68a76a 100644 --- a/module/kanban/css/view.css +++ b/module/kanban/css/view.css @@ -102,9 +102,9 @@ .gray .actions {display:none;} .kanban-card .header .executionName {display: flex; width: 100%; float: left; white-space: nowrap; overflow: hidden;} -.kanban-card .header .executionName .title, .releaseTitle {padding-right: 0px; margin-right: 5px; white-space: nowrap; overflow: hidden;} +.kanban-card .header .executionName .title, .releaseTitle, .productplanTitle {padding-right: 0px; margin-right: 5px; white-space: nowrap; overflow: hidden;} .kanban-card .header .executionName > span {flex: none;} -.execInfo, .releaseInfo {margin-top: 23px;} +.execInfo, .releaseInfo, .productplanInfo {margin-top: 23px;} .execInfo .execStatus{margin-right: 20px;} .label-wait {background: #EFEFEF !important; color: #838A9D;} .label-doing {background: #f8d2d2 !important; color: #e64b4c;} @@ -112,7 +112,7 @@ .label-closed, .label-terminate {background: #e5e5e5 !important; color: #b8b8b8;} .label-deleted {background: #ff5d5d !important; color: #fff;} .label-normal {background: #e1e8d9 !important; color: #9abe76;} -.region .kanban-item > .kanban-card > .execInfo > .user, .region .kanban-item > .kanban-card > .releaseInfo > .user {position: absolute; right: 10px; bottom: -2px} -.region .kanban-item > .kanban-card > .execInfo > .user > .avatar, .region .kanban-item > .kanban-card > .releaseInfo > .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 {padding-right: 5px;} -.kanban-card .releaseTitle {width: 100%; float: left;} +.region .kanban-item > .kanban-card > .execInfo > .user, .region .kanban-item > .kanban-card > .releaseInfo > .user, .region .kanban-item > .kanban-card > .productplanInfo > .user {position: absolute; right: 10px; bottom: -2px} +.region .kanban-item > .kanban-card > .execInfo > .user > .avatar, .region .kanban-item > .kanban-card > .releaseInfo > .user > .avatar, .region .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 {padding-right: 5px;} +.kanban-card .releaseTitle, .kanban-card .productplanTitle {width: 100%; float: left;} diff --git a/module/kanban/js/view.js b/module/kanban/js/view.js index 83a7b76e4b..3769819126 100644 --- a/module/kanban/js/view.js +++ b/module/kanban/js/view.js @@ -288,6 +288,10 @@ function renderKanbanItem(item, $item) { renderBuildItem(item, $item); } + else if(item.fromType == 'productplan') + { + renderProductplanItem(item, $item); + } else { var $title = $item.children('.title'); @@ -533,6 +537,67 @@ function renderReleaseItem(item, $item) } } +/** + * Render product plan item. + * + * @param object item + * @param object $item + * @access public + * @return void + */ +function renderProductplanItem(item, $item) +{ + var privs = item.actions; + + /* Print name. */ + var $title = $item.children('.productplanTitle'); + 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); + } + $title.attr('title', item.title); + + var $info = $item.children('.productplanInfo'); + if(!$info.length) $info = $( + [ + '