*Finish task #8194.
This commit is contained in:
+13
-10
@@ -2509,14 +2509,14 @@ class bugModel extends model
|
||||
/* Check the product is closed. */
|
||||
$changeAllowed = common::checkObjectChangeAllowed('bug', $bug);
|
||||
|
||||
$canBatchEdit = common::hasPriv('bug', 'batchEdit');
|
||||
$canBatchConfirm = common::hasPriv('bug', 'batchConfirm');
|
||||
$canBatchEdit = ($changeAllowed and common::hasPriv('bug', 'batchEdit'));
|
||||
$canBatchConfirm = ($changeAllowed and common::hasPriv('bug', 'batchConfirm'));
|
||||
$canBatchClose = common::hasPriv('bug', 'batchClose');
|
||||
$canBatchActivate = common::hasPriv('bug', 'batchActivate');
|
||||
$canBatchChangeBranch = common::hasPriv('bug', 'batchChangeBranch');
|
||||
$canBatchChangeModule = common::hasPriv('bug', 'batchChangeModule');
|
||||
$canBatchResolve = common::hasPriv('bug', 'batchResolve');
|
||||
$canBatchAssignTo = common::hasPriv('bug', 'batchAssignTo');
|
||||
$canBatchActivate = ($changeAllowed and common::hasPriv('bug', 'batchActivate'));
|
||||
$canBatchChangeBranch = ($changeAllowed and common::hasPriv('bug', 'batchChangeBranch'));
|
||||
$canBatchChangeModule = ($changeAllowed and common::hasPriv('bug', 'batchChangeModule'));
|
||||
$canBatchResolve = ($changeAllowed and common::hasPriv('bug', 'batchResolve'));
|
||||
$canBatchAssignTo = ($changeAllowed and common::hasPriv('bug', 'batchAssignTo'));
|
||||
|
||||
$canBatchAction = ($canBatchEdit or $canBatchConfirm or $canBatchClose or $canBatchActivate or $canBatchChangeBranch or $canBatchChangeModule or $canBatchResolve or $canBatchAssignTo);
|
||||
|
||||
@@ -2578,8 +2578,7 @@ class bugModel extends model
|
||||
case 'id':
|
||||
if($canBatchAction)
|
||||
{
|
||||
$disabled = $changeAllowed ? '' : 'disabled';
|
||||
echo html::checkbox('bugIDList', array($bug->id => ''), '', $disabled) . html::a(helper::createLink('bug', 'view', "bugID=$bug->id"), sprintf('%03d', $bug->id));
|
||||
echo html::checkbox('bugIDList', array($bug->id => ''), '') . html::a(helper::createLink('bug', 'view', "bugID=$bug->id"), sprintf('%03d', $bug->id));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2730,15 +2729,19 @@ class bugModel extends model
|
||||
echo substr($bug->lastEditedDate, 5, 11);
|
||||
break;
|
||||
case 'actions':
|
||||
$params = "bugID=$bug->id";
|
||||
if($changeAllowed)
|
||||
{
|
||||
$params = "bugID=$bug->id";
|
||||
common::printIcon('bug', 'confirmBug', $params, $bug, 'list', 'confirm', '', 'iframe', true);
|
||||
common::printIcon('bug', 'resolve', $params, $bug, 'list', 'checked', '', 'iframe', true);
|
||||
common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true);
|
||||
common::printIcon('bug', 'edit', $params, $bug, 'list');
|
||||
common::printIcon('bug', 'create', "product=$bug->product&branch=$bug->branch&extra=$params", $bug, 'list', 'copy');
|
||||
}
|
||||
else
|
||||
{
|
||||
common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
echo '</td>';
|
||||
|
||||
Reference in New Issue
Block a user