* [task#152648] Hidden the button of story in task kanban.
This commit is contained in:
@@ -61,7 +61,7 @@ $canCreateStory = ($canModifyExecution && $productID && common::hasPriv('st
|
||||
$canBatchCreateStory = ($canModifyExecution && $productID && common::hasPriv('story', 'batchCreate'));
|
||||
$canLinkStory = ($canModifyExecution && $productID && common::hasPriv('execution', 'linkStory') && !empty($execution->hasProduct));
|
||||
$canLinkStoryByPlan = ($canModifyExecution && $productID && common::hasPriv('execution', 'importplanstories') && !$hiddenPlan && !empty($execution->hasProduct));
|
||||
$hasStoryButton = ($canCreateStory or $canBatchCreateStory or $canLinkStory or $canLinkStoryByPlan);
|
||||
$hasStoryButton = !$hasFrozenStories && ($canCreateStory or $canBatchCreateStory or $canLinkStory or $canLinkStoryByPlan);
|
||||
$hasTaskButton = ($canCreateTask or $canBatchCreateTask or $canImportBug);
|
||||
$hasBugButton = ($canCreateBug or $canBatchCreateBug);
|
||||
|
||||
@@ -254,7 +254,7 @@ row
|
||||
btn(setClass('primary'),set::icon('plus'), $lang->create),
|
||||
set::items(array
|
||||
(
|
||||
$features['story'] && common::hasPriv('story', 'create') ? ($hasStoryButton && $canCreateStory && !empty($productID) ? array('text' => $lang->execution->createStory, 'url' => createLink('story', 'create', "productID=$productID&branch=0&moduleID=0&story=0&execution=$execution->id"), 'data-toggle' => 'modal', 'data-size' => 'lg') : array('text' => $lang->story->create, 'data-on' => 'click', 'data-do' => "zui.Modal.alert('" . $lang->execution->needLinkProducts . "')")) : null,
|
||||
!$hasFrozenStories && $features['story'] && common::hasPriv('story', 'create') ? ($hasStoryButton && $canCreateStory && !empty($productID) ? array('text' => $lang->execution->createStory, 'url' => createLink('story', 'create', "productID=$productID&branch=0&moduleID=0&story=0&execution=$execution->id"), 'data-toggle' => 'modal', 'data-size' => 'lg') : array('text' => $lang->story->create, 'data-on' => 'click', 'data-do' => "zui.Modal.alert('" . $lang->execution->needLinkProducts . "')")) : null,
|
||||
($features['story'] && $hasStoryButton && $canBatchCreateStory) ? array('text' => $lang->execution->batchCreateStory, 'url' => createLink('story', 'batchCreate', "productID=$productID&branch=0&moduleID=0&story=0&execution=$execution->id"), 'data-toggle' => 'modal', 'data-size' => 'lg') : null,
|
||||
($features['story'] && $hasStoryButton && $canLinkStory) ? array('text' => $lang->execution->linkStory, 'url' => createLink('execution', 'linkStory', "execution=$execution->id"), 'data-toggle' => 'modal', 'data-size' => 'lg') : null,
|
||||
($features['story'] && $hasStoryButton && $canLinkStoryByPlan) ? array('text' => $lang->execution->linkStoryByPlan, 'url' => '#linkStoryByPlan', 'data-toggle' => 'modal', 'data-size' => 'sm') : null,
|
||||
|
||||
@@ -369,6 +369,12 @@ class executionZen extends execution
|
||||
|
||||
$project = $this->project->getByID($execution->project);
|
||||
|
||||
$this->view->hasFrozenStories = $this->dao->select('t1.id')->from(TABLE_STORY)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECTSTORY)->alias('t2')->on('t1.id = t2.story')
|
||||
->where('t1.frozen')->ne('')
|
||||
->andWhere('t2.project')->eq($execution->id)
|
||||
->count();
|
||||
|
||||
$this->view->title = $this->lang->execution->kanban;
|
||||
$this->view->userList = $userList;
|
||||
$this->view->realnames = $users;
|
||||
|
||||
Reference in New Issue
Block a user