* Fix system menu header.

This commit is contained in:
Yagami
2020-08-26 09:23:01 +08:00
parent 05b1ffeb32
commit 77cf55dd79
4 changed files with 26 additions and 8 deletions
+19
View File
@@ -361,6 +361,25 @@ class customModel extends model
return $allMenu ? self::setMenuByConfig($allMenu, $customMenu) : null;
}
/**
* Get system swapper.
* @param string $module
* @param string $method
* @access public
* @return array
*/
public function getSwapper()
{
$current = (isset($_COOKIE['systemModel']) and $_COOKIE['systemModel'] == 'scrum') ? 'scrum' : 'cmmi';
$link = (isset($_COOKIE['systemModel']) and $_COOKIE['systemModel'] == 'scrum') ? html::a(helper::createLink('custom', 'setcmmi'), 'CMMI') : html::a(helper::createLink('custom', 'setscrum'), 'SCRUM');
$output = "<div class='btn-group' id='swapper'><button data-toggle='dropdown' type='button' class='btn btn-limit' title='{$current}'>{$current} <i class='icon icon-swap'></i></button>";
$output .= "<ul class='dropdown-menu'><li>" . $link . "</li></ul>";
$output .= "</div>";
return $output;
}
/**
* Merge shortcut query in featureBar.
*