* Finish task #47990.
This commit is contained in:
@@ -47,7 +47,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->releaseField = array('name', 'status', 'date');
|
||||
$config->kanban->releaseField = array('name', 'status', 'date', 'deleted');
|
||||
$config->kanban->buildField = array();
|
||||
|
||||
$config->kanban->default = new stdclass();
|
||||
|
||||
+12
-10
@@ -102,15 +102,17 @@
|
||||
.gray .actions {display:none;}
|
||||
|
||||
.kanban-card .header .executionName {display: flex; width: 100%; float: left; white-space: nowrap; overflow: hidden;}
|
||||
.kanban-card .header .executionName .title {padding-right: 0px; margin-right: 5px; white-space: nowrap; overflow: hidden;}
|
||||
.kanban-card .header .executionName .title .icon {padding-right: 5px;}
|
||||
.kanban-card .header .executionName .title, .releaseTitle {padding-right: 0px; margin-right: 5px; white-space: nowrap; overflow: hidden;}
|
||||
.kanban-card .header .executionName > span {flex: none;}
|
||||
.execInfo {margin-top: 23px;}
|
||||
.execInfo, .releaseInfo {margin-top: 23px;}
|
||||
.execInfo .execStatus{margin-right: 20px;}
|
||||
.execInfo .label-wait {background: #EFEFEF !important; color: #838A9D;}
|
||||
.execInfo .label-doing {background: #f8d2d2 !important; color: #e64b4c;}
|
||||
.execInfo .label-suspended {background: #fff3d9 !important; color: #ff9800;}
|
||||
.execInfo .label-closed {background: #e5e5e5 !important; color: #b8b8b8;}
|
||||
.execInfo .label-deleted {background: #ff5d5d !important; color: #fff;}
|
||||
.region .kanban-item > .kanban-card > .execInfo > .user {position: absolute; right: 10px; bottom: -2px}
|
||||
.region .kanban-item > .kanban-card > .execInfo > .user > .avatar {display: inline-block; width: 24px; height: 24px; line-height: 24px; margin-right: 0px; margin-left: 2px}
|
||||
.label-wait {background: #EFEFEF !important; color: #838A9D;}
|
||||
.label-doing {background: #f8d2d2 !important; color: #e64b4c;}
|
||||
.label-suspended {background: #fff3d9 !important; color: #ff9800;}
|
||||
.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;}
|
||||
|
||||
@@ -280,6 +280,10 @@ function renderKanbanItem(item, $item)
|
||||
{
|
||||
renderExecutionItem(item, $item);
|
||||
}
|
||||
else if(item.fromType == 'release')
|
||||
{
|
||||
renderReleaseItem(item, $item);
|
||||
}
|
||||
else
|
||||
{
|
||||
var $title = $item.children('.title');
|
||||
@@ -457,9 +461,72 @@ function renderExecutionItem(item, $item)
|
||||
/* Display avatars of PM. */
|
||||
var $user = $info.children('.user');
|
||||
var user = [item.PM];
|
||||
if(!$user.length) $user = $('<div class="user"></div>').appendTo($info);
|
||||
if(users[item.PM])
|
||||
{
|
||||
if(!$user.length) $user = $('<div class="user"></div>').appendTo($info);
|
||||
$user.html(renderUsersAvatar(user, item.id)).attr('title', users[item.PM]);
|
||||
}
|
||||
}
|
||||
|
||||
$user.html(renderUsersAvatar(user, item.id)).attr('title', item.PM);
|
||||
/**
|
||||
* Render plan item.
|
||||
*
|
||||
* @param object item
|
||||
* @param object $item
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function renderReleaseItem(item, $item)
|
||||
{
|
||||
var privs = item.actions;
|
||||
|
||||
/* Print name. */
|
||||
var $title = $item.children('.releaseTitle');
|
||||
if(!$title.length)
|
||||
{
|
||||
if(privs.includes('viewRelease') && item.deleted == '0') $title = $('<a class="releaseTitle"><i class="icon icon-run"></i>' + item.name + '</a>').appendTo($item).attr('href', createLink('release', 'view', 'releaseID=' + item.fromID));
|
||||
if(!privs.includes('viewRelease') || item.deleted == '1') $title = $('<a class="releaseTitle"><i class="icon icon-run"></i>' + item.name + '</a>').appendTo($item);
|
||||
}
|
||||
$title.attr('title', item.name);
|
||||
|
||||
var $info = $item.children('.releaseInfo');
|
||||
if(!$info.length) $info = $(
|
||||
[
|
||||
'<div class="releaseInfo">',
|
||||
'</div>'
|
||||
].join('')).appendTo($item);
|
||||
|
||||
var $statusBox = $info.children('.releaseStatus');
|
||||
if(!$statusBox.length)
|
||||
{
|
||||
if(item.deleted == '0')
|
||||
{
|
||||
$statusBox = $('<span class="releaseStatus label label-' + item.status + '">' + releaseLang.statusList[item.status] + '</span>').appendTo($info);
|
||||
}
|
||||
else
|
||||
{
|
||||
$statusBox = $('<span class="releaseStatus label label-deleted">' + releaseLang.deleted + '</span>').appendTo($info);
|
||||
}
|
||||
}
|
||||
|
||||
/* Display release date. */
|
||||
var $date = $info.children('.date');
|
||||
var releaseDate = $.zui.createDate(item.date);
|
||||
var today = new Date();
|
||||
var labelType = releaseDate.toLocaleDateString() == today.toLocaleDateString() ? 'light' : 'wait';
|
||||
if(!$date.length) $date = $('<span class="date label label-' + labelType + '"></span>').appendTo($info);
|
||||
|
||||
$date.text($.zui.formatDate(releaseDate, 'yyyy-MM-dd')).attr('title', $.zui.formatDate(releaseDate, 'yyyy-MM-dd')).show();
|
||||
if(labelType == 'light') $date.css('background-color', 'rgba(210, 50, 61, 0.3)');
|
||||
|
||||
/* Display avatars of creator. */
|
||||
var $user = $info.children('.user');
|
||||
var user = [item.createdBy];
|
||||
if(users[item.createdBy])
|
||||
{
|
||||
if(!$user.length) $user = $('<div class="user"></div>').appendTo($info);
|
||||
$user.html(renderUsersAvatar(user, item.id)).attr('title', users[item.createdBy]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
<?php
|
||||
$app->loadLang('execution');
|
||||
$app->loadLang('release');
|
||||
$laneCount = 0;
|
||||
foreach($regions as $region) $laneCount += $region->laneCount;
|
||||
|
||||
@@ -25,6 +26,7 @@ js::set('kanbanlaneLang', $lang->kanbanlane);
|
||||
js::set('kanbancolumnLang', $lang->kanbancolumn);
|
||||
js::set('kanbancardLang', $lang->kanbancard);
|
||||
js::set('executionLang', $lang->execution);
|
||||
js::set('releaseLang', $lang->release);
|
||||
js::set('kanbanID', $kanban->id);
|
||||
js::set('laneCount', $laneCount);
|
||||
js::set('userList', $userList);
|
||||
|
||||
Reference in New Issue
Block a user