display cleanups

This commit is contained in:
zzz
2011-03-30 00:19:28 +00:00
parent 0fcf13ef73
commit 7020bfd521
7 changed files with 44 additions and 24 deletions

View File

@@ -129,6 +129,11 @@ public class AddressbookBean
return filename;
}
public String getDisplayName()
{
return getFileName();
}
protected AddressBean[] entries;
public AddressBean[] getEntries()
@@ -306,6 +311,8 @@ public class AddressbookBean
message = _("Destination added for {0}.", displayHost);
else
message = _("Destination changed for {0}.", displayHost);
if (!host.endsWith(".i2p"))
message += "<br>" + _("Warning - host name does not end with \".i2p\"");
// clear form
hostname = null;
destination = null;

View File

@@ -96,6 +96,15 @@ public class NamingServiceBean extends AddressbookBean
return basename(filename);
}
@Override
public String getDisplayName()
{
if (isDirect())
return super.getDisplayName();
loadConfig();
return _("{0} address book in {1} database", getFileName(), getNamingService().getName());
}
/** depth-first search */
private static NamingService searchNamingService(NamingService ns, String srch)
{
@@ -248,11 +257,13 @@ public class NamingServiceBean extends AddressbookBean
message = _("Destination added for {0}.", displayHost);
else
message = _("Destination changed for {0}.", displayHost);
if (!host.endsWith(".i2p"))
message += "<br>" + _("Warning - host name does not end with \".i2p\"");
// clear form
hostname = null;
destination = null;
} else {
message = _("Failed to add Destination for {0} to naming service {1}", displayHost, getNamingService()) + "<br>";
message = _("Failed to add Destination for {0} to naming service {1}", displayHost, getNamingService().getName()) + "<br>";
}
} catch (DataFormatException dfe) {
message = _("Invalid Base 64 destination.");
@@ -276,7 +287,7 @@ public class NamingServiceBean extends AddressbookBean
String uni = AddressBean.toUnicode(n);
String displayHost = uni.equals(n) ? n : uni + " (" + n + ')';
if (!success) {
message += _("Failed to delete Destination for {0} from naming service {1}", displayHost, getNamingService()) + "<br>";
message += _("Failed to delete Destination for {0} from naming service {1}", displayHost, getNamingService().getName()) + "<br>";
} else if (deleted++ == 0) {
changed = true;
name = displayHost;

View File

@@ -54,19 +54,20 @@
<hr>
<div id="navi">
<p>
<%=intl._("addressbooks")%>
<%=intl._("Address books")%>:
<a href="addressbook.jsp?book=private&amp;filter=none&amp;begin=0&amp;end=99"><%=intl._("private")%></a> |
<a href="addressbook.jsp?book=master&amp;filter=none&amp;begin=0&amp;end=99"><%=intl._("master")%></a> |
<a href="addressbook.jsp?book=router&amp;filter=none&amp;begin=0&amp;end=99"><%=intl._("router")%></a> |
<a href="addressbook.jsp?book=published&amp;filter=none&amp;begin=0&amp;end=99"><%=intl._("published")%></a> *
<a href="subscriptions.jsp"><%=intl._("subscriptions")%></a> *
<a href="config.jsp"><%=intl._("configuration")%></a> *
<a href="index.jsp"><%=intl._("overview")%></a>
<a href="subscriptions.jsp"><%=intl._("Subscriptions")%></a> *
<a href="config.jsp"><%=intl._("Configuration")%></a> *
<a href="index.jsp"><%=intl._("Overview")%></a>
</p>
</div>
<hr>
<div id="headline">
<h3><%=intl._(book.getBook())%> <%=intl._("addressbook")%>: ${book.fileName}</h3>
<h3><%=intl._("Address book")%>: <%=intl._(book.getBook())%></h3>
<h4><%=intl._("Storage")%>: ${book.displayName}</h4>
</div>
<div id="messages">${book.messages}</div>

View File

@@ -49,14 +49,14 @@
</div><hr>
<div id="navi">
<p>
<%=intl._("addressbooks")%>
<%=intl._("Address books")%>:
<a href="addressbook.jsp?book=private"><%=intl._("private")%></a> |
<a href="addressbook.jsp?book=master"><%=intl._("master")%></a> |
<a href="addressbook.jsp?book=router"><%=intl._("router")%></a> |
<a href="addressbook.jsp?book=published"><%=intl._("published")%></a> *
<a href="subscriptions.jsp"><%=intl._("subscriptions")%></a> *
<%=intl._("configuration")%> *
<a href="index.jsp"><%=intl._("overview")%></a>
<a href="subscriptions.jsp"><%=intl._("Subscriptions")%></a> *
<%=intl._("Configuration")%> *
<a href="index.jsp"><%=intl._("Overview")%></a>
</p>
</div><hr>
<div id="headline">

View File

@@ -51,19 +51,20 @@
<hr>
<div id="navi">
<p>
<%=intl._("addressbooks")%>
<%=intl._("Address books")%>:
<a href="addressbook.jsp?book=private&amp;filter=none&amp;begin=0&amp;end=99"><%=intl._("private")%></a> |
<a href="addressbook.jsp?book=master&amp;filter=none&amp;begin=0&amp;end=99"><%=intl._("master")%></a> |
<a href="addressbook.jsp?book=router&amp;filter=none&amp;begin=0&amp;end=99"><%=intl._("router")%></a> |
<a href="addressbook.jsp?book=published&amp;filter=none&amp;begin=0&amp;end=99"><%=intl._("published")%></a> *
<a href="subscriptions.jsp"><%=intl._("subscriptions")%></a> *
<a href="config.jsp"><%=intl._("configuration")%></a> *
<a href="index.jsp"><%=intl._("overview")%></a>
<a href="subscriptions.jsp"><%=intl._("Subscriptions")%></a> *
<a href="config.jsp"><%=intl._("Configuration")%></a> *
<a href="index.jsp"><%=intl._("Overview")%></a>
</p>
</div>
<hr>
<div id="headline">
<h3><%=intl._(book.getBook())%> <%=intl._("addressbook")%>: ${book.fileName}</h3>
<h3><%=intl._("Address book")%>: <%=intl._(book.getBook())%></h3>
<h4><%=intl._("Storage")%>: ${book.displayName}</h4>
</div>
<div id="book">

View File

@@ -48,14 +48,14 @@
<hr>
<div id="navi">
<p>
<%=intl._("addressbooks")%>
<%=intl._("Address books")%>:
<a href="addressbook.jsp?book=private"><%=intl._("private")%></a> |
<a href="addressbook.jsp?book=master"><%=intl._("master")%></a> |
<a href="addressbook.jsp?book=router"><%=intl._("router")%></a> |
<a href="addressbook.jsp?book=published"><%=intl._("published")%></a> *
<a href="subscriptions.jsp"><%=intl._("subscriptions")%></a> *
<a href="config.jsp"><%=intl._("configuration")%></a> *
<%=intl._("overview")%>
<a href="subscriptions.jsp"><%=intl._("Subscriptions")%></a> *
<a href="config.jsp"><%=intl._("Configuration")%></a> *
<%=intl._("Overview")%>
</p>
</div>
<hr>

View File

@@ -49,14 +49,14 @@
</div><hr>
<div id="navi">
<p>
<%=intl._("addressbooks")%>
<%=intl._("Address books")%>:
<a href="addressbook.jsp?book=private"><%=intl._("private")%></a> |
<a href="addressbook.jsp?book=master"><%=intl._("master")%></a> |
<a href="addressbook.jsp?book=router"><%=intl._("router")%></a> |
<a href="addressbook.jsp?book=published"><%=intl._("published")%></a> *
<%=intl._("subscriptions")%> *
<a href="config.jsp"><%=intl._("configuration")%></a> *
<a href="index.jsp"><%=intl._("overview")%></a>
<%=intl._("Subscriptions")%> *
<a href="config.jsp"><%=intl._("Configuration")%></a> *
<a href="index.jsp"><%=intl._("Overview")%></a>
</p>
</div><hr>
<div id="headline">