remove search box

This commit is contained in:
zzz
2012-04-20 13:25:29 +00:00
parent 195a4e971d
commit 79a7c14fdf
3 changed files with 17 additions and 0 deletions

View File

@ -21,6 +21,7 @@ public class HomeHelper extends HelperBase {
static final String PROP_SERVICES = "routerconsole.services"; static final String PROP_SERVICES = "routerconsole.services";
static final String PROP_FAVORITES = "routerconsole.favorites"; static final String PROP_FAVORITES = "routerconsole.favorites";
static final String PROP_OLDHOME = "routerconsole.oldHomePage"; static final String PROP_OLDHOME = "routerconsole.oldHomePage";
private static final String PROP_SEARCH = "routerconsole.showSearch";
static final String DEFAULT_SERVICES = static final String DEFAULT_SERVICES =
_x("Addressbook") + S + _x("Manage your I2P hosts file here (I2P domain name resolution)") + S + "/susidns/index" + S + I + "book_addresses.png" + S + _x("Addressbook") + S + _x("Manage your I2P hosts file here (I2P domain name resolution)") + S + "/susidns/index" + S + I + "book_addresses.png" + S +
@ -62,6 +63,10 @@ public class HomeHelper extends HelperBase {
return _context.getProperty(Messages.PROP_LANG) == null; return _context.getProperty(Messages.PROP_LANG) == null;
} }
public boolean shouldShowSearch() {
return _context.getBooleanProperty(PROP_SEARCH);
}
public String getServices() { public String getServices() {
List<App> plugins = NavHelper.getClientApps(_context); List<App> plugins = NavHelper.getClientApps(_context);
return homeTable(PROP_SERVICES, DEFAULT_SERVICES, plugins); return homeTable(PROP_SERVICES, DEFAULT_SERVICES, plugins);

View File

@ -40,6 +40,9 @@ input.default {
<input type="submit" name="action" class="accept" value="<%=intl._("Save")%>" > <input type="submit" name="action" class="accept" value="<%=intl._("Save")%>" >
</form> </form>
<%
if (homehelper.shouldShowSearch()) {
%>
<h3><%=intl._("Search Engines")%></h3> <h3><%=intl._("Search Engines")%></h3>
<form action="" method="POST"> <form action="" method="POST">
<input type="hidden" name="nonce" value="<%=pageNonce%>" > <input type="hidden" name="nonce" value="<%=pageNonce%>" >
@ -53,6 +56,9 @@ input.default {
<input type="submit" name="action" class="add" value="<%=intl._("Add item")%>" > <input type="submit" name="action" class="add" value="<%=intl._("Add item")%>" >
</div> </div>
</form> </form>
<%
} // shouldShowSearch()
%>
<h3><%=intl._("Recommended Eepsites")%></h3> <h3><%=intl._("Recommended Eepsites")%></h3>
<form action="" method="POST"> <form action="" method="POST">

View File

@ -89,6 +89,9 @@
%> %>
<div class="home" id="home"> <div class="home" id="home">
<%
if (homehelper.shouldShowSearch()) {
%>
<div class="search"> <div class="search">
<form action="/search.jsp" method="POST"> <form action="/search.jsp" method="POST">
<table class="search"><tr><td align="right"> <table class="search"><tr><td align="right">
@ -102,6 +105,9 @@
</td></tr></table> </td></tr></table>
</form> </form>
</div> </div>
<%
} // shouldShowSearch()
%>
<div class="ag2"> <div class="ag2">
<h4 class="app"><%=intl._("Eepsites of Interest")%></h4> <h4 class="app"><%=intl._("Eepsites of Interest")%></h4>
<jsp:getProperty name="homehelper" property="favorites" /><br> <jsp:getProperty name="homehelper" property="favorites" /><br>