This commit is contained in:
zhouxudong
2022-03-29 16:59:33 +08:00
parent 78b5d154af
commit ecf749b7da
3 changed files with 35 additions and 11 deletions
+11 -1
View File
@@ -2131,6 +2131,7 @@ class execution extends control
*/
public function taskKanban($executionID, $browseType = '', $orderBy = 'order_asc', $groupBy = '')
{
$execution = $this->loadModel('execution')->getById($executionID);
if(empty($browseType)) $browseType = $this->session->kanbanType ? $this->session->kanbanType : 'all';
if(empty($groupBy)) $groupBy = 'default';
@@ -2148,7 +2149,16 @@ class execution extends control
/* Compatibility IE8. */
if(strpos($this->server->http_user_agent, 'MSIE 8.0') !== false) header("X-UA-Compatible: IE=EmulateIE7");
$kanbanGroup = $this->loadModel('kanban')->getExecutionKanban($executionID, $browseType, $groupBy);
if($execution->lifetime == 'ops')
{
unset($this->lang->kanban->type['story']);
unset($this->lang->kanban->type['bug']);
$kanbanGroup = $this->loadModel('kanban')->getExecutionKanban($executionID, 'task', $groupBy);
}
else
{
$kanbanGroup = $this->loadModel('kanban')->getExecutionKanban($executionID, $browseType, $groupBy);
}
if(empty($kanbanGroup))
{
$this->kanban->createExecutionLane($executionID, $browseType, $groupBy);
+7 -5
View File
@@ -132,11 +132,13 @@ body {margin-bottom: 25px;}
$misc = common::hasPriv('execution', 'importTask') ? "class='import'" : "class=disabled";
$link = common::hasPriv('execution', 'importTask') ? $this->createLink('execution', 'importTask', "execution=$execution->id") : '#';
echo "<li $class>" . html::a($link, $lang->execution->importTask, '', $misc) . "</li>";
$class = common::hasPriv('execution', 'importBug') ? '' : "class=disabled";
$misc = common::hasPriv('execution', 'importBug') ? "class='import'" : "class=disabled";
$link = common::hasPriv('execution', 'importBug') ? $this->createLink('execution', 'importBug', "execution=$execution->id") : '#';
echo "<li $class>" . html::a($link, $lang->execution->importBug, '', $misc) . "</li>";
if($execution->lifetime != 'ops')
{
$class = common::hasPriv('execution', 'importBug') ? '' : "class=disabled";
$misc = common::hasPriv('execution', 'importBug') ? "class='import'" : "class=disabled";
$link = common::hasPriv('execution', 'importBug') ? $this->createLink('execution', 'importBug', "execution=$execution->id") : '#';
echo "<li $class>" . html::a($link, $lang->execution->importBug, '', $misc) . "</li>";
}
?>
</ul>
</div>
+17 -5
View File
@@ -13,7 +13,14 @@
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<div class="input-control space c-type">
<?php echo html::select('type', $lang->kanban->type, $browseType, 'class="form-control chosen" data-max_drop_width="215"');?>
<?php
if($execution->lifetime == 'ops')
{
unset($lang->kanban->type['story']);
unset($lang->kanban->type['bug']);
}
echo html::select('type', $lang->kanban->type, $browseType, 'class="form-control chosen" data-max_drop_width="215"');
?>
</div>
<?php if($browseType != 'all'):?>
<div class="input-control space c-group">
@@ -49,9 +56,12 @@
$link = common::hasPriv('execution', 'importTask') ? $this->createLink('execution', 'importTask', "execution=$execution->id") : '#';
echo "<li $misc>" . html::a($link, $lang->execution->importTask, '', $misc) . "</li>";
$misc = common::hasPriv('execution', 'importBug') ? '' : "class=disabled";
$link = common::hasPriv('execution', 'importBug') ? $this->createLink('execution', 'importBug', "execution=$execution->id") : '#';
echo "<li $misc>" . html::a($link, $lang->execution->importBug, '', $misc) . "</li>";
if($execution->lifetime != 'ops')
{
$misc = common::hasPriv('execution', 'importBug') ? '' : "class=disabled";
$link = common::hasPriv('execution', 'importBug') ? $this->createLink('execution', 'importBug', "execution=$execution->id") : '#';
echo "<li $misc>" . html::a($link, $lang->execution->importBug, '', $misc) . "</li>";
}
?>
</ul>
</div>
@@ -90,6 +100,7 @@
<div class='dropdown' id='createDropdown'>
<button class='btn btn-primary' type='button' data-toggle='dropdown'><i class='icon icon-plus'></i> <?php echo $this->lang->create;?> <span class='caret'></span></button>
<ul class='dropdown-menu pull-right'>
<?php if($execution->lifetime != 'ops'):?>
<?php if($canCreateStory) echo '<li>' . html::a(helper::createLink('story', 'create', "productID=$productID&branch=0&moduleID=0&story=0&execution=$execution->id", '', true), $lang->execution->createStory, '', "class='iframe'") . '</li>';?>
<?php if($canBatchCreateStory) echo '<li>' . html::a(helper::createLink('story', 'batchCreate', "productID=$productID&branch=0&moduleID=0&story=0&execution=$execution->id", '', true), $lang->execution->batchCreateStory, '', "class='iframe' data-width='90%'") . '</li>';?>
<?php if($canLinkStory) echo '<li>' . html::a(helper::createLink('execution', 'linkStory', "execution=$execution->id", '', true), $lang->execution->linkStory, '', "class='iframe' data-width='90%'") . '</li>';?>
@@ -103,9 +114,10 @@
echo $batchCreateBugLink;
}?>
<?php if(($hasStoryButton or $hasBugButton) and $hasTaskButton) echo '<li class="divider"></li>';?>
<?php if($canImportBug) echo '<li>' . html::a(helper::createLink('execution', 'importBug', "execution=$execution->id", '', true), $lang->execution->importBug, '', "class='iframe'") . '</li>';?>
<?php endif;?>
<?php if($canCreateTask) echo '<li>' . html::a(helper::createLink('task', 'create', "execution=$execution->id", '', true), $lang->task->create, '', "class='iframe'") . '</li>';?>
<?php if($canBatchCreateTask) echo '<li>' . html::a(helper::createLink('task', 'batchCreate', "execution=$execution->id", '', true), $lang->execution->batchCreateTask, '', "class='iframe'") . '</li>';?>
<?php if($canImportBug) echo '<li>' . html::a(helper::createLink('execution', 'importBug', "execution=$execution->id", '', true), $lang->execution->importBug, '', "class='iframe'") . '</li>';?>
</ul>
</div>
<?php endif;?>