Merge branch '15.0.beta3' of http://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3

This commit is contained in:
zhujinyong
2021-04-13 11:30:54 +08:00
13 changed files with 149 additions and 141 deletions
+2
View File
@@ -22,6 +22,8 @@ js::set('branch', $branch);
$currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($browseType, array_keys($lang->bug->mySelects)) ? $browseType : '';
?>
<style>
#mainMenu .btn-toolbar .btn-group .dropdown-menu .btn-active-text:hover .text {color: #fff;}
#mainMenu .btn-toolbar .btn-group .dropdown-menu .btn-active-text:hover .text:after {border-bottom: unset;}
.btn-group a i.icon-plus {font-size: 16px;}
.btn-group a.btn-primary {border-right: 1px solid rgba(255,255,255,0.3);}
.btn-group button.dropdown-toggle.btn-primary {padding:6px;}
@@ -22,16 +22,15 @@ foreach($executions as $execution)
{
$selected = $execution->id == $executionID ? 'selected' : '';
$executionName = $config->systemMode == 'new' ? zget($projects, $execution->project) . '/' . $execution->name : $execution->name;
$icon = $config->systemMode == 'new' ? "<i class='icon icon-{$lang->icons[$execution->type]}'></i> " : '';
if($execution->status != 'done' and $execution->status != 'closed' and ($execution->PM == $this->app->user->account or isset($execution->teams[$this->app->user->account])))
{
$myProjectsHtml .= html::a(sprintf($link, $execution->id), $icon . $executionName, '', "class='text-important $selected' title='{$executionName}' data-key='" . zget($executionsPinYin, $execution->name, '') . "' data-app='{$this->app->openApp}'");
$myProjectsHtml .= html::a(sprintf($link, $execution->id), $executionName, '', "class='text-important $selected' title='{$executionName}' data-key='" . zget($executionsPinYin, $execution->name, '') . "' data-app='{$this->app->openApp}'");
}
else if($execution->status != 'done' and $execution->status != 'closed' and $execution->PM != $this->app->user->account and !isset($execution->teams[$this->app->user->account]))
{
$normalProjectsHtml .= html::a(sprintf($link, $execution->id), $icon . $executionName, '', "class='$selected' title='{$executionName}' data-key='" . zget($executionsPinYin, $execution->name, '') . "' data-app='{$this->app->openApp}'");
$normalProjectsHtml .= html::a(sprintf($link, $execution->id), $executionName, '', "class='$selected' title='{$executionName}' data-key='" . zget($executionsPinYin, $execution->name, '') . "' data-app='{$this->app->openApp}'");
}
else if($execution->status == 'done' or $execution->status == 'closed') $closedProjectsHtml .= html::a(sprintf($link, $execution->id), $icon . $executionName, '', "class='$selected' title='{$executionName}' data-key='" . zget($executionsPinYin, $execution->name, '') . "' data-app='{$this->app->openApp}'");
else if($execution->status == 'done' or $execution->status == 'closed') $closedProjectsHtml .= html::a(sprintf($link, $execution->id), $executionName, '', "class='$selected' title='{$executionName}' data-key='" . zget($executionsPinYin, $execution->name, '') . "' data-app='{$this->app->openApp}'");
}
?>
<div class="table-row">
+8 -8
View File
@@ -1016,28 +1016,28 @@ $lang->resource->doc->create = 'create';
$lang->resource->doc->view = 'view';
$lang->resource->doc->edit = 'edit';
$lang->resource->doc->delete = 'delete';
$lang->resource->doc->deleteFile = 'deleteFile';
//$lang->resource->doc->deleteFile = 'deleteFile';
$lang->resource->doc->allLibs = 'allLibs';
//$lang->resource->doc->showFiles = 'showFiles';
$lang->resource->doc->objectLibs = 'objectLibs';
$lang->resource->doc->showFiles = 'showFiles';
$lang->resource->doc->sort = 'sort';
//$lang->resource->doc->sort = 'sort';
$lang->resource->doc->collect = 'collectAction';
//$lang->resource->doc->diff = 'diff';
$lang->doc->methodOrder[0] = 'index';
$lang->doc->methodOrder[5] = 'browse';
$lang->doc->methodOrder[10] = 'createlib';
$lang->doc->methodOrder[10] = 'createLib';
$lang->doc->methodOrder[15] = 'editLib';
$lang->doc->methodOrder[20] = 'deletelib';
$lang->doc->methodOrder[20] = 'deleteLib';
$lang->doc->methodOrder[25] = 'create';
$lang->doc->methodOrder[30] = 'view';
$lang->doc->methodOrder[35] = 'edit';
$lang->doc->methodOrder[40] = 'delete';
$lang->doc->methodOrder[45] = 'deleteFile';
//$lang->doc->methodOrder[45] = 'deleteFile';
$lang->doc->methodOrder[50] = 'allLibs';
$lang->doc->methodOrder[55] = 'showFiles';
//$lang->doc->methodOrder[55] = 'showFiles';
$lang->doc->methodOrder[60] = 'objectLibs';
$lang->doc->methodOrder[65] = 'sort';
//$lang->doc->methodOrder[65] = 'sort';
$lang->doc->methodOrder[70] = 'collect';
//$lang->doc->methodOrder[55] = 'diff';
+1 -1
View File
@@ -93,7 +93,7 @@ body.menu-hide {padding-left: 0;}
#searchbox .dropdown-menu > li {display: none;}
#searchbox .dropdown-menu > li.search-type-all {width: 100%; display: block;}
#searchbox .dropdown-menu > li:hover {position: relative;}
#searchbox .dropdown-menu.show-quick-go.with-active {position: absolute; top: -365px; max-height: 362px; padding-top: 30px;}
#searchbox .dropdown-menu.show-quick-go.with-active {position: absolute; top: initial; bottom: 4px; min-height: 362px; padding-top: 30px;}
#searchbox .dropdown-menu.show-quick-go > li {display: block;}
#searchbox .dropdown-menu.show-quick-go > li.active {width: 100%; position: absolute; top: 0; left: 0; right: 0;}
#searchbox .dropdown-menu>li.active>a, #searchbox .dropdown-menu>li.selected>a {position: relative; color: #fff; background-color: #16a8f8;}
-7
View File
@@ -23,13 +23,6 @@ js::set('defaultOpen', $open);
#versionTitle {margin: 8px 3px 0px 0px; background-image: url(<?php echo $config->webRoot . 'theme/default/images/main/version-upgrade.svg';?>);}
.icon-version {width: 20px; height: 24px; margin: -4px 3px 0px 0px; background-image: url(<?php echo $config->webRoot . 'theme/default/images/main/version-new.svg';?>);}
.version-hr {margin-top: 15px; margin-bottom: 15px;}
<?php if((isset($config->bizVersion) or isset($config->maxVersion)) and $config->systemMode == 'new'):?>
#searchbox .dropdown-menu.show-quick-go.with-active {top: -468px; max-height: 465px;}
<?php elseif((isset($config->bizVersion) or isset($config->maxVersion)) and $config->systemMode != 'new'):?>
#searchbox .dropdown-menu.show-quick-go.with-active {top: -436px; max-height: 440px;}
<?php elseif($config->systemMode != 'new'):?>
#searchbox .dropdown-menu.show-quick-go.with-active {top: -330px; max-height: 350px;}
<?php endif;?>
<?php if(empty($latestVersionList)):?>
#upgradeContent {top: -272px; height: 262px;}
+5 -1
View File
@@ -452,7 +452,7 @@ class productModel extends model
$output .= '<div class="input-control search-box has-icon-left has-icon-right search-example"><input type="search" class="form-control search-input" /><label class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label><a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a></div>';
$output .= "</div></div>";
if(isset($currentProduct->type) && $currentProduct->type != 'normal')
if(isset($currentProduct->type) and $currentProduct->type != 'normal' and $currentModule != 'testsuite')
{
$this->lang->product->branch = sprintf($this->lang->product->branch, $this->lang->product->branchName[$currentProduct->type]);
$branches = $this->loadModel('branch')->getPairs($productID);
@@ -1578,6 +1578,10 @@ class productModel extends model
{
$link = helper::createLink('bug', 'browse', "productID=%s" . ($branch ? "&branch=%s" : '&branch=0') . "&extra=$extra");
}
elseif($module == 'testsuite' && !in_array($method, array('browse', 'create')))
{
$link = helper::createLink('testsuite', 'browse', "productID=%s");
}
else
{
$link = helper::createLink($module, $method, "productID=%s" . ($branch ? "&branch=%s" : ''));
+2
View File
@@ -14,6 +14,8 @@
<?php include '../../common/view/datatable.fix.html.php';?>
<style>
body {margin-bottom: 25px;}
#mainMenu .btn-toolbar .btn-group .dropdown-menu .btn-active-text:hover .text {color: #fff;}
#mainMenu .btn-toolbar .btn-group .dropdown-menu .btn-active-text:hover .text:after {border-bottom: unset;}
</style>
<?php js::set('browseType', $browseType);?>
<?php js::set('productID', $productID);?>
+1 -1
View File
@@ -1,3 +1,3 @@
<?php
$config->qa->menuList = array('caselib', 'testreport', 'testsuite', 'testtask', 'testcase', 'bug', 'qa', 'automation');
$config->qa->noDropMenuModule = array('qa', 'caselib', 'automation', 'testsuite');
$config->qa->noDropMenuModule = array('qa', 'caselib', 'automation');
+2 -2
View File
@@ -155,13 +155,13 @@
$actionLink = $this->createLink('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule");
echo html::a($actionLink, "<i class='icon-plus'></i> " . $lang->testcase->create, '', "class='btn btn-primary' data-app='{$this->app->openApp}'");
?>
<?php if(!empty($productID)):?>
<button type='button' class='btn btn-primary dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>
<ul class='dropdown-menu'>
<li><?php echo html::a($actionLink, $lang->testcase->create);?></li>
<?php if(!empty($productID)):?>
<li><?php echo html::a($this->createLink('testcase', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$initModule"), $lang->testcase->batchCreate, '', "data-app='{$this->app->openApp}'");?></li>
<?php endif;?>
</ul>
<?php endif;?>
</div>
<?php endif;?>
<?php if($this->app->rawMethod == 'browseunits' and common::canModify('product', $product)):?>
+12 -1
View File
@@ -177,8 +177,19 @@
foreach($modulePath as $key => $module)
{
if($this->app->openApp == 'qa' and !common::printLink('testcase', 'browse', "productID=$case->product&branch=$module->branch&browseType=byModule&param=$module->id", $module->name)) echo $module->name;
if($this->app->openApp == 'qa')
{
if($isLibCase)
{
if(!common::printLink('caselib', 'browse', "libID=$case->lib&browseType=byModule&param=$module->id", $module->name)) echo $module->name;
}
else
{
if(!common::printLink('testcase', 'browse', "productID=$case->product&branch=$module->branch&browseType=byModule&param=$module->id", $module->name)) echo $module->name;
}
}
if($this->app->openApp == 'project' and !common::printLink('project', 'testcase', "projectID={$this->session->project}&productID=$case->product&branch=$module->branch&browseType=byModule&param=$module->id", $module->name)) echo $module->name;
if($this->app->openApp == 'execution') echo $module->name;
if(isset($modulePath[$key + 1])) echo $lang->arrow;
}
}
+2
View File
@@ -231,6 +231,7 @@ class testsuite extends control
/* Set product session. */
$productID = $this->product->saveState($suite->product, $this->products);
$this->loadModel('qa')->setMenu($this->products, $productID);
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->testsuite->edit;
$this->view->position[] = html::a($this->createLink('testsuite', 'browse', "productID=$productID"));
@@ -309,6 +310,7 @@ class testsuite extends control
/* Set product session. */
$productID = $this->product->saveState($suite->product, $this->products);
$this->loadModel('qa')->setMenu($this->products, $productID);
/* Load pager. */
$this->app->loadClass('pager', $static = true);
+1 -6
View File
@@ -73,12 +73,7 @@
<?php
common::printIcon('testsuite', 'linkCase', "suiteID=$suite->id", $suite, 'list', 'link');
common::printIcon('testsuite', 'edit', "suiteID=$suite->id", $suite, 'list');
if(common::hasPriv('testsuite', 'delete', $suite))
{
$deleteURL = $this->createLink('testsuite', 'delete', "suiteID=$suite->id&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$deleteURL\", \"suiteList\", confirmDelete)", '<i class="icon icon-trash"></i>', '', "title='{$lang->testsuite->delete}' class='btn'");
}
common::printIcon('testsuite', 'delete', "suiteID=$suite->id", $suite, 'list', 'trash', 'hiddenwin');
?>
</td>
</tr>