This commit is contained in:
hufangzhou
2022-04-22 15:29:27 +08:00
parent ff8ad82f8f
commit 0c57308663
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -119,3 +119,5 @@ $config->product->statisticFields['stories'] = array('draftStories', 'activ
$config->product->statisticFields['bugs'] = array('unResolvedBugs', 'closedBugs', 'fixedBugs');
$config->product->statisticFields['plans'] = array('plans');
$config->product->statisticFields['releases'] = array('releases');
$config->product->skipCreateProduct = ',create,index,showerrornone,ajaxgetdropmenu,kanban,all,manageline,export,';
+1 -1
View File
@@ -32,7 +32,7 @@ class product extends control
/* Get all products, if no, goto the create page. */
$this->products = $this->product->getPairs('nocode');
$isAPI = ($this->app->viewType == 'json' or (defined('RUN_MODE') and RUN_MODE == 'api'));
if(empty($this->products) and strpos(',create,index,showerrornone,ajaxgetdropmenu,kanban,all,manageline', $this->methodName) === false and $this->app->getViewType() != 'mhtml' and !$isAPI) $this->locate($this->createLink('product', 'create'));
if(empty($this->products) and strpos($this->config->product->skipCreateProduct, ",$this->methodName,") === false and $this->app->getViewType() != 'mhtml' and !$isAPI) $this->locate($this->createLink('product', 'create'));
$this->view->products = $this->products;
}