diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigClientsHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigClientsHelper.java
index 95cd1086f9..1779d613b2 100644
--- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigClientsHelper.java
+++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigClientsHelper.java
@@ -42,11 +42,11 @@ public class ConfigClientsHelper extends HelperBase {
ClientAppConfig ca = clients.get(cur);
renderForm(buf, ""+cur, ca.clientName, false, !ca.disabled,
"webConsole".equals(ca.clientName) || "Web console".equals(ca.clientName),
- ca.className + ((ca.args != null) ? " " + ca.args : ""), (""+cur).equals(_edit), true);
+ ca.className + ((ca.args != null) ? " " + ca.args : ""), (""+cur).equals(_edit), true, false);
}
if ("new".equals(_edit))
- renderForm(buf, "" + clients.size(), "", false, false, false, "", true, false);
+ renderForm(buf, "" + clients.size(), "", false, false, false, "", true, false, false);
buf.append("\n");
return buf.toString();
}
@@ -63,7 +63,7 @@ public class ConfigClientsHelper extends HelperBase {
String app = name.substring(RouterConsoleRunner.PREFIX.length(), name.lastIndexOf(RouterConsoleRunner.ENABLED));
String val = props.getProperty(name);
renderForm(buf, app, app, !"addressbook".equals(app),
- "true".equals(val), RouterConsoleRunner.ROUTERCONSOLE.equals(app), app + ".war", false, false);
+ "true".equals(val), RouterConsoleRunner.ROUTERCONSOLE.equals(app), app + ".war", false, false, false);
}
}
buf.append("\n");
@@ -101,7 +101,6 @@ public class ConfigClientsHelper extends HelperBase {
}
s = appProps.getProperty("author");
if (s != null) {
- // fixme translate info using bundle specified in appProps
desc.append("
")
.append(_("Author")).append(" ").append(s);
}
@@ -109,7 +108,6 @@ public class ConfigClientsHelper extends HelperBase {
if (s == null)
s = appProps.getProperty("description");
if (s != null) {
- // fixme translate info using bundle specified in appProps
desc.append(" ")
.append(_("Description")).append(" ").append(s);
}
@@ -123,14 +121,14 @@ public class ConfigClientsHelper extends HelperBase {
desc.append(" ")
.append("").append(_("Website")).append(" ");
}
- s = appProps.getProperty("updateURL");
- if (s != null) {
+ String updateURL = appProps.getProperty("updateURL");
+ if (updateURL != null) {
desc.append(" ")
- .append("").append(_("Update link")).append(" ");
+ .append("").append(_("Update link")).append(" ");
}
desc.append("");
renderForm(buf, app, app, false,
- "true".equals(val), false, desc.toString(), false, false);
+ "true".equals(val), false, desc.toString(), false, false, updateURL != null);
}
}
buf.append("\n");
@@ -139,7 +137,8 @@ public class ConfigClientsHelper extends HelperBase {
/** ro trumps edit and showEditButton */
private void renderForm(StringBuilder buf, String index, String name, boolean urlify,
- boolean enabled, boolean ro, String desc, boolean edit, boolean showEditButton) {
+ boolean enabled, boolean ro, String desc, boolean edit,
+ boolean showEditButton, boolean showUpdateButton) {
buf.append(" ");
if (urlify && enabled) {
String link = "/";
@@ -165,10 +164,14 @@ public class ConfigClientsHelper extends HelperBase {
if ((!enabled) && !edit) {
buf.append("" + _("Start") + " ").append(index).append(" ");
}
- if (showEditButton && (!edit) && !ro) {
+ if (showEditButton && (!edit) && !ro)
buf.append("" + _("Edit") + " ").append(index).append(" ");
- buf.append("" + _("Delete") + " ").append(index).append(" ");
+ if (showUpdateButton && (!edit) && !ro) {
+ buf.append("" + _("Check for updates") + " ").append(index).append(" ");
+ buf.append("" + _("Update") + " ").append(index).append(" ");
}
+ if ((!edit) && !ro)
+ buf.append("" + _("Delete") + " ").append(index).append(" ");
buf.append(" ");
if (edit && !ro) {
buf.append("