* Fix bug #2988.
This commit is contained in:
@@ -248,18 +248,20 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
|
||||
<button type='button' class='btn dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>
|
||||
<ul class='dropdown-menu'>
|
||||
<?php
|
||||
$class = "class='disabled'";
|
||||
$class = common::hasPriv('bug', 'batchConfirm') ? '' : "class='disabled'";
|
||||
$actionLink = $this->createLink('bug', 'batchConfirm');
|
||||
$misc = common::hasPriv('bug', 'batchConfirm') ? "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"" : $class;
|
||||
if($misc) echo "<li>" . html::a('javascript:;', $lang->bug->confirmBug, '', $misc) . "</li>";
|
||||
$misc = common::hasPriv('bug', 'batchConfirm') ? "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"" : '';
|
||||
echo "<li $class>" . html::a('javascript:;', $lang->bug->confirmBug, '', $misc) . "</li>";
|
||||
|
||||
$class = common::hasPriv('bug', 'batchClose') ? '' : "class='disabled'";
|
||||
$actionLink = $this->createLink('bug', 'batchClose');
|
||||
$misc = common::hasPriv('bug', 'batchClose') ? "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"" : $class;
|
||||
if($misc) echo "<li>" . html::a('javascript:;', $lang->bug->close, '', $misc) . "</li>";
|
||||
$misc = common::hasPriv('bug', 'batchClose') ? "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"" : '';
|
||||
echo "<li $class>" . html::a('javascript:;', $lang->bug->close, '', $misc) . "</li>";
|
||||
|
||||
$class = common::hasPriv('bug', 'batchActivate') ? '' : "class='disabled'";
|
||||
$actionLink = $this->createLink('bug', 'batchActivate', "productID=$productID&branch=$branch");
|
||||
$misc = common::hasPriv('bug', 'batchActivate') ? "onclick=\"setFormAction('$actionLink')\"" : $class;
|
||||
if($misc) echo "<li>" . html::a('javascript:;', $lang->bug->activate, '', $misc) . "</li>";
|
||||
$misc = common::hasPriv('bug', 'batchActivate') ? "onclick=\"setFormAction('$actionLink')\"" : '';
|
||||
echo "<li $class>" . html::a('javascript:;', $lang->bug->activate, '', $misc) . "</li>";
|
||||
|
||||
$misc = common::hasPriv('bug', 'batchResolve') ? "id='resolveItem'" : '';
|
||||
if($misc)
|
||||
|
||||
@@ -236,11 +236,11 @@ js::set('foldAll', $lang->project->treeLevel['root']);
|
||||
<button type='button' class='btn dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>
|
||||
<ul class='dropdown-menu'>
|
||||
<?php
|
||||
$class = "class='disabled'";
|
||||
$canBatchClose = common::hasPriv('story', 'batchClose') && strtolower($browseType) != 'closedbyme' && strtolower($browseType) != 'closedstory';
|
||||
$class = $canBatchClose ? '' : "class='disabled'";
|
||||
$actionLink = $this->createLink('story', 'batchClose', "productID=$productID&projectID=0");
|
||||
$misc = $canBatchClose ? "onclick=\"setFormAction('$actionLink')\"" : $class;
|
||||
echo "<li>" . html::a('#', $lang->close, '', $misc) . "</li>";
|
||||
$misc = $canBatchClose ? "onclick=\"setFormAction('$actionLink')\"" : '';
|
||||
echo "<li $class>" . html::a('#', $lang->close, '', $misc) . "</li>";
|
||||
|
||||
if(common::hasPriv('story', 'batchReview'))
|
||||
{
|
||||
@@ -279,7 +279,8 @@ js::set('foldAll', $lang->project->treeLevel['root']);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<li>' . html::a('javascript:;', $lang->story->review, '', $class) . '</li>';
|
||||
$class= "class='disabled'";
|
||||
echo "<li $class>" . html::a('javascript:;', $lang->story->review, '', $class) . '</li>';
|
||||
}
|
||||
|
||||
if(common::hasPriv('story', 'batchChangeBranch') and $this->session->currentProductType != 'normal')
|
||||
@@ -315,7 +316,8 @@ js::set('foldAll', $lang->project->treeLevel['root']);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<li>' . html::a('javascript:;', $lang->story->stageAB, '', $class) . '</li>';
|
||||
$class= "class='disabled'";
|
||||
echo "<li $class>" . html::a('javascript:;', $lang->story->stageAB, '', $class) . '</li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
|
||||
@@ -266,13 +266,15 @@ js::set('foldAll', $lang->project->treeLevel['root']);
|
||||
echo "<button type='button' class='btn dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>";
|
||||
echo "<ul class='dropdown-menu'>";
|
||||
|
||||
$class = $canBatchClose ? '' : "class=disabled";
|
||||
$actionLink = $this->createLink('task', 'batchClose');
|
||||
$misc = $canBatchClose ? "onclick=\"setFormAction('$actionLink', 'hiddenwin', '#taskList')\"" : "class='disabled'";
|
||||
echo "<li>" . html::a('#', $lang->close, '', $misc) . "</li>";
|
||||
$misc = $canBatchClose ? "onclick=\"setFormAction('$actionLink', 'hiddenwin', '#taskList')\"" : '';
|
||||
echo "<li $class>" . html::a('#', $lang->close, '', $misc) . "</li>";
|
||||
|
||||
$class = $canBatchCancel ? '' : "class=disabled";
|
||||
$actionLink = $this->createLink('task', 'batchCancel');
|
||||
$misc = $canBatchCancel ? "onclick=\"setFormAction('$actionLink', 'hiddenwin', '#taskList')\"" : "class='disabled'";
|
||||
echo "<li>" . html::a('#', $lang->task->cancel, '', $misc) . "</li>";
|
||||
$misc = $canBatchCancel ? "onclick=\"setFormAction('$actionLink', 'hiddenwin', '#taskList')\"" : '';
|
||||
echo "<li $class>" . html::a('#', $lang->task->cancel, '', $misc) . "</li>";
|
||||
echo "</ul>";
|
||||
?>
|
||||
</div>
|
||||
|
||||
@@ -103,10 +103,8 @@ js::set('suiteID', $suiteID);
|
||||
<div class='table-actions btn-toolbar'>
|
||||
<div class='btn-group dropup'>
|
||||
<?php
|
||||
$class = "class='disabled'";
|
||||
|
||||
$actionLink = $this->createLink('testtask', 'batchRun', "productID=$productID&orderBy=$orderBy");
|
||||
$misc = common::hasPriv('testtask', 'batchRun') ? "onclick=\"setFormAction('$actionLink')\"" : $class;
|
||||
$misc = common::hasPriv('testtask', 'batchRun') ? "onclick=\"setFormAction('$actionLink')\"" : "disabled='disabled'";
|
||||
echo html::commonButton($lang->testtask->runCase, $misc);
|
||||
|
||||
$actionLink = $this->createLink('testcase', 'batchEdit', "productID=$productID&branch=$branch");
|
||||
@@ -130,9 +128,12 @@ js::set('suiteID', $suiteID);
|
||||
echo '</ul></li>';
|
||||
}
|
||||
|
||||
$actionLink = $this->createLink('testcase', 'batchDelete', "productID=$productID");
|
||||
$misc = common::hasPriv('testcase', 'batchDelete') ? "onclick=\"confirmBatchDelete('$actionLink')\"" : $class;
|
||||
if(common::hasPriv('testcase', 'batchDelete')) echo "<li>" . html::a('#', $lang->delete, '', $misc) . "</li>";
|
||||
if(common::hasPriv('testcase', 'batchDelete'))
|
||||
{
|
||||
$actionLink = $this->createLink('testcase', 'batchDelete', "productID=$productID");
|
||||
$misc = "onclick=\"confirmBatchDelete('$actionLink')\"";
|
||||
echo "<li>" . html::a('#', $lang->delete, '', $misc) . "</li>";
|
||||
}
|
||||
|
||||
if(common::hasPriv('testcase', 'batchCaseTypeChange'))
|
||||
{
|
||||
@@ -151,7 +152,7 @@ js::set('suiteID', $suiteID);
|
||||
if(common::hasPriv('testcase', 'batchConfirmStoryChange'))
|
||||
{
|
||||
$actionLink = $this->createLink('testcase', 'batchConfirmStoryChange', "productID=$productID");
|
||||
$misc = common::hasPriv('testcase', 'batchConfirmStoryChange') ? "onclick=\"setFormAction('$actionLink')\"" : $class;
|
||||
$misc = "onclick=\"setFormAction('$actionLink')\"";
|
||||
echo "<li>" . html::a('#', $lang->testcase->confirmStoryChange, '', $misc) . "</li>";
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user