* @package execution * @link https://www.zentao.net */ namespace zin; h::css('#mainNavbar .main-navbar-right {position: absolute; right: 2.5rem; top: 0.5rem;}#mainNavbar .main-navbar-right .btn {padding: 0.5rem;}'); $currentModule = $app->rawModule; $currentMethod = $app->rawMethod; $config->hasMainNavBar = array("{$currentModule}-{$currentMethod}"); $dropdownItems = array(); foreach($lang->execution->menu as $menuKey => $menu) { $active = $menuKey == $currentMethod; $dropdownItems[] = array('icon' => $lang->execution->icons[$menuKey], 'text' => $menu['name'], 'url' => createLink($menu['module'], $menu['method'], $menu['vars']), 'active' => $active); } mainNavbar ( to::left ( zui::dropmenu ( setID("execution-menu"), set('_id', 'switcher'), set(array('text' => $execution->name, 'fetcher' => createLink('execution', 'ajaxGetExecutionSwitcherMenu', "projectID={$execution->project}&executionID={$execution->id}&method={$currentMethod}"), 'defaultValue' => $execution->id)) ) ), to::right ( dropdown ( btn( setClass('ghost btn square btn-default absolute right-0'), set::icon($lang->execution->icons[$currentMethod]), span ( setClass('pl-1'), $lang->execution->menu->{$currentMethod}['name'] ) ), set::placement('bottom-end'), set::items($dropdownItems) ) ) );