* Finish add left top btn task.

This commit is contained in:
Yagami
2021-03-23 11:44:58 +08:00
parent 0a7fe481aa
commit 50fe4e5033
29 changed files with 73 additions and 95 deletions

View File

@@ -9,7 +9,6 @@
* @version $Id: en.php 4460 2013-02-26 02:28:02Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
$lang->admin->common = 'Admin';
$lang->admin->index = 'Admin Home';
$lang->admin->checkDB = 'Datenbank prüfen';
$lang->admin->sso = 'SSO';

View File

@@ -9,7 +9,6 @@
* @version $Id: en.php 4460 2013-02-26 02:28:02Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
$lang->admin->common = 'Admin';
$lang->admin->index = 'Admin Home';
$lang->admin->checkDB = 'Check Database';
$lang->admin->sso = 'Zdoo';

View File

@@ -9,7 +9,6 @@
* @version $Id: en.php 4460 2013-02-26 02:28:02Z chencongzhi520@gmail.com $
* @link https://www.zentao.pm
*/
$lang->admin->common = 'Admin';
$lang->admin->index = 'Admin Home';
$lang->admin->checkDB = 'Check Database';
$lang->admin->sso = 'Zdoo';

View File

@@ -9,7 +9,6 @@
* @version $Id: vi.php 4460 2013-02-26 02:28:02Z quocnho@gmail.com $
* @link http://www.zentao.net
*/
$lang->admin->common = 'Quản trị';
$lang->admin->index = 'Trang quản trị';
$lang->admin->checkDB = 'Kiểm tra CSDL';
$lang->admin->sso = 'Zdoo';

View File

@@ -9,7 +9,6 @@
* @version $Id: zh-cn.php 4767 2013-05-05 06:10:13Z wwccss $
* @link http://www.zentao.net
*/
$lang->admin->common = '后台管理';
$lang->admin->index = '后台管理首页';
$lang->admin->checkDB = '检查数据库';
$lang->admin->sso = 'ZDOO集成';

View File

@@ -1,4 +1,17 @@
<?php
$lang->navIcons = array();
$lang->navIcons['my'] = "<i class='icon icon-menu-my'></i>";
$lang->navIcons['program'] = "<i class='icon icon-program'></i>";
$lang->navIcons['product'] = "<i class='icon icon-product'></i>";
$lang->navIcons['project'] = "<i class='icon icon-project'></i>";
$lang->navIcons['execution'] = "<i class='icon icon-run'></i>";
$lang->navIcons['qa'] = "<i class='icon icon-test'></i>";
$lang->navIcons['devops'] = "<i class='icon icon-code1'></i>";
$lang->navIcons['doc'] = "<i class='icon icon-doc'></i>";
$lang->navIcons['report'] = "<i class='icon icon-statistic'></i>";
$lang->navIcons['system'] = "<i class='icon icon-group'></i>";
$lang->navIcons['admin'] = "<i class='icon icon-cog-outline'></i>";
global $config;
list($programModule, $programMethod) = explode('-', $config->programLink);
list($productModule, $productMethod) = explode('-', $config->productLink);
@@ -7,18 +20,18 @@ list($executionModule, $executionMethod) = explode('-', $config->executionLink);
/* Main Navigation. */
$lang->mainNav = new stdclass();
$lang->mainNav->my = "<i class='icon icon-menu-my'></i> {$lang->my->shortCommon}|my|index|";
if($config->systemMode == 'new') $lang->mainNav->program = "<i class='icon icon-program'></i> {$lang->program->common}|$programModule|$programMethod|";
$lang->mainNav->product = "<i class='icon icon-product'></i> {$lang->product->common}|$productModule|$productMethod|";
if($config->systemMode == 'new') $lang->mainNav->project = "<i class='icon icon-project'></i> {$lang->project->common}|$projectModule|$projectMethod|";
$lang->mainNav->my = "{$lang->navIcons['my']} {$lang->my->shortCommon}|my|index|";
if($config->systemMode == 'new') $lang->mainNav->program = "{$lang->navIcons['program']} {$lang->program->common}|$programModule|$programMethod|";
$lang->mainNav->product = "{$lang->navIcons['product']} {$lang->product->common}|$productModule|$productMethod|";
if($config->systemMode == 'new') $lang->mainNav->project = "{$lang->navIcons['project']} {$lang->project->common}|$projectModule|$projectMethod|";
$lang->mainNav->execution = "<i class='icon icon-run'></i> {$lang->execution->common}|$executionModule|$executionMethod|";
$lang->mainNav->qa = "<i class='icon icon-test'></i> {$lang->qa->common}|qa|index|";
$lang->mainNav->devops = "<i class='icon icon-code1'></i> DevOps|repo|browse|";
$lang->mainNav->doc = "<i class='icon icon-doc'></i> {$lang->doc->common}|doc|index|";
$lang->mainNav->report = "<i class='icon icon-statistic'></i> {$lang->report->common}|report|productSummary|";
$lang->mainNav->system = "<i class='icon icon-group'></i> {$lang->system->common}|my|team|";
$lang->mainNav->admin = "<i class='icon icon-cog-outline'></i> {$lang->admin->common}|admin|index|";
$lang->mainNav->execution = "{$lang->navIcons['execution']} {$lang->execution->common}|$executionModule|$executionMethod|";
$lang->mainNav->qa = "{$lang->navIcons['qa']} {$lang->qa->common}|qa|index|";
$lang->mainNav->devops = "{$lang->navIcons['devops']} DevOps|repo|browse|";
$lang->mainNav->doc = "{$lang->navIcons['doc']} {$lang->doc->common}|doc|index|";
$lang->mainNav->report = "{$lang->navIcons['report']} {$lang->report->common}|report|productSummary|";
$lang->mainNav->system = "{$lang->navIcons['system']} {$lang->system->common}|my|team|";
$lang->mainNav->admin = "{$lang->navIcons['admin']} {$lang->admin->common}|admin|index|";
$lang->dividerMenu = ',devops,system,';
$lang->mainNav->menuOrder[5] = 'my';
@@ -457,7 +470,6 @@ $lang->subject->menu = new stdclass();
$lang->subject->menu->storyConcept = array('link' => "{$lang->subject->storyConcept}|custom|browsestoryconcept|");
/* System menu. */
$lang->system = new stdclass();
$lang->system->menu = new stdclass();
$lang->system->menu->team = array('link' => "{$lang->team->common}|my|team|", 'subModule' => 'user');
$lang->system->menu->dynamic = array('link' => "$lang->dynamic|company|dynamic|");

