* Finish task#36497.

This commit is contained in:
qiyu-xie
2021-03-10 10:11:46 +08:00
parent d2734ecacc
commit b608fc809d
3 changed files with 37 additions and 6 deletions
+6 -5
View File
@@ -20,13 +20,14 @@ $isQa = $rawModule == 'qa';
<div id='mainHeader'>
<div class='container'>
<div id='heading'>
<?php if($isProduct) echo isset($lang->product->switcherMenu) ? $lang->product->switcherMenu : '';?>
<?php if($isQa) echo isset($lang->qa->switcherMenu) ? $lang->qa->switcherMenu : '';?>
<?php if($isProduct) echo isset($lang->product->switcherMenu) ? $lang->product->switcherMenu : '';?>
<?php if($isQa) echo isset($lang->qa->switcherMenu) ? $lang->qa->switcherMenu : '';?>
<?php if($this->config->systemMode == 'new'):?>
<?php if($isProgram) echo isset($lang->program->switcherMenu) ? $lang->program->switcherMenu : '';?>
<?php if($isProject) echo $this->loadModel('project')->getSwitcher($this->session->PRJ, $app->rawModule, $app->rawMethod);?>
<?php if($isProgram) echo isset($lang->program->switcherMenu) ? $lang->program->switcherMenu : '';?>
<?php if($isProject) echo $this->loadModel('project')->getSwitcher($this->session->PRJ, $app->rawModule, $app->rawMethod);?>
<?php if($isExecution) echo $this->execution->getSwitcher($this->session->execution, $app->rawModule, $app->rawMethod);?>
<?php elseif($this->config->systemMode == 'classic'):?>
<?php if($isProject) echo isset($lang->project->switcherMenu) ? $lang->project->switcherMenu : '';;?>
<?php if($isProject) echo isset($lang->project->switcherMenu) ? $lang->project->switcherMenu : '';;?>
<?php endif;?>
</div>
<nav id='navbar'><?php commonModel::printMainmenu($app->rawModule, $app->rawMethod);?></nav>
+31
View File
@@ -877,11 +877,42 @@ class executionModel extends model
*/
public function getMainAction($module, $method)
{
if($method == 'index' or $method == 'all') return;
$link = html::a(helper::createLink('execution', 'all'), "<i class='icon icon-list'></i>", '', "style='border: none;'");
$html = "<p style='padding-top:5px;'>" . $link . "</p>";
return common::hasPriv('execution', 'all') ? $html : '';
}
/*
* Get execution switcher.
*
* @param int $executionID
* @param string $currentModule
* @param string $currentMethod
* @access public
* @return string
*/
public function getSwitcher($executionID, $currentModule, $currentMethod)
{
$this->session->set('moreExecutionLink', $this->app->getURI(true));
$currentExecutionName = $this->lang->execution->common;
if($executionID)
{
$currentExecution = $this->getById($executionID);
$currentExecutionName = $currentExecution->name;
}
$dropMenuLink = helper::createLink('execution', 'ajaxGetDropMenu', "objectID=$executionID&module=$currentModule&method=$currentMethod&extra=");
$output = "<div class='btn-group header-angle-btn' id='swapper'><button data-toggle='dropdown' type='button' class='btn' id='currentItem' title='{$currentExecutionName}'><span class='text'><i class='icon icon-project'></i> {$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>";
return $output;
}
/**
* Get project pairs.
*
-1
View File
@@ -144,7 +144,6 @@ class projectModel extends model
{
$this->session->set('moreProjectLink', $this->app->getURI(true));
$this->loadModel('project');
$currentProjectName = $this->lang->project->common;
if($projectID)
{