aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick/http/www/PageTemplates.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/juick/http/www/PageTemplates.java')
-rw-r--r--src/java/com/juick/http/www/PageTemplates.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/java/com/juick/http/www/PageTemplates.java b/src/java/com/juick/http/www/PageTemplates.java
index a22f198e..628c9be9 100644
--- a/src/java/com/juick/http/www/PageTemplates.java
+++ b/src/java/com/juick/http/www/PageTemplates.java
@@ -69,12 +69,16 @@ public class PageTemplates {
out.println("<body>");
}
- public static void pageNavigation(PrintWriter out, Locale loc, com.juick.User user) {
+ public static void pageNavigation(PrintWriter out, Locale loc, com.juick.User user, String search) {
ResourceBundle rb = ResourceBundle.getBundle("Global", loc);
out.println("<div id=\"hwrapper\">");
out.println("<ul id=\"header\">");
out.println(" <li id=\"logo\"><a href=\"" + (user != null ? "/?show=my" : "/") + "\"><div class=\"head-ico\" id=\"hi-logo\"></div></a></li>");
- out.println(" <li id=\"search\"><form action=\"/\"><input type=\"text\" name=\"search\" class=\"text\" placeholder=\"" + rb.getString("Search") + "\"/></form></li>");
+ out.print(" <li id=\"search\"><form action=\"/\"><input type=\"text\" name=\"search\" class=\"text\" placeholder=\"" + rb.getString("Search") + "\"");
+ if (search != null) {
+ out.print(" value=\"" + Utils.encodeHTML(search) + "\"");
+ }
+ out.println("/></form></li>");
if (user != null) {
out.println(" <li class=\"right\"><a href=\"/logout\"><div class=\"head-ico\" id=\"hi-logout\"></div></a></li>");
out.println(" <li class=\"right\"><a href=\"/settings\"><div class=\"head-ico\" id=\"hi-settings\"></div></a></li>");