* Finish task #49297.
This commit is contained in:
@@ -2125,6 +2125,7 @@ class execution extends control
|
||||
/* Get execution's product. */
|
||||
$productID = 0;
|
||||
$products = $this->loadModel('product')->getProducts($executionID);
|
||||
foreach($products as $product) $productNames[$product->id] = $product->name;
|
||||
if($products) $productID = key($products);
|
||||
|
||||
$plans = $this->execution->getPlans($products);
|
||||
@@ -2147,6 +2148,7 @@ class execution extends control
|
||||
$this->view->orderBy = 'id_asc';
|
||||
$this->view->executionID = $executionID;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->productNames = $productNames;
|
||||
$this->view->allPlans = $allPlans;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->kanbanGroup = $kanbanGroup;
|
||||
|
||||
@@ -803,7 +803,7 @@ function createColumnCreateMenu(options)
|
||||
else if(col.laneType == 'bug')
|
||||
{
|
||||
if(priv.canCreateBug) items.push({label: bugLang.create, url: $.createLink('bug', 'create', 'productID=0&moduleID=0&extra=executionID=' + executionID, '', true), className: 'iframe', attrs: {'data-width': '80%'}});
|
||||
if(priv.canBatchCreateBug) items.push({label: bugLang.batchCreate, url: $.createLink('bug', 'batchcreate', 'productID=' + productID + '&moduleID=0&executionID=' + executionID, '', true), className: 'iframe', attrs: {'data-width': '90%'}});
|
||||
if(priv.canBatchCreateBug) items.push({label: bugLang.batchCreate, url: '#batchCreateBug', 'attrs' : {'data-toggle': 'modal'}});
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1074,6 +1074,16 @@ $(function()
|
||||
}
|
||||
});
|
||||
|
||||
$('#product').change(function()
|
||||
{
|
||||
var product = $('#product').val();
|
||||
if(product)
|
||||
{
|
||||
var link = createLink('bug', 'batchCreate', 'productID=' + product + '&branch=&executionID=' + executionID, '', true);
|
||||
$('#batchCreateBugButton').attr('href', link);
|
||||
}
|
||||
});
|
||||
|
||||
$('#type_chosen .chosen-single span').prepend('<i class="icon-kanban"></i>');
|
||||
$('#group_chosen .chosen-single span').prepend(kanbanLang.laneGroup + ': ');
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
$checkObject = new stdclass();
|
||||
$checkObject->execution = $executionID;
|
||||
$canCreateTask = common::hasPriv('task', 'create', $checkObject);
|
||||
$canBatchCreateTask = common::hasPriv('task', 'batchCreate', $checkObject);
|
||||
$canBatchCreateTask = common::hasPriv('task', 'batchCreate', $checkObject);
|
||||
$canCreateBug = common::hasPriv('bug', 'create');
|
||||
$canBatchCreateBug = common::hasPriv('bug', 'batchCreate');
|
||||
$canImportBug = common::hasPriv('execution', 'importBug');
|
||||
@@ -96,7 +96,7 @@
|
||||
<?php if($canLinkStoryByPlan) echo '<li>' . html::a('#linkStoryByPlan', $lang->execution->linkStoryByPlan, '', 'data-toggle="modal"') . '</li>';?>
|
||||
<?php if($hasStoryButton and $hasBugButton) echo '<li class="divider"></li>';?>
|
||||
<?php if($canCreateBug) echo '<li>' . html::a(helper::createLink('bug', 'create', "productID=$productID&branch=0&extra=executionID=$execution->id", '', true), $lang->bug->create, '', "class='iframe'") . '</li>';?>
|
||||
<?php if($canBatchCreateBug) echo '<li>' . html::a(helper::createLink('bug', 'batchCreate', "productID=$productID&branch=0&executionID=$execution->id", '', true), $lang->bug->batchCreate, '', "class='iframe'") . '</li>';?>
|
||||
<?php if($canBatchCreateBug) echo '<li>' . html::a('#batchCreateBug', $lang->bug->batchCreate, '', "data-toggle='modal'") . '</li>';?>
|
||||
<?php if(($hasStoryButton or $hasBugButton) and $hasTaskButton) echo '<li class="divider"></li>';?>
|
||||
<?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>';?>
|
||||
@@ -132,6 +132,23 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="batchCreateBug">
|
||||
<div class="modal-dialog mw-500px">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="icon icon-close"></i></button>
|
||||
<h4 class="modal-title"><?php echo $lang->bug->product;?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class='input-group'>
|
||||
<?php echo html::select('productName', $productNames, '', "class='form-control chosen' id='product'");?>
|
||||
<span class='input-group-btn'><?php echo html::a(helper::createLink('bug', 'batchCreate', 'productID=3&branch=&executionID=', '', true), $lang->bug->batchCreate, '', "id='batchCreateBugButton' class='btn btn-primary iframe'");?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php js::set('executionID', $executionID);?>
|
||||
<?php js::set('productID', $productID);?>
|
||||
<?php js::set('kanbanGroup', $kanbanGroup);?>
|
||||
|
||||
Reference in New Issue
Block a user