Author: nextgens
Date: 2006-08-19 15:10:29 +0000 (Sat, 19 Aug 2006)
New Revision: 10206

Modified:
   trunk/freenet/src/freenet/clients/http/ConfigToadlet.java
Log:
Don't display the "Configuration Navigation" toolbar if not needed

Modified: trunk/freenet/src/freenet/clients/http/ConfigToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/ConfigToadlet.java   2006-08-19 
09:08:12 UTC (rev 10205)
+++ trunk/freenet/src/freenet/clients/http/ConfigToadlet.java   2006-08-19 
15:10:29 UTC (rev 10206)
@@ -116,13 +116,16 @@
                HTMLNode pageNode = ctx.getPageMaker().getPageNode("Freenet 
Node Configuration of " + node.getMyName());
                HTMLNode contentNode = 
ctx.getPageMaker().getContentNode(pageNode);

-               HTMLNode navigationBar = 
ctx.getPageMaker().getInfobox("navbar", "Configuration Navigation");
-               HTMLNode navigationContent = 
ctx.getPageMaker().getContentNode(navigationBar).addChild("ul");
-               for(int i=0; i<sc.length;i++){
-                       navigationContent.addChild("li").addChild("a", "href", 
"#"+sc[i].getPrefix(), sc[i].getPrefix());
-               }
-               contentNode.addChild(core.alerts.createSummary());
-               contentNode.addChild(navigationBar);
+               if(advancedEnabled){
+                       HTMLNode navigationBar = 
ctx.getPageMaker().getInfobox("navbar", "Configuration Navigation");
+                       HTMLNode navigationContent = 
ctx.getPageMaker().getContentNode(navigationBar).addChild("ul");
+                       for(int i=0; i<sc.length;i++){
+                               navigationContent.addChild("li").addChild("a", 
"href", "#"+sc[i].getPrefix(), sc[i].getPrefix());
+                       }
+                       contentNode.addChild(core.alerts.createSummary());
+                       contentNode.addChild(navigationBar);
+               }else
+                       contentNode.addChild(core.alerts.createSummary());

                HTMLNode infobox = contentNode.addChild("div", "class", 
"infobox infobox-normal");
                infobox.addChild("div", "class", "infobox-header", "Freenet 
node configuration");


Reply via email to