View File

@@ -126,13 +126,13 @@ $lang->assignedToAB = '指派';
$lang->typeAB = '类型';
$lang->common->common = '公有模块';
$lang->my->common = '我的地盘';
$lang->my->common = '地盘';
$lang->program->common = '项目集';
$lang->product->common = '产品';
$lang->project->common = '项目';
$lang->execution->common = $config->systemMode == 'new' ? '执行' : $lang->executionCommon;
$lang->qa->common = '测试';
$lang->devops->common = '代码';
$lang->devops->common = 'DevOps';
$lang->doc->common = '文档';
$lang->report->common = '统计';
$lang->system->common = '组织';

View File

@@ -570,6 +570,43 @@ class commonModel extends model
}
}
/**
* Print upper left corner home button.
*
* @param string $openApp
* @static
* @access public
* @return void
*/
public static function printHomeButton($openApp)
{
global $lang;
if(!$openApp) return;
$icon = zget($lang->navIcons, $openApp, '');
$module = $openApp;
$method = 'index';
if($openApp == 'devops')
{
$module = 'repo';
$method = 'browse';
}
if($openApp == 'program' or $openApp == 'project') $method = 'browse';
if($openApp == 'product') $method = 'all';
if($openApp == 'system')
{
$module = 'my';
$method = 'team';
}
$link = $openApp != 'execution' ? helper::createLink($module, $method) : '';
$html = $link ? html::a($link, "$icon {$lang->$openApp->common}", '', "class='btn'") : "$icon {$lang->$openApp->common}";
echo "<div class='btn-group header-btn'>" . $html . '</div>';
}
/**
* Get main nav items list
*

View File

@@ -10,7 +10,10 @@ include 'chosen.html.php';
<header id='header'>
<div id='mainHeader'>
<div class='container'>
<div id='heading'><?php echo isset($lang->switcherMenu) ? $lang->switcherMenu : '';?></div>
<div id='heading'>
<?php common::printHomeButton($app->openApp);?>
<?php echo isset($lang->switcherMenu) ? $lang->switcherMenu : '';?>
</div>
<nav id='navbar'><?php $activeMenu = commonModel::printMainMenu();?></nav>
</div>
</div>

View File

@@ -43,8 +43,6 @@ class doc extends control
$this->from = 'doc';
setcookie('from', 'doc', $this->config->cookieLife, $this->config->webRoot, '', false, true);
$this->doc->setMenu();
$this->session->set('docList', $this->app->getURI(true));
$this->app->loadClass('pager', $static = true);
$pager = new pager(0, 5, 1);
@@ -122,7 +120,6 @@ class doc extends control
else
{
$menuType = (!$type && (in_array($browseType, array_keys($this->lang->doc->fastMenuList)) || $browseType == 'bysearch')) ? $browseType : $type;
$this->doc->setMenu();
}
$this->session->set('docList', $this->app->getURI(true));
@@ -346,10 +343,6 @@ class doc extends control
$this->lang->TRActions = common::hasPriv('doc', 'createLib') ? html::a(helper::createLink('doc', 'createLib'), "<i class='icon icon-plus'></i> " . $this->lang->doc->createlib, '', "class='btn btn-secondary iframe' data-width='70%'") : '';
}
else
{
$this->doc->setMenu();
}
$this->view->title = $lib->name . $this->lang->colon . $this->lang->doc->create;
$this->view->position[] = html::a($this->createLink('doc', 'browse', "libID=$libID"), $lib->name);
@@ -418,10 +411,6 @@ class doc extends control
{
$this->project->setMenu($lib->project);
}
else
{
$this->doc->setMenu();
}
/* Set my menu. */
if($this->app->openApp == 'my')
@@ -480,11 +469,6 @@ class doc extends control
{
$this->project->setMenu($lib->project);
}
else
{
/* Set menu. */
$this->doc->setMenu();
}
$this->view->title = "DOC #$doc->id $doc->title - " . $lib->name;
$this->view->position[] = html::a($this->createLink('doc', 'browse', "libID=$doc->lib"), $lib->name);
@@ -736,8 +720,6 @@ class doc extends control
$this->view->title = $libName;
$this->view->position[] = $libName;
$this->doc->setMenu();
/* Load pager. */
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
@@ -819,8 +801,6 @@ class doc extends control
$executionID = $objectID;
if(!$this->executionID->checkPriv($objectID)) $this->accessDenied();
}
$this->doc->setMenu();
}
/* Load pager. */
@@ -880,17 +860,7 @@ class doc extends control
if(empty($object)) $this->locate($this->createLink($type, 'create', '', '', '', $this->session->project));
$from = $this->app->openApp;
if($from == 'doc')
{
$crumb = html::a(inlink('allLibs', "type=$type"), $type == 'product' ? $this->lang->productCommon : $this->lang->executionCommon) . $this->lang->doc->separator;
if($this->productID and $type == 'execution') $crumb = $this->doc->getProductCrumb($this->productID, $objectID);
$crumb .= html::a(inlink('objectLibs', "type=$type&objectID=$objectID"), $object->name);
$productID = $type == 'product' ? $objectID : 0;
$executionID = $type == 'execution' ? $objectID : 0;
$this->doc->setMenu();
}
elseif($from == 'execution')
if($from == 'execution')
{
$this->execution->setMenu($objectID);
}

