* Fix bug details.

This commit is contained in:
Yagami
2020-12-24 09:26:49 +08:00
parent c0ac3ac5d1
commit 38fd427535
2 changed files with 3 additions and 10 deletions
+2 -3
View File
@@ -33,7 +33,7 @@ class bug extends control
$this->loadModel('task');
$this->view->products = $this->products = $this->product->getProductPairsByProject($this->session->PRJ);
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=bug")));
if($this->session->PRJ and empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=bug")));
}
/**
@@ -980,8 +980,7 @@ class bug extends control
}
$this->loadModel('score')->create('ajax', 'batchOther');
}
if($type == 'product') die(js::locate($this->session->bugList, 'parent'));
if($type == 'my') die(js::locate($this->createLink('my', 'bug')));
if($type == 'product' || $type == 'my') die(js::locate($this->session->bugList, 'parent'));
die(js::locate($this->createLink('project', 'bug', "projectID=$projectID")));
}
+1 -7
View File
@@ -34,11 +34,10 @@
<?php else:?>
<form id='myBugForm' class="main-table table-bug" data-ride="table" method="post" action='<?php echo $this->createLink('bug', 'batchEdit', "productID=0");?>'>
<?php
$canBatchEdit = common::hasPriv('bug', 'batchEdit');
$canBatchConfirm = common::hasPriv('bug', 'batchConfirm');
$canBatchClose = (common::hasPriv('bug', 'batchClose') and strtolower($type) != 'closedby');
$canBatchAssignTo = common::hasPriv('bug', 'batchAssignTo');
$canBatchAction = ($canBatchEdit or $canBatchConfirm or $canBatchClose or $canBatchAssignTo);
$canBatchAction = ($canBatchConfirm or $canBatchClose or $canBatchAssignTo);
?>
<table class="table has-sort-head table-fixed" id='bugList'>
<?php $vars = "mode=$mode&type=$type&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
@@ -129,11 +128,6 @@
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<?php endif;?>
<div class="table-actions btn-toolbar">
<?php
$actionLink = $this->createLink('bug', 'batchEdit');
$misc = $canBatchEdit ? "onclick=\"setFormAction('$actionLink')\"" : "disabled='disabled'";
echo html::commonButton($lang->edit, $misc);
?>
<?php
if($canBatchConfirm)
{