search result rewritten
This commit is contained in:
parent
56deb56c72
commit
967dbeef6e
@ -33,6 +33,7 @@ public final class Pages {
|
||||
private static final String MESSAGE_TEMPLATE = readTemplate("webapp/message.html");
|
||||
private static final String NEW_THREAD_TEMPLATE = readTemplate("webapp/newthread.html");
|
||||
private static final String MEMBER_TEMPLATE = readTemplate("webapp/member.html");
|
||||
private static final String SEARCH_TEMPLATE = readTemplate("webapp/search.html");
|
||||
|
||||
private Pages() {
|
||||
}
|
||||
@ -572,25 +573,11 @@ public final class Pages {
|
||||
}
|
||||
}
|
||||
|
||||
String body = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">"
|
||||
+ "<html xmlns='http://www.w3.org/1999/xhtml' dir='ltr' lang='en'><head>"
|
||||
+ "<title>kAmMa's Forum - Search Results</title>"
|
||||
+ "<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'/>"
|
||||
+ "<meta http-equiv='Expires' content='0'/>"
|
||||
+ "<link rel='stylesheet' type='text/css' href='./css/all.css'/>"
|
||||
+ "<script type='text/javascript' src='/client.js'></script>"
|
||||
+ "</head><body>"
|
||||
+ "<div align='center'>"
|
||||
+ "<div class='page' style='width: 100%; text-align: left'>"
|
||||
+ "<div style='padding: 0px 25px 0px 25px' align='left'><br/>"
|
||||
+ renderCommonHeader(username, "Search Results", true, pmStats)
|
||||
+ "<br/>"
|
||||
+ messageRows
|
||||
+ "<br/>"
|
||||
+ renderCommonFooter(Math.max(0, loggedUsersCount), loggedUsers)
|
||||
+ "</div></div></div><br/>"
|
||||
+ "</body></html>";
|
||||
return body;
|
||||
return SEARCH_TEMPLATE
|
||||
.replace("{{COMMON_HEADER}}", renderCommonHeader(username, "Search Results", true, pmStats))
|
||||
.replace("{{COMMON_FOOTER}}", renderCommonFooter(Math.max(0, loggedUsersCount), loggedUsers))
|
||||
.replace("{{SEARCH_TEXT}}", escapeHtml(valueOrDefault(searchText, "")))
|
||||
.replace("{{MESSAGE_ROWS}}", messageRows.toString());
|
||||
}
|
||||
|
||||
public static String mysqlClientPage(
|
||||
|
||||
38
src/main/resources/webapp/search.html
Normal file
38
src/main/resources/webapp/search.html
Normal file
@ -0,0 +1,38 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang='en'>
|
||||
<head>
|
||||
<meta charset='UTF-8'/>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1.0'/>
|
||||
<link rel='stylesheet' type='text/css' href='/css/all.css'/>
|
||||
<script type='text/javascript' src='/client.js'></script>
|
||||
<title>kAmMa's Forum - Search Results</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class='page' style='width:100%; text-align:left'>
|
||||
<div style='padding:0 25px 0 25px'>
|
||||
<br/>
|
||||
{{COMMON_HEADER}}
|
||||
<br/>
|
||||
|
||||
<div align='right'>
|
||||
<table class='tborder' cellpadding='3' cellspacing='1' border='0'>
|
||||
<tbody><tr>
|
||||
<td class='vbmenu_control' style='font-weight:normal'>
|
||||
<form method='get' action='/search' style='display:inline'>
|
||||
Search in threads:
|
||||
<input type='text' class='bginput' style='font-size:11px' name='stext' value='{{SEARCH_TEXT}}'/>
|
||||
</form>
|
||||
</td>
|
||||
</tr></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<br/>
|
||||
|
||||
{{MESSAGE_ROWS}}
|
||||
<br/>
|
||||
|
||||
{{COMMON_FOOTER}}
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
x
Reference in New Issue
Block a user