View File

@@ -13,17 +13,6 @@
<?php
class docModel extends model
{
/**
* Set menu.
*
* @access public
* @return void
*/
public function setMenu()
{
$this->lang->switcherMenu = "<div class='btn-group header-btn'>" . html::a(helper::createLink('doc', 'index'), "<i class='icon icon-doc'></i> {$this->lang->doc->common}", '', "class='btn'") . '</div>';
}
/**
* Get library by id.
*

View File

@@ -851,8 +851,7 @@ class executionModel extends model
}
$dropMenuLink = helper::createLink('execution', 'ajaxGetDropMenu', "executionID=$executionID&module=$currentModule&method=$currentMethod&extra=");
$output = "<div class='btn-group header-btn'><i class='icon icon-run'></i> {$this->lang->execution->common}</div> ";
$output .= "<div class='btn-group header-btn' id='swapper'><button data-toggle='dropdown' type='button' class='btn' id='currentItem' title='{$currentExecutionName}'><span class='text'>{$currentExecutionName}</span> <span class='caret'></span></button><div id='dropMenu' class='dropdown-menu search-list' data-ride='searchList' data-url='$dropMenuLink'>";
$output = "<div class='btn-group header-btn' id='swapper'><button data-toggle='dropdown' type='button' class='btn' id='currentItem' title='{$currentExecutionName}'><span class='text'>{$currentExecutionName}</span> <span class='caret'></span></button><div id='dropMenu' class='dropdown-menu search-list' data-ride='searchList' data-url='$dropMenuLink'>";
$output .= '<div class="input-control search-box has-icon-left has-icon-right search-example"><input type="search" class="form-control search-input" /><label class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label><a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a></div>';
$output .= "</div></div>";

View File

@@ -1,8 +1,6 @@
<?php
global $config;
$lang->my->common = 'Dashboard';
/* Method List。*/
$lang->my->index = 'Home';
$lang->my->todo = 'My Todos';

View File

@@ -1,8 +1,6 @@
<?php
global $config;
$lang->my->common = 'Dashboard';
/* Method List。*/
$lang->my->index = 'Home';
$lang->my->todo = 'My Todos';

View File

@@ -1,8 +1,6 @@
<?php
global $config;
$lang->my->common = 'Dashboard';
/* Method List。*/
$lang->my->index = 'Home';
$lang->my->todo = 'My Todos';

View File

@@ -1,8 +1,6 @@
<?php
global $config;
$lang->my->common = 'Dashboard';
/* Method List。*/
$lang->my->index = 'Home';
$lang->my->todo = 'My Todos';

View File

@@ -1,8 +1,6 @@
<?php
global $config;
$lang->my->common = '我的地盘';
/* 方法列表。*/
$lang->my->index = '首页';
$lang->my->todo = '我的待办';

View File

@@ -9,7 +9,6 @@
* @version $Id: en.php 5091 2013-07-10 06:06:46Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
$lang->product->common = $lang->productCommon;
$lang->product->index = $lang->productCommon . 'Home';
$lang->product->browse = 'Story Liste';
$lang->product->dynamic = 'Verlauf';

View File

@@ -9,7 +9,6 @@
* @version $Id: en.php 5091 2013-07-10 06:06:46Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
$lang->product->common = $lang->productCommon;
$lang->product->index = $lang->productCommon . ' Home';
$lang->product->browse = 'Story List';
$lang->product->dynamic = 'Dynamics';

View File

@@ -9,7 +9,6 @@
* @version $Id: en.php 5091 2013-07-10 06:06:46Z chencongzhi520@gmail.com $
* @link https://www.zentao.pm
*/
$lang->product->common = $lang->productCommon;
$lang->product->index = 'Accueil ' . $lang->productCommon;
$lang->product->browse = 'Liste Stories';
$lang->product->dynamic = 'Historique';

View File

@@ -9,7 +9,6 @@
* @version $Id: vi.php 5091 2013-07-10 06:06:46Z quocnho@gmail.com $
* @link http://www.zentao.net
*/
$lang->product->common = $lang->productCommon;
$lang->product->index = 'Trang '.$lang->productCommon;
$lang->product->browse = 'Danh sách câu chuyện';
$lang->product->dynamic = 'Lịch sử';

View File

@@ -9,7 +9,6 @@
* @version $Id: zh-cn.php 5091 2013-07-10 06:06:46Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
$lang->product->common = $lang->productCommon . '视图';
$lang->product->index = $lang->productCommon . '主页';
$lang->product->browse = "{$lang->SRCommon}列表";
$lang->product->dynamic = $lang->productCommon . '动态';

View File

@@ -441,8 +441,7 @@ class productModel extends model
$fromModule = $this->lang->navGroup->qa == 'qa' ? 'qa' : '';
$dropMenuLink = helper::createLink('product', 'ajaxGetDropMenu', "objectID=$productID&module=$currentModule&method=$currentMethod&extra=$extra&from=$fromModule");
$output = $this->app->openApp == 'product' ? "<div class='btn-group header-btn'>" . html::a(helper::createLink('product', 'all'), "<i class='icon icon-product'></i> {$this->lang->productCommon}", '', "class='btn'") . '</div>' : '';
$output .= "<div class='btn-group header-btn' id='swapper'><button data-toggle='dropdown' type='button' class='btn' id='currentItem' title='{$currentProductName}'><span class='text'>{$currentProductName}</span> <span class='caret' style='margin-top: 3px'></span></button><div id='dropMenu' class='dropdown-menu search-list' data-ride='searchList' data-url='$dropMenuLink'>";
$output = "<div class='btn-group header-btn' id='swapper'><button data-toggle='dropdown' type='button' class='btn' id='currentItem' title='{$currentProductName}'><span class='text'>{$currentProductName}</span> <span class='caret' style='margin-top: 3px'></span></button><div id='dropMenu' class='dropdown-menu search-list' data-ride='searchList' data-url='$dropMenuLink'>";
$output .= '<div class="input-control search-box has-icon-left has-icon-right search-example"><input type="search" class="form-control search-input" /><label class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label><a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a></div>';
$output .= "</div></div>";

View File

@@ -393,8 +393,7 @@ class programModel extends model
}
$dropMenuLink = helper::createLink('program', 'ajaxGetDropMenu', "objectID=$programID&module=$currentModule&method=$currentMethod");
$output = "<div class='btn-group header-btn'>" . html::a(helper::createLink('program', 'browse'), "<i class='icon icon-program'></i> {$this->lang->program->common}", '', "class='btn'") . '</div>';
$output .= "<div class='btn-group header-btn' id='swapper'><button data-toggle='dropdown' type='button' class='btn' id='currentItem' title='{$currentProgramName}'><span class='text'>{$currentProgramName}</span> <span class='caret'></span></button><div id='dropMenu' class='dropdown-menu search-list' data-ride='searchList' data-url='$dropMenuLink'>";
$output = "<div class='btn-group header-btn' id='swapper'><button data-toggle='dropdown' type='button' class='btn' id='currentItem' title='{$currentProgramName}'><span class='text'>{$currentProgramName}</span> <span class='caret'></span></button><div id='dropMenu' class='dropdown-menu search-list' data-ride='searchList' data-url='$dropMenuLink'>";
$output .= '<div class="input-control search-box has-icon-left has-icon-right search-example"><input type="search" class="form-control search-input" /><label class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label><a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a></div>'; $output .= "</div></div>";
return $output;

