Merge branch 'sprint/174_hufangzhou_17116' into 'master'

* Fix bug #17116, bug #17117.

See merge request easycorp/zentaopms!789
This commit is contained in:
孙广明
2021-12-06 05:07:38 +00:00
3 changed files with 8 additions and 2 deletions
+6
View File
@@ -1365,6 +1365,12 @@ class testcase extends control
*/
public function export($productID, $orderBy, $taskID = 0, $browseType = '')
{
if(strpos($orderBy, 'case') !== false)
{
list($field, $sort) = explode('_', $orderBy);
$orderBy = '`' . $field . '`_' . $sort;
}
$product = $this->loadModel('product')->getById($productID);
if($product->type != 'normal') $this->lang->testcase->branch = $this->lang->product->branchName[$product->type];
if($_POST)
+1 -1
View File
@@ -131,7 +131,7 @@
<?php
if(!isonlybody()) common::printIcon('testcase', 'edit',"caseID=$case->id", $case, 'button', '', '', 'showinonlybody');
if(!$isLibCase and $case->auto != 'unit') 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('caselib', 'createCase')) echo html::a($this->createLink('caselib', 'createCase', "libID=$case->lib&moduleID=$case->module&param=$case->id", $case), "<i class='icon-copy'></i>", '', "class='btn' title='{$lang->testcase->copy}'");
if($isLibCase and common::hasPriv('caselib', 'createCase')) echo html::a($this->createLink('caselib', 'createCase', "libID=$case->lib&moduleID=$case->module&param=$case->id"), "<i class='icon-copy'></i>", '', "class='btn' title='{$lang->testcase->copy}'");
common::printIcon('testcase', 'delete', "caseID=$case->id", $case, 'button', 'trash', 'hiddenwin', '');
?>
<?php endif;?>
+1 -1
View File
@@ -37,7 +37,7 @@
<div class='btn-toolbar pull-right'>
<?php
common::printIcon('testtask', 'linkCase', "taskID=$task->id", $task, 'button', 'link');
common::printIcon('testcase', 'export', "productID=$productID&orderBy=`case`_desc&taskID=$task->id", '', 'button', '', '', 'export');
common::printIcon('testcase', 'export', "productID=$productID&orderBy=case_desc&taskID=$task->id", '', 'button', '', '', 'export');
common::printIcon('testtask', 'report', "productID=$productID&taskID=$task->id&browseType=$browseType&branchID=$task->branch&moduleID=" . (empty($moduleID) ? '' : $moduleID));
common::printIcon('testtask', 'view', "taskID=$task->id", '', 'button', 'list-alt');
common::printBack($this->session->testtaskList, 'btn btn-link');