diff --git a/module/bug/model.php b/module/bug/model.php
index 3d7ad1f2fb..45727cb53a 100644
--- a/module/bug/model.php
+++ b/module/bug/model.php
@@ -26,9 +26,16 @@ class bugModel extends model
$this->loadModel('product')->setMenu($products, $productID, $branch, $moduleID, 'bug');
$selectHtml = $this->product->select($products, $productID, 'bug', 'browse', '', $branch, $moduleID, 'bug');
- $this->app->loadLang('qa');
- $productIndex = '
' . html::a(helper::createLink('qa', 'index', 'locate=no'), $this->lang->qa->index, '', "class='btn'") . '
';
- $productIndex .= $selectHtml;
+ if($this->app->viewType == 'mhtml')
+ {
+ $productIndex = $selectHtml;
+ }
+ else
+ {
+ $this->app->loadLang('qa');
+ $productIndex = '' . html::a(helper::createLink('qa', 'index', 'locate=no'), $this->lang->qa->index, '', "class='btn'") . '
';
+ $productIndex .= $selectHtml;
+ }
$this->lang->modulePageNav = $productIndex;
foreach($this->lang->bug->menu as $key => $menu)
diff --git a/module/product/model.php b/module/product/model.php
index e439d2fd0f..2cebfd5863 100644
--- a/module/product/model.php
+++ b/module/product/model.php
@@ -50,27 +50,33 @@ class productModel extends model
if($currentMethod == 'report') $currentMethod = 'browse';
$selectHtml = $this->select($products, $productID, $currentModule, $currentMethod, $extra, $branch, $module, $moduleType);
-
- $label = $this->lang->product->index;
- if($currentModule == 'product' && $currentMethod == 'all') $label = $this->lang->product->all;
- if($currentModule == 'product' && $currentMethod == 'create') $label = $this->lang->product->create;
-
- $productIndex = '';
- $productIndex .= '
';
- $productIndex .= $selectHtml;
$this->lang->modulePageNav = $productIndex;
foreach($this->lang->product->menu as $key => $menu)
diff --git a/module/project/model.php b/module/project/model.php
index 5002129c70..f72e5dfbfc 100644
--- a/module/project/model.php
+++ b/module/project/model.php
@@ -102,29 +102,35 @@ class projectModel extends model
}
$selectHtml = $this->select($projects, $projectID, $buildID, $moduleName, $methodName, $extra);
-
- $label = $this->lang->project->index;
- if($moduleName == 'project' && $methodName == 'all') $label = $this->lang->project->allProjects;
- if($moduleName == 'project' && $methodName == 'create') $label = $this->lang->project->create;
-
- $projectIndex = '';
- $projectIndex .= '
';
- $projectIndex .= $selectHtml;
+ $projectIndex = '';
+ $projectIndex .= '
';
+ $projectIndex .= $selectHtml;
+ }
$this->lang->modulePageNav = $projectIndex;
if($moduleName != 'project') $this->lang->$moduleName->dividerMenu = $this->lang->project->dividerMenu;
diff --git a/module/qa/model.php b/module/qa/model.php
index a71fe80576..30e61c0809 100644
--- a/module/qa/model.php
+++ b/module/qa/model.php
@@ -25,8 +25,15 @@ class qaModel extends model
$this->loadModel('product')->setMenu($products, $productID, $branch);
$selectHtml = $this->product->select($products, $productID, 'qa', 'index', '', $branch);
- $productIndex = '' . html::a(helper::createLink('qa', 'index', 'locate=no'), $this->lang->qa->index, '', "class='btn'") . '
';
- $productIndex .= $selectHtml;
+ if($this->app->viewType == 'mhtml')
+ {
+ $productIndex = $selectHtml;
+ }
+ else
+ {
+ $productIndex = '' . html::a(helper::createLink('qa', 'index', 'locate=no'), $this->lang->qa->index, '', "class='btn'") . '
';
+ $productIndex .= $selectHtml;
+ }
$this->lang->modulePageNav = $productIndex;
foreach($this->lang->qa->menu as $key => $menu)
diff --git a/module/testcase/model.php b/module/testcase/model.php
index aca437614d..b30fdf48d5 100644
--- a/module/testcase/model.php
+++ b/module/testcase/model.php
@@ -26,9 +26,16 @@ class testcaseModel extends model
$this->loadModel('product')->setMenu($products, $productID, $branch, $moduleID, 'case');
$selectHtml = $this->product->select($products, $productID, 'testcase', 'browse', '', $branch, $moduleID, 'case');
- $this->app->loadLang('qa');
- $productIndex = '' . html::a(helper::createLink('qa', 'index', 'locate=no'), $this->lang->qa->index, '', "class='btn'") . '
';
- $productIndex .= $selectHtml;
+ if($this->app->viewType == 'mhtml')
+ {
+ $productIndex = $selectHtml;
+ }
+ else
+ {
+ $this->app->loadLang('qa');
+ $productIndex = '' . html::a(helper::createLink('qa', 'index', 'locate=no'), $this->lang->qa->index, '', "class='btn'") . '
';
+ $productIndex .= $selectHtml;
+ }
$this->lang->modulePageNav = $productIndex;
foreach($this->lang->testcase->menu as $key => $menu)
diff --git a/module/testsuite/model.php b/module/testsuite/model.php
index c056c3f18e..0611e7e63f 100644
--- a/module/testsuite/model.php
+++ b/module/testsuite/model.php
@@ -27,9 +27,16 @@ class testsuiteModel extends model
$selectHtml = $this->select($products, $productID, 'testsuite', 'browse');
if(strpos($selectHtml, 'currentBranch') !== false) $selectHtml = substr($selectHtml, 0, strrpos($selectHtml, "")) . '
';
- $this->app->loadLang('qa');
- $productIndex = '' . html::a(helper::createLink('qa', 'index', 'locate=no'), $this->lang->qa->index, '', "class='btn'") . '
';
- $productIndex .= $selectHtml;
+ if($this->app->viewType == 'mhtml')
+ {
+ $productIndex = $selectHtml;
+ }
+ else
+ {
+ $this->app->loadLang('qa');
+ $productIndex = '' . html::a(helper::createLink('qa', 'index', 'locate=no'), $this->lang->qa->index, '', "class='btn'") . '
';
+ $productIndex .= $selectHtml;
+ }
$this->lang->modulePageNav = $productIndex;
foreach($this->lang->testsuite->menu as $key => $value)
@@ -87,18 +94,26 @@ class testsuiteModel extends model
public function setLibMenu($libraries, $libID, $moduleID = 0)
{
$currentLibName = zget($libraries, $libID, '');
- $selectHtml = '';
+ $isMobile = $this->app->viewType == 'mhtml';
+ $selectHtml = '';
if(!empty($libraries))
{
- $dropMenuLink = helper::createLink('testsuite', 'ajaxGetDropMenu', "objectID=$libID&module=testsuite&method=library");
- $selectHtml = "";
+ 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;
@@ -107,23 +122,29 @@ class testsuiteModel extends model
$dropMenuLink = helper::createLink('tree', 'ajaxGetDropMenu', "objectID=$libID&module=testsuite&method=library");
$selectHtml .= "
";
+ $selectHtml .= "
";
}
else
{
$selectHtml .= "{$moduleName} ";
}
}
- $selectHtml .= '';
setCookie("lastCaseLib", $libID, $this->config->cookieLife, $this->config->webRoot);
- $this->app->loadLang('qa');
- $productIndex = '';
- $productIndex .= '
';
- $productIndex .= $selectHtml;
+ if($isMobile)
+ {
+ $productIndex = $selectHtml;
+ }
+ else
+ {
+ $this->app->loadLang('qa');
+ $productIndex = '';
+ $productIndex .= '
';
+ $productIndex .= $selectHtml;
+ }
$this->lang->modulePageNav = $productIndex;
foreach($this->lang->caselib->menu as $key => $value)
diff --git a/module/testtask/model.php b/module/testtask/model.php
index a40a2188b6..44c7a16144 100644
--- a/module/testtask/model.php
+++ b/module/testtask/model.php
@@ -26,27 +26,34 @@ class testtaskModel extends model
$this->loadModel('product')->setMenu($products, $productID, $branch);
$selectHtml = $this->product->select($products, $productID, 'testtask', 'browse', '', $branch);
- if($testtask)
+ if($this->app->viewType == 'mhtml')
{
- $testtasks = $this->getProductTasks($productID, 0, 'id_desc', null, array('local', 'totalStatus'));
-
- $selectHtml .= "";
- $selectHtml .= "
";
- $selectHtml .= "
";
-
- $this->lang->modulePageActions = '';
- if(common::hasPriv('testtask', 'view')) $this->lang->modulePageActions .= html::a(helper::createLink('testtask', 'view', "taskID={$testtask->id}"), " " . $this->lang->testtask->view, '', "class='btn'");
- if(common::hasPriv('testreport', 'browse')) $this->lang->modulePageActions .= html::a(helper::createLink('testreport', 'browse', "objectID=$productID&objectType=product&extra={$testtask->id}"), " " . $this->lang->testtask->reportField, '', "class='btn'");
+ $productIndex = $selectHtml;
}
+ else
+ {
+ if($testtask)
+ {
+ $testtasks = $this->getProductTasks($productID, 0, 'id_desc', null, array('local', 'totalStatus'));
- $this->app->loadLang('qa');
- $productIndex = '' . html::a(helper::createLink('qa', 'index', 'locate=no'), $this->lang->qa->index, '', "class='btn'") . '
';
- $productIndex .= $selectHtml;
+ $selectHtml .= "";
+ $selectHtml .= "
";
+ $selectHtml .= "
";
+
+ $this->lang->modulePageActions = '';
+ if(common::hasPriv('testtask', 'view')) $this->lang->modulePageActions .= html::a(helper::createLink('testtask', 'view', "taskID={$testtask->id}"), " " . $this->lang->testtask->view, '', "class='btn'");
+ if(common::hasPriv('testreport', 'browse')) $this->lang->modulePageActions .= html::a(helper::createLink('testreport', 'browse', "objectID=$productID&objectType=product&extra={$testtask->id}"), " " . $this->lang->testtask->reportField, '', "class='btn'");
+ }
+
+ $this->app->loadLang('qa');
+ $productIndex = '' . html::a(helper::createLink('qa', 'index', 'locate=no'), $this->lang->qa->index, '', "class='btn'") . '
';
+ $productIndex .= $selectHtml;
+ }
$this->lang->modulePageNav = $productIndex;
foreach($this->lang->testtask->menu as $key => $value)