From 2341927a791ae0ecbdd1b811776bce652bdd5866 Mon Sep 17 00:00:00 2001 From: daitingting Date: Wed, 20 Jun 2018 14:49:26 +0800 Subject: [PATCH] * Adjust conflict. --- module/bug/model.php | 13 ----------- module/testtask/model.php | 45 ++++++++++++++++----------------------- 2 files changed, 18 insertions(+), 40 deletions(-) diff --git a/module/bug/model.php b/module/bug/model.php index 59bb5452d4..dc97cd92fd 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -30,18 +30,6 @@ class bugModel extends model $this->loadModel('product')->setMenu($products, $productID, $branch, $moduleID, 'bug'); $selectHtml = $this->product->select($products, $productID, 'bug', 'browse', '', $branch, $moduleID, 'bug'); -<<<<<<< HEAD - 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; - } -======= $pageNav = ''; $pageActions = ''; $isMobile = $this->app->viewType == 'mhtml'; @@ -98,7 +86,6 @@ class bugModel extends model } } $pageNav .= $selectHtml; ->>>>>>> 6e25725965ce1935d9b2ee004157599f82dcfd15 $this->lang->modulePageNav = $pageNav; $this->lang->modulePageActions = $pageActions; diff --git a/module/testtask/model.php b/module/testtask/model.php index 2fb13da51e..89c3c60e5e 100644 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -26,36 +26,28 @@ class testtaskModel extends model $this->loadModel('product')->setMenu($products, $productID, $branch); $selectHtml = $this->product->select($products, $productID, 'testtask', 'browse', '', $branch); - if($this->app->viewType == 'mhtml') + if($testtask) { - $productIndex = $selectHtml; + $testtasks = $this->getProductTasks($productID, 0, 'id_desc', null, array('local', 'totalStatus')); + + $selectHtml .= "
"; + $selectHtml .= "
"; + $selectHtml .= "" . $testtasks[$testtask]->name . " "; + $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'"); } - else - { - if($testtask) - { - $testtasks = $this->getProductTasks($productID, 0, 'id_desc', null, array('local', 'totalStatus')); - $selectHtml .= "
"; - $selectHtml .= "
"; - $selectHtml .= "" . $testtasks[$testtask]->name . " "; - $selectHtml .= ""; - $selectHtml .= "
"; - $selectHtml .= "
"; + $this->app->loadLang('qa'); + $productIndex = '
' . html::a(helper::createLink('qa', 'index', 'locate=no'), $this->lang->qa->index, '', "class='btn'") . '
'; + $productIndex .= $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'"); - } - -<<<<<<< HEAD - $this->app->loadLang('qa'); - $productIndex = '
' . html::a(helper::createLink('qa', 'index', 'locate=no'), $this->lang->qa->index, '', "class='btn'") . '
'; - $productIndex .= $selectHtml; - } -======= $pageNav = ''; $pageActions = ''; $isMobile = $this->app->viewType == 'mhtml'; @@ -81,7 +73,6 @@ class testtaskModel extends model } } $pageNav .= $selectHtml; ->>>>>>> 6e25725965ce1935d9b2ee004157599f82dcfd15 $this->lang->modulePageNav = $pageNav; $this->lang->modulePageActions = $pageActions;