* Modify tag name.

This commit is contained in:
caoyanyi
2023-02-23 16:31:25 +08:00
parent 2f3aae9281
commit fcebbfcc57
7 changed files with 17 additions and 17 deletions

View File

@@ -241,7 +241,7 @@ $config->dev->postParams['testcase']['create']['expect'] = 'string';
$config->dev->postParams['testcase']['create']['mailto'] = 'string';
$config->dev->postParams['testcase']['create']['keywords'] = 'string';
$config->dev->navTypes = array('second', 'third', 'feature');
$config->dev->navTypes = array('second', 'third', 'tag');
$config->disableFeature = array();
if(!helper::hasFeature('waterfall')) $config->disableFeature = array('design', 'stage', 'programplan', 'weekly', 'researchplan', 'researchreport', 'gapanalysis');

View File

@@ -85,7 +85,7 @@ class dev extends control
/**
* Custom menu lang item.
*
* @param string $type common|first|second|third|feature
* @param string $type common|first|second|third|tag
* @param string $module
* @param string $method
* @param string $language zh_cn|en|fr|de|zh_tw
@@ -118,8 +118,8 @@ class dev extends control
$moduleName = $module . 'SubMenu';
}
if($type == 'feature' and empty($module)) $module = 'my';
if($type == 'feature' and empty($method)) $method = 'todo';
if($type == 'tag' and empty($module)) $module = 'my';
if($type == 'tag' and empty($method)) $method = 'todo';
if($this->server->request_method == 'POST')
{

View File

@@ -193,7 +193,7 @@ $lang->dev->featureBar['langItem']['common'] = 'Common';
$lang->dev->featureBar['langItem']['first'] = 'First Menu';
$lang->dev->featureBar['langItem']['second'] = 'Second Menu';
$lang->dev->featureBar['langItem']['third'] = 'Third Menu';
$lang->dev->featureBar['langItem']['feature'] = 'Search Tab';
$lang->dev->featureBar['langItem']['tag'] = 'Search Tag';
$lang->dev->projectMenu['project'] = "{$lang->projectCommon} Common";
$lang->dev->projectMenu['scrum'] = "Scrum {$lang->projectCommon}";

View File

@@ -193,7 +193,7 @@ $lang->dev->featureBar['langItem']['common'] = 'Common';
$lang->dev->featureBar['langItem']['first'] = 'First Menu';
$lang->dev->featureBar['langItem']['second'] = 'Second Menu';
$lang->dev->featureBar['langItem']['third'] = 'Third Menu';
$lang->dev->featureBar['langItem']['feature'] = 'Search Tab';
$lang->dev->featureBar['langItem']['tag'] = 'Search Tag';
$lang->dev->projectMenu['project'] = "{$lang->projectCommon} Common";
$lang->dev->projectMenu['scrum'] = "Scrum {$lang->projectCommon}";

View File

@@ -193,7 +193,7 @@ $lang->dev->featureBar['langItem']['common'] = 'Common';
$lang->dev->featureBar['langItem']['first'] = 'First Menu';
$lang->dev->featureBar['langItem']['second'] = 'Second Menu';
$lang->dev->featureBar['langItem']['third'] = 'Third Menu';
$lang->dev->featureBar['langItem']['feature'] = 'Search Tab';
$lang->dev->featureBar['langItem']['tag'] = 'Search Tag';
$lang->dev->projectMenu['project'] = "{$lang->projectCommon} Common";
$lang->dev->projectMenu['scrum'] = "Scrum {$lang->projectCommon}";

View File

@@ -193,7 +193,7 @@ $lang->dev->featureBar['langItem']['common'] = '公共';
$lang->dev->featureBar['langItem']['first'] = '一级菜单';
$lang->dev->featureBar['langItem']['second'] = '二级菜单';
$lang->dev->featureBar['langItem']['third'] = '三级菜单';
$lang->dev->featureBar['langItem']['feature'] = '检索标签';
$lang->dev->featureBar['langItem']['tag'] = '检索标签';
$lang->dev->projectMenu['project'] = "{$lang->projectCommon}通用";
$lang->dev->projectMenu['scrum'] = "敏捷{$lang->projectCommon}";

View File

@@ -360,8 +360,8 @@ class devModel extends model
if(empty($language)) $language = $this->app->getClientLang();
$originalLangs = array();
$defaultLang = $this->loadDefaultLang($language);
if($type == 'feature' and in_array($module, $this->config->dev->projectMenus)) $module = 'project';
if($type == 'feature')
if($type == 'tag' and in_array($module, $this->config->dev->projectMenus)) $module = 'project';
if($type == 'tag')
{
$this->defaultLang = $defaultLang;
$defaultLang = $this->loadDefaultLang($language, $module);
@@ -379,7 +379,7 @@ class devModel extends model
$originalLangs['SRCommon'] = $this->lang->dev->SR;
if(!$this->config->URAndSR) unset($originalLangs['URCommon']);
}
elseif($type == 'feature')
elseif($type == 'tag')
{
$langKey = 'featureBar-' . $method . '_';
$featureBars = zget($defaultLang->$module->featureBar, $method, array());
@@ -465,7 +465,7 @@ class devModel extends model
$customeds = $this->loadModel('custom')->getItems("lang={$language}&module={$module}SubMenu&section=$method&vision={$this->config->vision}");
$langKey = "{$method}_";
break;
case 'feature':
case 'tag':
$method = str_replace('_', '-', $method);
$customeds = $this->loadModel('custom')->getItems("lang={$language}&module={$module}&section=featureBar-$method&vision={$this->config->vision}");
$langKey = "featureBar-{$method}_";
@@ -591,7 +591,7 @@ class devModel extends model
}
/**
* Get feature menus.
* Get tags.
*
* @param string $menu
* @param string $module
@@ -599,7 +599,7 @@ class devModel extends model
* @access public
* @return array
*/
public function getFeatureMenus($module, $moduleName = '', $methodName = '')
public function getTagMenus($module, $moduleName = '', $methodName = '')
{
$menus = array();
foreach(array('homeMenu', 'menu') as $menu)
@@ -722,10 +722,10 @@ class devModel extends model
$menuItem->children = array();
$childFunc = 'get' . ucfirst($type) . 'Menus';
if($type == 'feature' and in_array($menuKey, $this->config->dev->projectMenus))
if($type == 'tag' and in_array($menuKey, $this->config->dev->projectMenus))
{
if($menuKey != 'project') continue;
foreach($this->config->dev->projectMenus as $projectModule) $menuItem->children += $this->getFeatureMenus($projectModule, $module, $method);
foreach($this->config->dev->projectMenus as $projectModule) $menuItem->children += $this->getTagMenus($projectModule, $module, $method);
}
else
{
@@ -740,7 +740,7 @@ class devModel extends model
}
/* Unique menu tree by module and method. */
if($type == 'feature')
if($type == 'tag')
{
$methods = array();
foreach($menuTree as $index => $menuItem)