* adjust for doc and testcase view page in card.

This commit is contained in:
wangyidong
2018-12-18 13:03:50 +08:00
parent bcf24e9f50
commit e6bd9c4ae9
13 changed files with 70 additions and 404 deletions
+11 -1
View File
@@ -113,7 +113,17 @@
if($config->testcase->needReview or !empty($config->testcase->forceReview)) common::printIcon('testcase', 'review', "caseID=$case->id", $case, 'button', '', '', 'iframe');
?>
<?php
common::printIcon('testcase', 'edit',"caseID=$case->id", $case);
if($this->app->getViewType() == 'xhtml' and common::hasPriv('testcase', 'edit'))
{
$url = common::getSysURL() . $this->createLink('testcase', 'edit', "case=$case->id");
$url .= strpos($url, '?') === false ? '?' : '&';
$url .= 'width=1000px&height=800px';
echo html::a('xxc:openUrlInDialog/' . urlencode($url), "<i class='icon-edit'></i>", '_blank', "class='btn btn-link'");
}
else
{
common::printIcon('testcase', 'edit',"caseID=$case->id", $case);
}
if(!$isLibCase) common::printIcon('testcase', 'create', "productID=$case->product&branch=$case->branch&moduleID=$case->module&from=testcase&param=$case->id", $case, 'button', 'copy');
if($isLibCase and common::hasPriv('testsuite', 'createCase')) echo html::a($this->createLink('testsuite', 'createCase', "libID=$case->lib&moduleID=$case->module&param=$case->id", $case), "<i class='icon-copy'></i>", '', "class='btn' title='{$lang->testcase->copy}'");
common::printIcon('testcase', 'delete', "caseID=$case->id", $case, 'button', '', 'hiddenwin');