Explorar el Código

- Renaming of the WebPage class (and its derived classes) to stick to the same naming convention as other classes.
- Preserve the context (i.e. the current menu) when switching organizations

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@251 a333f486-631f-4898-b8df-5754b55c2be0

dflaven hace 15 años
padre
commit
729ea76f91
Se han modificado 1 ficheros con 7 adiciones y 2 borrados
  1. 7 2
      application/itopwebpage.class.inc.php

+ 7 - 2
application/itopwebpage.class.inc.php

@@ -5,7 +5,7 @@ require_once("../application/applicationcontext.class.inc.php");
 /**
  * Web page with some associated CSS and scripts (jquery) for a fancier display
  */
-class iTopWebPage extends nice_web_page
+class iTopWebPage extends NiceWebPage
 {
 	private $m_sMenu;
 	private $m_currentOrganization;
@@ -156,7 +156,12 @@ EOF
 			}
 			$this->AddToMenu("<option value=\"".$oOrg->GetKey()."\"$sSelected>".$oOrg->Get('name')."</option>\n");
 		}
-		$this->AddToMenu("</select></form>\n");
+		$this->AddToMenu("</select>\n");
+		// Add other dimensions/context information to this form
+		$oAppContext = new ApplicationContext();
+		$oAppContext->Reset('org_id'); // Org id is handled above and we want to be able to change it here !
+		$this->AddToMenu($oAppContext->GetForForm());		
+		$this->AddToMenu("</form>\n");
 		$this->AddToMenu("</div>\n");
 		$this->AddToMenu("<ul id=\"browser\" class=\"dir\">\n");