View File

@@ -148,8 +148,7 @@ class projectModel extends model
}
$dropMenuLink = helper::createLink('project', 'ajaxGetDropMenu', "objectID=$projectID&module=$currentModule&method=$currentMethod");
$output = "<div class='btn-group header-btn'>" . html::a(helper::createLink('project', 'browse'), "<i class='icon icon-project'></i> {$this->lang->project->common}", '', "class='btn'") . '</div>';
$output .= "<div class='btn-group header-btn' id='swapper'><button data-toggle='dropdown' type='button' class='btn' id='currentItem' title='{$currentProjectName}'><span class='text'>{$currentProjectName}</span> <span class='caret'></span></button><div id='dropMenu' class='dropdown-menu search-list' data-ride='searchList' data-url='$dropMenuLink'>";
$output = "<div class='btn-group header-btn' id='swapper'><button data-toggle='dropdown' type='button' class='btn' id='currentItem' title='{$currentProjectName}'><span class='text'>{$currentProjectName}</span> <span class='caret'></span></button><div id='dropMenu' class='dropdown-menu search-list' data-ride='searchList' data-url='$dropMenuLink'>";
$output .= '<div class="input-control search-box has-icon-left has-icon-right search-example"><input type="search" class="form-control search-input" /><label class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label><a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a></div>';
$output .= "</div></div>";

