This commit is contained in:
tianshujie98
2020-08-13 09:38:57 +08:00
parent ada770c792
commit 595e3e35c4
18 changed files with 194 additions and 81 deletions
+17 -1
View File
@@ -1392,6 +1392,15 @@ class testcaseModel extends model
*/
public function printCell($col, $case, $users, $branches, $modulePairs = array(), $browseType = '', $mode = 'datatable')
{
$canBatchRun = common::hasPriv('testtask', 'batchRun');
$canBatchEdit = common::hasPriv('testcase', 'batchEdit');
$canBatchDelete = common::hasPriv('testcase', 'batchDelete');
$canBatchCaseTypeChange = common::hasPriv('testcase', 'batchCaseTypeChange');
$canBatchConfirmStoryChange = common::hasPriv('testcase', 'batchConfirmStoryChange');
$canBatchChangeModule = common::hasPriv('testcase', 'batchChangeModule');
$canBatchAction = ($canBatchRun or $canBatchEdit or $canBatchDelete or $canBatchCaseTypeChange or $canBatchConfirmStoryChange or $canBatchChangeModule);
$canView = common::hasPriv('testcase', 'view');
$caseLink = helper::createLink('testcase', 'view', "caseID=$case->id&version=$case->version");
$account = $this->app->user->account;
@@ -1420,7 +1429,14 @@ class testcaseModel extends model
switch($id)
{
case 'id':
echo html::checkbox('caseIDList', array($case->id => '')) . html::a(helper::createLink('testcase', 'view', "caseID=$case->id"), sprintf('%03d', $case->id));
if($canBatchAction)
{
echo html::checkbox('caseIDList', array($case->id => '')) . html::a(helper::createLink('testcase', 'view', "caseID=$case->id"), sprintf('%03d', $case->id));
}
else
{
printf('%03d', $case->id);
}
break;
case 'pri':
echo "<span class='label-pri label-pri-" . $case->pri . "' title='" . zget($this->lang->testcase->priList, $case->pri, $case->pri) . "'>";