diff --git a/module/bug/model.php b/module/bug/model.php
index 17354c1295..7ac0442c9d 100644
--- a/module/bug/model.php
+++ b/module/bug/model.php
@@ -32,47 +32,56 @@ class bugModel extends model
$pageNav = '';
$pageActions = '';
- if($this->config->global->flow == 'full')
+ $isMobile = $this->app->viewType == 'mhtml';
+ if($isMobile)
{
$this->app->loadLang('qa');
- $pageNav = '
";
+ if($isMobile)
+ {
+ $selectHtml = "
{$currentLibName} ";
+ }
+ else
+ {
+ $dropMenuLink = helper::createLink('testsuite', 'ajaxGetDropMenu', "objectID=$libID&module=testsuite&method=library");
+ $selectHtml = "
";
+ }
}
if($this->config->global->flow == 'onlyTest')
{
- $isMobile = $this->app->viewType == 'mhtml';
$modules = $this->loadModel('tree')->getModulePairs($libID, 'caselib');
$moduleName = ($moduleID && isset($modules[$moduleID])) ? $modules[$moduleID] : $this->lang->tree->all;
@@ -128,51 +144,59 @@ class testsuiteModel extends model
$selectHtml .= "
{$moduleName} ";
}
}
- $selectHtml .= '
';
setCookie("lastCaseLib", $libID, $this->config->cookieLife, $this->config->webRoot);
$pageNav = '';
$pageActions = '';
- if($this->config->global->flow == 'full')
+ $isMobile = $this->app->viewType == 'mhtml';
+ if($isMobile)
{
$this->app->loadLang('qa');
- $pageNav .= '
';
- $pageNav .= '
';
-
- if(common::hasPriv('testsuite', 'libView'))
- {
- $link = helper::createLink('testsuite', 'libView', "libID=$libID");
- $pageActions .= html::a($link, "
" . $this->lang->testsuite->view, '', "class='btn'");
- }
+ $pageNav = html::a(helper::createLink('qa', 'index'), $this->lang->qa->index) . $this->lang->colon;
}
else
{
- $this->app->loadLang('testcase');
- $pageActions .= "
";
- if(common::hasPriv('testsuite', 'exportTemplet'))
+ if($this->config->global->flow == 'full')
{
- $link = helper::createLink('testsuite', 'exportTemplet', "libID=$libID");
- $pageActions .= html::a($link, "
" . $this->lang->testsuite->exportTemplet, '', "class='btn btn-link export'");
+ $this->app->loadLang('qa');
+ $pageNav .= '
';
+ $pageNav .= '
';
+
+ if(common::hasPriv('testsuite', 'libView'))
+ {
+ $link = helper::createLink('testsuite', 'libView', "libID=$libID");
+ $pageActions .= html::a($link, "
" . $this->lang->testsuite->view, '', "class='btn'");
+ }
}
- if(common::hasPriv('testsuite', 'import'))
+ else
{
- $link = helper::createLink('testsuite', 'import', "libID=$libID");
- $pageActions .= html::a($link, "
" . $this->lang->testcase->importFile, '', "class='btn btn-link export'");
- }
- $pageActions .= '
';
- $params = "libID=$libID&moduleID=" . (isset($moduleID) ? $moduleID : 0);
- if(common::hasPriv('testsuite', 'batchCreateCase'))
- {
- $link = helper::createLink('testsuite', 'batchCreateCase', $params);
- $pageActions .= html::a($link, "
" . $this->lang->testcase->batchCreate, '', "class='btn btn-secondary'");
- }
- if(common::hasPriv('testsuite', 'createCase'))
- {
- $link = helper::createLink('testsuite', 'createCase', $params);
- $pageActions .= html::a($link, "
" . $this->lang->testcase->create, '', "class='btn btn-primary'");
+ $this->app->loadLang('testcase');
+ $pageActions .= "
";
+ if(common::hasPriv('testsuite', 'exportTemplet'))
+ {
+ $link = helper::createLink('testsuite', 'exportTemplet', "libID=$libID");
+ $pageActions .= html::a($link, " " . $this->lang->testsuite->exportTemplet, '', "class='btn btn-link export'");
+ }
+ if(common::hasPriv('testsuite', 'import'))
+ {
+ $link = helper::createLink('testsuite', 'import', "libID=$libID");
+ $pageActions .= html::a($link, " " . $this->lang->testcase->importFile, '', "class='btn btn-link export'");
+ }
+ $pageActions .= '
';
+ $params = "libID=$libID&moduleID=" . (isset($moduleID) ? $moduleID : 0);
+ if(common::hasPriv('testsuite', 'batchCreateCase'))
+ {
+ $link = helper::createLink('testsuite', 'batchCreateCase', $params);
+ $pageActions .= html::a($link, "
" . $this->lang->testcase->batchCreate, '', "class='btn btn-secondary'");
+ }
+ if(common::hasPriv('testsuite', 'createCase'))
+ {
+ $link = helper::createLink('testsuite', 'createCase', $params);
+ $pageActions .= html::a($link, "
" . $this->lang->testcase->create, '', "class='btn btn-primary'");
+ }
}
}
$pageNav .= $selectHtml;
diff --git a/module/testtask/model.php b/module/testtask/model.php
index 496b74e077..a39828be99 100644
--- a/module/testtask/model.php
+++ b/module/testtask/model.php
@@ -46,17 +46,26 @@ class testtaskModel extends model
$pageNav = '';
$pageActions = '';
- if($this->config->global->flow == 'full')
+ $isMobile = $this->app->viewType == 'mhtml';
+ if($isMobile)
{
$this->app->loadLang('qa');
- $pageNav = '
' . html::a(helper::createLink('qa', 'index', 'locate=no'), $this->lang->qa->index, '', "class='btn'") . '
';
+ $pageNav = html::a(helper::createLink('qa', 'index'), $this->lang->qa->index) . $this->lang->colon;
}
else
{
- if(common::hasPriv('testtask', 'create'))
+ if($this->config->global->flow == 'full')
{
- $link = helper::createLink('testtask', 'create', "productID=$productID");
- $pageActions .= html::a($link, "
{$this->lang->testtask->create}", '', "class='btn btn-primary'");
+ $this->app->loadLang('qa');
+ $pageNav = '
' . html::a(helper::createLink('qa', 'index', 'locate=no'), $this->lang->qa->index, '', "class='btn'") . '
';
+ }
+ else
+ {
+ if(common::hasPriv('testtask', 'create'))
+ {
+ $link = helper::createLink('testtask', 'create', "productID=$productID");
+ $pageActions .= html::a($link, "
{$this->lang->testtask->create}", '', "class='btn btn-primary'");
+ }
}
}
$pageNav .= $selectHtml;