From 49a33127e2de3b00a81f3363ad207f7999c37eda Mon Sep 17 00:00:00 2001 From: leiyong <1549684884@qq.com> Date: Thu, 26 Nov 2020 13:57:36 +0800 Subject: [PATCH] * Adjust the projectstory module. --- module/product/control.php | 13 +++++++------ module/product/view/browse.html.php | 8 ++++---- module/story/control.php | 2 +- module/tree/model.php | 12 ++++++++---- 4 files changed, 20 insertions(+), 15 deletions(-) diff --git a/module/product/control.php b/module/product/control.php index 6f703d8474..dbe46a06ba 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -138,7 +138,7 @@ class product extends control $moduleID = ($browseType == 'bymodule') ? (int)$param : (($browseType == 'bysearch' or $browseType == 'bybranch') ? 0 : ($this->cookie->storyModule ? $this->cookie->storyModule : 0)); $queryID = ($browseType == 'bysearch') ? (int)$param : 0; - /* Set menu. */ + /* Set menu. The projectstory module does not execute. */ if($this->app->rawModule == 'product') { $this->lang->product->menu = $this->lang->product->viewMenu; @@ -152,11 +152,11 @@ class product extends control { setcookie('treeBranch', (int)$branch, 0, $this->config->webRoot, '', false, false); $browseType = 'unclosed'; - $moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'story', $startModuleID = 0, array('treeModel', $createModuleLink), '', $branch, "¶m=$param&storyType=$storyType"); + $moduleTree = $this->tree->getTreeMenu($productID, 'story', $startModuleID = 0, array('treeModel', $createModuleLink), '', $branch, "¶m=$param&storyType=$storyType"); } else { - $moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'story', $startModuleID = 0, array('treeModel', $createModuleLink), '', (int)$this->cookie->treeBranch, "¶m=$param&storyType=$storyType"); + $moduleTree = $this->tree->getTreeMenu($productID, 'story', $startModuleID = 0, array('treeModel', $createModuleLink), '', (int)$this->cookie->treeBranch, "¶m=$param&storyType=$storyType"); } if($browseType != 'bymodule' and $browseType != 'bybranch') $this->session->set('storyBrowseType', $browseType); @@ -201,7 +201,9 @@ class product extends control } /* Build search form. */ - $actionURL = $this->createLink('product', 'browse', "productID=$productID&branch=$branch&browseType=bySearch&queryID=myQueryID&storyType=$storyType"); + $rawModule = $this->app->rawModule; + $rawMethod = $this->app->rawMethod; + $actionURL = $this->createLink($rawModule, $rawMethod, "productID=$productID&branch=$branch&browseType=bySearch&queryID=myQueryID&storyType=$storyType"); $this->config->product->search['onMenuBar'] = 'yes'; $this->product->buildSearchForm($productID, $this->products, $queryID, $actionURL); @@ -213,7 +215,6 @@ class product extends control $this->view->position[] = $this->products[$productID]; $this->view->position[] = $this->lang->product->browse; $this->view->productID = $productID; - $this->view->program = $this->loadModel('project')->getById($this->session->PRJ); $this->view->product = $this->product->getById($productID); $this->view->productName = $this->products[$productID]; $this->view->moduleID = $moduleID; @@ -226,7 +227,7 @@ class product extends control $this->view->users = $this->user->getPairs('noletter|pofirst|nodeleted'); $this->view->orderBy = $orderBy; $this->view->browseType = $browseType; - $this->view->modules = $this->tree->getOptionMenu($productID, $viewType = 'story', 0, $branch); + $this->view->modules = $this->tree->getOptionMenu($productID, 'story', 0, $branch); $this->view->moduleID = $moduleID; $this->view->moduleName = $moduleID ? $this->tree->getById($moduleID)->name : $this->lang->tree->all; $this->view->branch = $branch; diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index 00090b9471..496cd02e60 100644 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -32,7 +32,7 @@ $lang->story->create = $storyType == 'story' ? $lang->story->createStory : $lang echo $moduleName; if($moduleID) { - $removeLink = $browseType == 'bymodule' ? $this->createLink('product', 'browse', "productID=$productID&branch=$branch&browseType=$browseType¶m=0&storyType=$storyType&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("storyModule")'; + $removeLink = $browseType == 'bymodule' ? $this->createLink($this->app->rawModule, $this->app->rawMethod, "productID=$productID&branch=$branch&browseType=$browseType¶m=0&storyType=$storyType&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("storyModule")'; echo html::a($removeLink, "", '', "class='text-muted'"); } ?> @@ -63,20 +63,20 @@ $lang->story->create = $storyType == 'story' ? $lang->story->createStory : $lang foreach($lang->product->moreSelects as $key => $value) { $active = $key == $storyBrowseType ? 'btn-active-text' : ''; - echo '