';
}
@@ -2419,9 +2416,10 @@ EOT;
else
{
$li = "
" . $module->name . '';
- $li .= "
";
+ $li .= "
";
$li .= html::a(helper::createLink('tree', 'edit', "module=$module->id&type=doc"), "
", '', "data-toggle='modal' title={$this->lang->doc->editType}");
$li .= html::a(helper::createLink('tree', 'browse', "rootID=$libID&type=doc&module=$module->id", '', 1), "
", '', "class='iframe' title={$this->lang->doc->editType}");
+ $li .='
';
$li .= "
";
$li .= "";
+ $li .= '
';
$li .= "
lang->tree->dragAndSort}>";
$li .= '
';
}
diff --git a/module/execution/css/kanban.css b/module/execution/css/kanban.css
index 09258a333c..daa4d7b0d7 100644
--- a/module/execution/css/kanban.css
+++ b/module/execution/css/kanban.css
@@ -36,7 +36,10 @@
#kanbans .kanban-lane {min-height: 150px;}
#kanbans .kanban-affixed > .kanban-header {top: 100px;}
+#type_chosen .icon-kanban {padding-right: 10px; font-size: 15px;}
+
.dropdown-menu a {text-align: left;}
.scrollbar-hover {max-height: 2000px; overflow: scroll !important;}
-.c-type, .c-group {width: 150px !important; overflow: unset;}
+.c-type {width: 150px !important; overflow: unset;}
+.c-group {width: 190px !important; overflow: unset;}
.c-type {margin-left: 0px !important;}
diff --git a/module/execution/js/kanban.js b/module/execution/js/kanban.js
index 583d1e1514..87fbade59d 100644
--- a/module/execution/js/kanban.js
+++ b/module/execution/js/kanban.js
@@ -11,25 +11,32 @@ function changeView(view)
*/
function renderUserAvatar(user, objectType, objectID)
{
+ var $noPrivAndNoAssigned = $('
');
+ if(objectType == 'task')
+ {
+ if(!priv.canAssignTask && !user) return $noPrivAndNoAssigned;
+ var link = createLink('task', 'assignto', 'executionID=' + executionID + '&id=' + objectID, '', true);
+ }
+ if(objectType == 'story')
+ {
+ if(!priv.canAssignStory && !user) return $noPrivAndNoAssigned;
+ var link = createLink('story', 'assignto', 'id=' + objectID, '', true);
+ }
+ if(objectType == 'bug')
+ {
+ if(!priv.canAssignBug && !user) return $noPrivAndNoAssigned;
+ var link = createLink('bug', 'assignto', 'id=' + objectID, '', true);
+ }
+
+ if(!user) return $('
');
+
if(typeof user === 'string') user = {account: user};
if(!user.avatar && window.userList && window.userList[user.account]) user = window.userList[user.account];
var $noPrivAvatar = $('
').avatar({user: user});
- if(objectType == 'task')
- {
- if(!priv.canAssignTask) return $noPrivAvatar;
- var link = createLink('task', 'assignto', 'executionID=' + executionID + '&id=' + objectID, '', true);
- }
- else if(objectType == 'story')
- {
- if(!priv.canAssignStory) return $noPrivAvatar;
- var link = createLink('story', 'assignto', 'id=' + objectID, '', true);
- }
- else if(objectType == 'bug')
- {
- if(!priv.canAssignBug) return $noPrivAvatar;
- var link = createLink('bug', 'assignto', 'id=' + objectID, '', true);
- }
+ if(objectType == 'task' && !priv.canAssignTask) return $noPrivAvatar;
+ if(objectType == 'story' && !priv.canAssignStory) return $noPrivAvatar;
+ if(objectType == 'bug' && !priv.canAssignBug) return $noPrivAvatar;
return $('
').avatar({user: user});
}
@@ -84,7 +91,7 @@ function renderStoryItem(item, $item, col)
'
' + item.pri + '',
item.estimate ? '
' + item.estimate + 'h' : '',
].join(''));
- if(item.assignedTo) $infos.append(renderUserAvatar(item.assignedTo, 'story', item.id));
+ $infos.append(renderUserAvatar(item.assignedTo, 'story', item.id));
var $actions = $item.find('.actions');
if(!$actions.length && item.menus.length)
@@ -133,7 +140,7 @@ function renderBugItem(item, $item, col)
'
' + item.pri + '',
].join(''));
if(item.deadline) $infos.append(renderDeadline(item.deadline));
- if(item.assignedTo) $infos.append(renderUserAvatar(item.assignedTo, 'bug', item.id));
+ $infos.append(renderUserAvatar(item.assignedTo, 'bug', item.id));
var $actions = $item.find('.actions');
if(!$actions.length && item.menus.length)
@@ -182,7 +189,7 @@ function renderTaskItem(item, $item, col)
item.estimate ? '
' + item.estimate + 'h' : '',
].join(''));
if(item.deadline) $infos.append(renderDeadline(item.deadline));
- if(item.assignedTo) $infos.append(renderUserAvatar(item.assignedTo, 'task', item.id));
+ $infos.append(renderUserAvatar(item.assignedTo, 'task', item.id));
var $actions = $item.find('.actions');
if(!$actions.length && item.menus.length)
@@ -756,6 +763,9 @@ $(function()
location.href = createLink('execution', 'importPlanStories', 'executionID=' + executionID + '&planID=' + planID + '&productID=0&fromMethod=kanban');
}
})
+
+ $('#type_chosen .chosen-single span').prepend('
');
+ $('#group_chosen .chosen-single span').prepend(kanbanLang.laneGroup + ': ');
});
$('#type').change(function()
diff --git a/module/execution/view/kanban.html.php b/module/execution/view/kanban.html.php
index 1d5c5f6945..3fd671033a 100644
--- a/module/execution/view/kanban.html.php
+++ b/module/execution/view/kanban.html.php
@@ -150,5 +150,6 @@ js::set('priv',
execution->sortColumn);?>
kanban);?>
task->deadlineAB);?>
+task->noAssigned);?>
diff --git a/module/story/control.php b/module/story/control.php
index d9cf6ad772..13545833b1 100644
--- a/module/story/control.php
+++ b/module/story/control.php
@@ -1793,6 +1793,7 @@ class story extends control
}
$stories = $this->story->getProductStoryPairs($productID, $branch ? "0,$branch" : $branch, $moduleID, $storyStatus, 'id_desc', $limit, $type, 'story', $hasParent);
+ if(empty($stories)) $stories = $this->story->getProductStoryPairs($productID, $branch ? "0,$branch" : $branch, 0, $storyStatus, 'id_desc', $limit, $type, 'story', $hasParent);
$storyID = isset($stories[$storyID]) ? $storyID : 0;
$select = html::select('story', empty($stories) ? array('' => '') : $stories, $storyID, "class='form-control'");