浏览代码

N°1029 Allowed portals are now displayed in the console user menu.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4901 a333f486-631f-4898-b8df-5754b55c2be0
glajarige 7 年之前
父节点
当前提交
5bd57408c6
共有 1 个文件被更改,包括 17 次插入0 次删除
  1. 17 0
      application/itopwebpage.class.inc.php

+ 17 - 0
application/itopwebpage.class.inc.php

@@ -1033,6 +1033,23 @@ EOF
 			$sLogOffMenu .= "<li><span>$sLogonMessage</span></li>\n";
 			$sLogOffMenu .= "<li><span>$sLogonMessage</span></li>\n";
 			$aActions = array();
 			$aActions = array();
 
 
+            $aAllowedPortals = UserRights::GetAllowedPortals();
+            if(count($aAllowedPortals) > 1)
+            {
+                // Adding portals
+                foreach($aAllowedPortals as $aAllowedPortal)
+                {
+                    if($aAllowedPortal['id'] !== 'backoffice')
+                    {
+                        $oPortalMenuItem = new URLPopupMenuItem('portal:'.$aAllowedPortal['id'], Dict::S($aAllowedPortal['label']), $aAllowedPortal['url'], '_blank');
+                        $aActions[$oPortalMenuItem->GetUID()] = $oPortalMenuItem->GetMenuItem();
+                    }
+                }
+                // Adding a separator
+                $oPortalSeparatorMenuItem = new SeparatorPopupMenuItem();
+                $aActions[$oPortalSeparatorMenuItem->GetUID()] = $oPortalSeparatorMenuItem->GetMenuItem();
+            }
+
 			$oPrefs = new URLPopupMenuItem('UI:Preferences', Dict::S('UI:Preferences'), utils::GetAbsoluteUrlAppRoot()."pages/preferences.php?".$oAppContext->GetForLink());
 			$oPrefs = new URLPopupMenuItem('UI:Preferences', Dict::S('UI:Preferences'), utils::GetAbsoluteUrlAppRoot()."pages/preferences.php?".$oAppContext->GetForLink());
 			$aActions[$oPrefs->GetUID()] = $oPrefs->GetMenuItem();
 			$aActions[$oPrefs->GetUID()] = $oPrefs->GetMenuItem();