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

This commit is contained in:
hufangzhou
2021-03-25 13:43:50 +08:00
12 changed files with 35 additions and 22 deletions
+4 -5
View File
@@ -682,11 +682,10 @@ class bug extends control
if($bug->assignedTo == $this->app->user->account) $this->loadModel('action')->read('bug', $bugID);
/* Set menu. */
if($from == 'bug')
{
$this->qa->setMenu($this->products, $bug->product, $bug->branch);
}
elseif($from == 'repo')
if($this->app->openApp == 'project') $this->loadModel('project')->setMenu($bug->project);
if($this->app->openApp == 'execution') $this->loadModel('execution')->setMenu($bug->execution);
if($this->app->openApp == 'qa') $this->qa->setMenu($this->products, $bug->product, $bug->branch);
if($this->app->openApp == 'repo')
{
session_write_close();
$repos = $this->loadModel('repo')->getRepoPairs($this->session->project);
+1 -1
View File
@@ -312,7 +312,7 @@ $lang->my->workMenu->testtask = 'Test Task|my|work|mode=testtask&type=wait';
$lang->my->contributeMenu = new stdclass();
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
f($config->URAndSR) $lang->my->contributeMenu->requirement = "$lang->URCommon|my|contribute|mode=requirement";
if($config->URAndSR) $lang->my->contributeMenu->requirement = "$lang->URCommon|my|contribute|mode=requirement";
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
$lang->my->contributeMenu->testcase = 'Test Case|my|contribute|mode=testtask&type=openedbyme';
+7 -3
View File
@@ -539,7 +539,7 @@ class commonModel extends model
if(!$openApp) return;
$icon = zget($lang->navIcons, $openApp, '');
if(!in_array($openApp, array('program', 'product', 'project')))
{
$nav = $lang->mainNav->$openApp;
@@ -1300,13 +1300,16 @@ EOD;
global $lang, $app;
if(isonlybody()) return false;
$moduleName = ($app->getModuleName() == 'story' and $app->openApp == 'project') ? 'projectstory' : $app->getModuleName();
echo "<nav class='container'>";
if(isset($preAndNext->pre) and $preAndNext->pre)
{
$id = (isset($_SESSION['testcaseOnlyCondition']) and !$_SESSION['testcaseOnlyCondition'] and $app->getModuleName() == 'testcase' and isset($preAndNext->pre->case)) ? 'case' : 'id';
$title = isset($preAndNext->pre->title) ? $preAndNext->pre->title : $preAndNext->pre->name;
$title = '#' . $preAndNext->pre->$id . ' ' . $title . ' ' . $lang->preShortcutKey;
$link = $linkTemplate ? sprintf($linkTemplate, $preAndNext->pre->$id) : inLink('view', "ID={$preAndNext->pre->$id}");
$link = $linkTemplate ? sprintf($linkTemplate, $preAndNext->pre->$id) : helper::createLink($moduleName, 'view', "ID={$preAndNext->pre->$id}");
$link .= '#app=' . $app->openApp;
echo html::a($link, '<i class="icon-pre icon-chevron-left"></i>', '', "id='prevPage' class='btn' title='{$title}'");
}
if(isset($preAndNext->next) and $preAndNext->next)
@@ -1314,7 +1317,8 @@ EOD;
$id = (isset($_SESSION['testcaseOnlyCondition']) and !$_SESSION['testcaseOnlyCondition'] and $app->getModuleName() == 'testcase' and isset($preAndNext->next->case)) ? 'case' : 'id';
$title = isset($preAndNext->next->title) ? $preAndNext->next->title : $preAndNext->next->name;
$title = '#' . $preAndNext->next->$id . ' ' . $title . ' ' . $lang->nextShortcutKey;
$link = $linkTemplate ? sprintf($linkTemplate, $preAndNext->next->$id) : inLink('view', "ID={$preAndNext->next->$id}");
$link = $linkTemplate ? sprintf($linkTemplate, $preAndNext->next->$id) : helper::createLink($moduleName, 'view', "ID={$preAndNext->next->$id}");
$link .= '#app=' . $app->openApp;
echo html::a($link, '<i class="icon-pre icon-chevron-right"></i>', '', "id='nextPage' class='btn' title='$title'");
}
echo '</nav>';
+9
View File
@@ -47,4 +47,13 @@ if(isset($pageCSS)) css::internal($pageCSS);
<script>
<?php if(isset($pageJS)) echo $pageJS;?>
$('#dataform .chosen').chosen();
$(document).ready(function()
{
$("#dataform .picker-select[data-pickertype!='remote']").picker({chosenMode: true});
$("#dataform [data-pickertype='remote']").each(function()
{
var pickerremote = $(this).attr('data-pickerremote');
$(this).picker({chosenMode: true, remote: pickerremote});
})
});
</script>
+3 -1
View File
@@ -80,7 +80,9 @@ class index extends control
{
$objectType = $this->post->objectType;
$appGroup = zget($this->config->index->appGroup, $objectType, '');
if($objectType == 'testcase') $objectType = 'case';
if($objectType == 'testcase') $objectType = 'case';
if($objectType == 'testreport') $objectType = 'report';
if($objectType == 'productplan') $objectType = 'productPlan';
$this->session->set($objectType . 'List', '', $appGroup);
}
-2
View File
@@ -490,8 +490,6 @@ class project extends control
$this->project->setMenu($projectID);
$this->app->session->set('projectList', $this->app->getURI(true), 'project');
$products = $this->loadModel('product')->getProducts($projectID);
$linkedBranches = array();
foreach($products as $product)
+6 -6
View File
@@ -1608,19 +1608,19 @@ class projectModel extends model
$projectSubMenu = $this->lang->project->menu->{$key}['dropMenu'];
$dropMenu = common::createDropMenu($this->lang->project->menu->{$key}['dropMenu'], $objectID);
if(!empty($dropMenu))
{
{
foreach($dropMenu as $menuKey => $menu)
{
$itemMenu = zget($projectSubMenu, $menuKey, '');
{
$itemMenu = zget($projectSubMenu, $menuKey, '');
$isActive['method'] = ($moduleName == strtolower($menu->link['module']) and $methodName == strtolower($menu->link['method']));
$isActive['alias'] = ($moduleName == strtolower($menu->link['module']) and (is_array($itemMenu) and isset($itemMenu['alias']) and strpos($itemMenu['alias'], $methodName) !== false));
$isActive['subModule'] = (is_array($itemMenu) and isset($itemMenu['subModule']) and strpos($itemMenu['subModule'], $moduleName) !== false);
if($isActive['method'] or $isActive['alias'] or $isActive['subModule'])
{
{
$this->lang->project->menu->{$key}['link'] = $menu->text . "|" . join('|', $menu->link);
break;
}
}
}
}
$this->lang->project->menu->{$key}['dropMenu'] = $dropMenu;
}
}
+1
View File
@@ -216,6 +216,7 @@ class search extends control
$this->session->set('testsuiteList', $uri, 'qa');
$this->session->set('issueList', $uri, 'project');
$this->session->set('riskList', $uri, 'project');
$this->session->set('caselibList', $uri, 'qa');
$this->session->set('searchIngWord', $words);
$this->session->set('searchIngType', $type);
+2 -1
View File
@@ -53,7 +53,8 @@
<?php $params = isset($testtask) ? ",testtask=$testtask->id,executionID=$testtask->execution,buildID=$testtask->build" : '';?>
<tr class='result-detail hide' id='tr-detail_<?php echo $trCount++; ?>'>
<td colspan='7' class='pd-0'>
<form data-params='<?php echo "product=$case->product&branch=$case->branch&extras=projectID={$this->session->project},caseID=$case->id,version=$case->version,resultID=$result->id,runID=$runID" . $params?>' method='post'>
<?php $projectParam = $this->app->openApp == 'project' ? "projectID={$this->session->project}," : ''?>
<form data-params='<?php echo "product=$case->product&branch=$case->branch&extras={$projectParam}caseID=$case->id,version=$case->version,resultID=$result->id,runID=$runID" . $params?>' method='post'>
<table class='table table-condensed resultSteps'>
<thead>
<tr>
-1
View File
@@ -373,7 +373,6 @@ class todo extends control
/* Save the session. */
$uri = $this->app->getURI(true);
$this->session->set('todoList', $uri, 'my');
$this->session->set('bugList', $uri, 'qa');
$this->session->set('taskList', $uri, 'execution');
$this->session->set('storyList', $uri, 'product');
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long