diff --git a/module/caselib/view/showimport.html.php b/module/caselib/view/showimport.html.php index a2bb3dcff0..dad8d594e0 100644 --- a/module/caselib/view/showimport.html.php +++ b/module/caselib/view/showimport.html.php @@ -112,7 +112,7 @@ $(function() } echo html::hidden('isEndPage', $isEndPage ? 1 : 0); echo html::hidden('pagerID', $pagerID); - echo '   ' . html::backButton(); + echo '   ' . html::a($this->createLink('caselib', 'browse', "libID=$libID"), $lang->goback, '', 'class="btn btn-wide"'); echo '   ' . sprintf($lang->file->importPager, $allCount, $pagerID, $allPager); ?> diff --git a/module/story/control.php b/module/story/control.php index c9dbd6c90d..056edfe336 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -1018,21 +1018,7 @@ class story extends control $module = $this->app->tab == 'project' ? 'projectstory' : 'story'; - if(isonlybody()) - { - $execution = $this->execution->getByID($this->session->execution); - if($this->app->tab == 'execution' and $execution->type == 'kanban' and $this->app->tab == 'execution') - { - $kanbanData = $this->loadModel('kanban')->getRDKanban($this->session->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all'); - $kanbanData = json_encode($kanbanData); - - return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)")); - } - else - { - return print(js::reload('parent.parent')); - } - } + if(isonlybody()) return print(js::reload('parent.parent')); if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'success')); return print(js::locate($this->createLink($module, 'view', "storyID=$storyID"), 'parent')); diff --git a/module/testsuite/control.php b/module/testsuite/control.php index 7d826b7982..037d25161c 100644 --- a/module/testsuite/control.php +++ b/module/testsuite/control.php @@ -73,16 +73,14 @@ class testsuite extends control /* Append id for secend sort. */ $sort = common::appendOrder($orderBy); - $suites = $this->testsuite->getSuites($productID, $sort, $pager); + $productName = isset($this->products[$productID]) ? $this->products[$productID] : ''; + $suites = $this->testsuite->getSuites($productID, $sort, $pager, 'all'); if(empty($suites) and $pageID > 1) { - $pager = pager::init(0, $recPerPage, 1); - $suites = $this->testsuite->getSuites($productID, $sort, $pager); + $pager = pager::init(0, $recPerPage, 1); + $suites = $this->testsuite->getSuites($productID, $sort, $pager, 'all'); } - $productName = isset($this->products[$productID]) ? $this->products[$productID] : ''; - $suites = $this->testsuite->getSuites($productID, $sort, $pager); - $this->view->title = $productName . $this->lang->testsuite->common; $this->view->position[] = html::a($this->createLink('testsuite', 'browse', "productID=$productID"), $productName); $this->view->position[] = $this->lang->testsuite->common; diff --git a/module/testsuite/model.php b/module/testsuite/model.php index ae73a101fd..a0d52b572f 100644 --- a/module/testsuite/model.php +++ b/module/testsuite/model.php @@ -87,16 +87,17 @@ class testsuiteModel extends model * @param int $productID * @param string $orderBy * @param object $pager + * @param string $param * @access public * @return array */ - public function getSuites($productID, $orderBy = 'id_desc', $pager = null) + public function getSuites($productID, $orderBy = 'id_desc', $pager = null, $param = '') { return $this->dao->select("*")->from(TABLE_TESTSUITE) ->where('product')->eq((int)$productID) ->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('project')->eq($this->session->project)->fi() ->andWhere('deleted')->eq(0) - ->andWhere("(`type` = 'public' OR (`type` = 'private' and addedBy = '{$this->app->user->account}'))") + ->beginIF(strpos($param, 'all') === false)->andWhere("(`type` = 'public' OR (`type` = 'private' and addedBy = '{$this->app->user->account}'))")->fi() ->orderBy($orderBy) ->page($pager) ->fetchAll('id'); diff --git a/module/testsuite/view/browse.html.php b/module/testsuite/view/browse.html.php index a23dd8f834..a4d24ca90e 100644 --- a/module/testsuite/view/browse.html.php +++ b/module/testsuite/view/browse.html.php @@ -57,7 +57,7 @@ id"), sprintf('%03d', $suite->id));?> - + type == 'public') echo "{$lang->testsuite->authorList['public']} ";?> type == 'private') echo "{$lang->testsuite->authorList['private']} ";?> id"), $suite->name);?> diff --git a/module/testsuite/view/edit.html.php b/module/testsuite/view/edit.html.php index 7991c10536..6b826c3510 100644 --- a/module/testsuite/view/edit.html.php +++ b/module/testsuite/view/edit.html.php @@ -28,7 +28,7 @@ desc), "rows=10 class='form-control'");?> printExtendFields($suite, 'table');?> - type != 'library'):?> + type != 'library' and $suite->type != 'unit'):?> testsuite->author;?> testsuite->authorList, $suite->type);?>