Author: toad
Date: 2008-04-18 22:33:20 +0000 (Fri, 18 Apr 2008)
New Revision: 19402

Modified:
   trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java
   trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties
   trunk/freenet/src/freenet/node/useralerts/UserAlertManager.java
Log:
Click an item for more info

Modified: trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java  2008-04-18 
21:56:59 UTC (rev 19401)
+++ trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java  2008-04-18 
22:33:20 UTC (rev 19402)
@@ -539,7 +539,7 @@

         // Alerts
         if (ctx.isAllowedFullAccess()) {
-            
contentNode.addChild(core.alerts.createAlertsShort(l10n("alertsSummary")));
+            
contentNode.addChild(core.alerts.createAlertsShort(l10n("alertsSummary"), 
advancedModeOutputEnabled));
         }

         // Bookmarks

Modified: trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties
===================================================================
--- trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties   2008-04-18 
21:56:59 UTC (rev 19401)
+++ trunk/freenet/src/freenet/l10n/freenet.l10n.en.properties   2008-04-18 
22:33:20 UTC (rev 19402)
@@ -1128,6 +1128,7 @@
 UserAlert.reset=Reset
 UserAlertManager.alertsOnHomepage= | See them on ${link}the Freenet 
Homepage${/link}.
 UserAlertManager.alertsTitle=Outstanding alerts
+UserAlertManager.clickForMore=Click on an item for more information.
 UserAlertManager.criticalErrorCountLabel=Critical Errors:
 UserAlertManager.errorCountLabel=Errors:
 UserAlertManager.minorCountLabel=Minor:

Modified: trunk/freenet/src/freenet/node/useralerts/UserAlertManager.java
===================================================================
--- trunk/freenet/src/freenet/node/useralerts/UserAlertManager.java     
2008-04-18 21:56:59 UTC (rev 19401)
+++ trunk/freenet/src/freenet/node/useralerts/UserAlertManager.java     
2008-04-18 22:33:20 UTC (rev 19402)
@@ -116,7 +116,7 @@
         * Write each alert in uber-concise form as HTML, with a link to 
         * /alerts/[ anchor pointing to the real alert].
         */
-       public HTMLNode createAlertsShort(String title) {
+       public HTMLNode createAlertsShort(String title, boolean advancedMode) {
                UserAlert[] alerts = getAlerts();
                short maxLevel = Short.MAX_VALUE;
                for(int i=0;i<alerts.length;i++) {
@@ -129,6 +129,8 @@
                HTMLNode boxNode = new HTMLNode("div", "class", "infobox 
infobox-"+getAlertLevelName(maxLevel)+" infobox-alert 
infobox-summary-status-box");
                boxNode.addChild("div", "class", "infobox-header infobox 
summary-status-header", title);
                HTMLNode contentNode = boxNode.addChild("div", "class", 
"infobox-content infobox-summary-status-content");
+               if(!advancedMode)
+                       contentNode.addChild("p", "class", "click-for-more", 
l10n("clickForMore"));
                HTMLNode alertsNode = contentNode.addChild("ul");
                int totalNumber = 0;
                for (int i = 0; i < alerts.length; i++) {
@@ -136,9 +138,7 @@
                        if (!alert.isValid())
                                continue;
                        HTMLNode listItem = alertsNode.addChild("li");
-                       HTMLNode linkToLongAlert = listItem.addChild("a", 
"href", "/alerts/#"+alert.anchor(), alert.getTitle());
-                       //listItem.addChild("#", ": ");
-                       //listItem.addChild(alert.getReallyShortHTMLText());
+                       listItem.addChild("a", "href", 
"/alerts/#"+alert.anchor(), alert.getTitle());
                        totalNumber++;
                }
                if (totalNumber == 0) {


Reply via email to