* Modify kanban feature bar language.

This commit is contained in:
caoyanyi
2023-03-03 14:46:56 +08:00
parent a42b9ed4c0
commit f2c4d28c5e
9 changed files with 53 additions and 29 deletions
@@ -20,15 +20,10 @@
<ul class='nav'>
<?php
$methodName = strtolower($this->app->getMethodName());
foreach($lang->attend->featurebar as $key => $menu)
foreach($lang->attend->featureBar['personal'] as $type => $name)
{
if(is_string($menu)) $link = $menu;
if(is_array($menu)) $link = $menu['link'];
list($name, $currentModule, $currentMethod, $params) = explode('|', $link);
$class = strtolower($key) == $methodName ? "class='active'" : '';
if(isset($menu['alias'])) $class = strpos(strtolower($menu['alias']), strtolower($key)) !== false ? "class='active'" : $class;
if(common::hasPriv($currentModule, $currentMethod)) echo "<li id='$key' $class>" . html::a($this->createLink($currentModule, $currentMethod, $params), $name) . '</li>';
$class = strtolower($type) == $methodName ? "class='active'" : '';
if(common::hasPriv('attend', $type)) echo "<li id='$type' $class>" . html::a($this->createLink('attend', $type), $name) . '</li>';
}
?>
</ul>
+2
View File
@@ -293,3 +293,5 @@ if(!helper::hasFeature('auditplan')) $config->dev->skipMenus['execution']['au
if(!helper::hasFeature('meeting')) $config->dev->skipMenus['execution']['meeting'] = 'otherDropMenu_meeting';
$config->dev->liteTagMethod['my-contribute'] = 'contribute_task';
$config->dev->onlyMainMenu = array('kanban');
+27
View File
@@ -672,6 +672,7 @@ class devModel extends model
$menus = array();
if($this->config->vision == 'lite' and $module == 'execution') return $menus;
$titleList = array();
foreach(array('homeMenu', 'menu') as $menu)
{
if(!isset($this->lang->$module->$menu)) continue;
@@ -694,6 +695,8 @@ class devModel extends model
list($thisModule, $thisMethod) = $this->config->dev->linkMethods[$module]["{$thisModule}-{$thisMethod}"];
}
$titleList[] = $label;
$subMenu = new stdclass();
$subMenu->title = $label;
$subMenu->key = '';
@@ -727,6 +730,8 @@ class devModel extends model
$this->app->loadLang($thisModule);
if(isset($this->lang->$thisModule->featureBar[$menuKey][$subMenuKey]))
{
$titleList[] = $label;
$thirdMenu = new stdClass();
$thirdMenu->title = $label;
$thirdMenu->key = '';
@@ -746,6 +751,8 @@ class devModel extends model
if(is_array($this->lang->$thisModule->featureBar[$thisMethod][$arrayKey])) continue;
}
$titleList[] = $label;
$subMenu = new stdClass();
$subMenu->title = $label;
$subMenu->key = '';
@@ -765,6 +772,26 @@ class devModel extends model
}
}
if(in_array($module, $this->config->dev->onlyMainMenu))
{
$mainNav = strip_tags($this->lang->mainNav->$module);
list($label, $thisModule, $thisMethod) = explode('|', $mainNav);
$titleList[] = $label;
$subMenu = new stdClass();
$subMenu->title = $label;
$subMenu->key = '';
$subMenu->module = $thisModule;
$subMenu->method = $thisMethod;
$subMenu->active = ($methodName == $thisMethod and $moduleName == $thisModule) ? 1 : 0;
$subMenu->children = array();
$menus[] = $subMenu;
}
$titlePinYin = common::convert2Pinyin($titleList);
foreach($menus as &$menu) $menu->key = zget($titlePinYin, $menu->title, '');
return $menus;
}
+4 -4
View File
@@ -60,11 +60,11 @@ class kanban extends control
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
}
unset($this->lang->kanbanspace->featureBar['involved']);
unset($this->lang->kanban->featureBar['space']['involved']);
$this->view->users = $this->loadModel('user')->getPairs('noclosed|nodeleted');
$this->view->type = $type;
$this->view->typeList = $this->lang->kanbanspace->featureBar;
$this->view->typeList = $this->lang->kanban->featureBar['space'];
$this->display();
}
@@ -232,7 +232,7 @@ class kanban extends control
$spaceID = $copyKanban->space;
}
unset($this->lang->kanbanspace->featureBar['involved']);
unset($this->lang->kanban->featureBar['space']['involved']);
$space = $this->kanban->getSpaceById($spaceID);
$spaceUsers = $spaceID == 0 ? ',' : trim($space->owner) . ',' . trim($space->team);
@@ -245,7 +245,7 @@ class kanban extends control
$this->view->spaceID = $spaceID;
$this->view->spacePairs = $spacePairs;
$this->view->type = $type;
$this->view->typeList = $this->lang->kanbanspace->featureBar;
$this->view->typeList = $this->lang->kanban->featureBar['space'];
$this->view->kanbans = array('' => '') + $this->kanban->getPairs();
$this->view->copyKanbanID = $copyKanbanID;
$this->view->copyKanban = $copyKanbanID ? $copyKanban : '';
+4 -4
View File
@@ -315,10 +315,10 @@ $lang->kanbanspace->empty = 'No Space';
$lang->kanbanspace->aclList['open'] = 'Open (Accessible with kanban view permissions)';
$lang->kanbanspace->aclList['private'] = 'Private (For the space owner, team and whitelist members only)';
$lang->kanbanspace->featureBar['involved'] = 'Involved';
$lang->kanbanspace->featureBar['cooperation'] = 'Cooperation Space';
$lang->kanbanspace->featureBar['public'] = 'Public Space';
$lang->kanbanspace->featureBar['private'] = 'Private Space';
$lang->kanban->featureBar['space']['involved'] = 'Involved';
$lang->kanban->featureBar['space']['cooperation'] = 'Cooperation Space';
$lang->kanban->featureBar['space']['public'] = 'Public Space';
$lang->kanban->featureBar['space']['private'] = 'Private Space';
$lang->kanbanspace->typeList['cooperation'] = 'Cooperation Space';
$lang->kanbanspace->typeList['public'] = 'Public Space';
+4 -4
View File
@@ -315,10 +315,10 @@ $lang->kanbanspace->empty = 'No Space';
$lang->kanbanspace->aclList['open'] = 'Open (Accessible with kanban view permissions)';
$lang->kanbanspace->aclList['private'] = 'Private (For the space owner, team and whitelist members only)';
$lang->kanbanspace->featureBar['involved'] = 'Involved';
$lang->kanbanspace->featureBar['cooperation'] = 'Cooperation Space';
$lang->kanbanspace->featureBar['public'] = 'Public Space';
$lang->kanbanspace->featureBar['private'] = 'Private Space';
$lang->kanban->featureBar['space']['involved'] = 'Involved';
$lang->kanban->featureBar['space']['cooperation'] = 'Cooperation Space';
$lang->kanban->featureBar['space']['public'] = 'Public Space';
$lang->kanban->featureBar['space']['private'] = 'Private Space';
$lang->kanbanspace->typeList['cooperation'] = 'Cooperation Space';
$lang->kanbanspace->typeList['public'] = 'Public Space';
+4 -4
View File
@@ -315,10 +315,10 @@ $lang->kanbanspace->empty = 'No Space';
$lang->kanbanspace->aclList['open'] = 'Open (Accessible with kanban view permissions)';
$lang->kanbanspace->aclList['private'] = 'Private (For the space owner, team and whitelist members only)';
$lang->kanbanspace->featureBar['involved'] = 'Involved';
$lang->kanbanspace->featureBar['cooperation'] = 'Cooperation Space';
$lang->kanbanspace->featureBar['public'] = 'Public Space';
$lang->kanbanspace->featureBar['private'] = 'Private Space';
$lang->kanban->featureBar['space']['involved'] = 'Involved';
$lang->kanban->featureBar['space']['cooperation'] = 'Cooperation Space';
$lang->kanban->featureBar['space']['public'] = 'Public Space';
$lang->kanban->featureBar['space']['private'] = 'Private Space';
$lang->kanbanspace->typeList['cooperation'] = 'Cooperation Space';
$lang->kanbanspace->typeList['public'] = 'Public Space';
+4 -4
View File
@@ -315,10 +315,10 @@ $lang->kanbanspace->empty = '暂时没有空间';
$lang->kanbanspace->aclList['open'] = '公开(有看板空间视图权限即可访问)';
$lang->kanbanspace->aclList['private'] = '私有(只有看板空间负责人、团队成员、白名单可访问)';
$lang->kanbanspace->featureBar['involved'] = '我参与的';
$lang->kanbanspace->featureBar['cooperation'] = '协作空间';
$lang->kanbanspace->featureBar['public'] = '公共空间';
$lang->kanbanspace->featureBar['private'] = '私人空间';
$lang->kanban->featureBar['space']['involved'] = '我参与的';
$lang->kanban->featureBar['space']['cooperation'] = '协作空间';
$lang->kanban->featureBar['space']['public'] = '公共空间';
$lang->kanban->featureBar['space']['private'] = '私人空间';
$lang->kanbanspace->typeList['cooperation'] = '协作空间';
$lang->kanbanspace->typeList['public'] = '公共空间';
+1 -1
View File
@@ -13,7 +13,7 @@
<?php include '../../common/view/header.html.php';?>
<div id="mainMenu" class="clearfix table-row">
<div class="btn-toolBar pull-left">
<?php foreach($lang->kanbanspace->featureBar as $key => $label):?>
<?php foreach($lang->kanban->featureBar['space'] as $key => $label):?>
<?php $active = $browseType == $key ? 'btn-active-text' : '';?>
<?php $label = "<span class='text'>$label</span>";?>
<?php if($browseType == $key) $label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";?>