View File

@@ -38,8 +38,7 @@ class qaModel extends model
$productIndex .= $selectHtml;
}
$this->lang->switcherMenu = "<div class='btn-group header-btn'>" . html::a(helper::createLink('qa', 'index'), "<i class='icon icon-test'></i> {$this->lang->qa->common}", '', "class='btn'") . '</div>';
if(!in_array($this->app->rawModule, $this->config->qa->noDropMenuModule)) $this->lang->switcherMenu .= $this->product->getSwitcher($productID, $extra, $branch);
if(!in_array($this->app->rawModule, $this->config->qa->noDropMenuModule)) $this->lang->switcherMenu = $this->product->getSwitcher($productID, $extra, $branch);
common::setMenuVars('qa', $productID);
}

View File

@@ -29,9 +29,6 @@ class report extends control
{
parent::__construct();
/* Set report menu. */
$this->report->setMenu();
/* Set report menu group. */
$this->projectID = isset($_GET['project']) ? $_GET['project'] : 0;
if(!$this->projectID) $this->lang->navGroup->report = 'report';

View File

@@ -13,10 +13,6 @@
<?php
class reportModel extends model
{
public function setMenu()
{
$this->lang->switcherMenu = "<div class='btn-group header-btn'>" . html::a(helper::createLink('report', 'productsummary'), "<i class='icon icon-statistic'></i> {$this->lang->report->common}", '', "class='btn'") . '</div>';
}
/**
* Compute percent of every item.
*

View File

@@ -161,7 +161,6 @@ class tree extends control
if($from == 'doc') $this->lang->navGroup->doc = 'doc';
$type = $lib->product ? 'product' : ($lib->execution ? 'project' : 'custom');
$this->doc->setMenu($type, $rootID, $currentModuleID);
$this->lang->tree->menu = $this->lang->doc->menu;
$this->lang->tree->menuOrder = $this->lang->doc->menuOrder;