%@ page contentType="text/html; charset=UTF-8"
import="java.util.List"
%>
Quotes fra #linux.no på freenode
_ _
| (_)_ __ _ ___ __ _ __ ___
_|_|_ | | | '_ \| | | \ \/ / | '_ \ / _ \
_|_|_ | | | | | | |_| |) ( _| | | | (_) |
| | |_|_|_| |_|\__,_/_/\_(_)_| |_|\___/
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Quotes fra #linux.no på freenode
Klikk her for å legge til en quote
Sortér etter dato | score | id
<%
String order = request.getParameter("order");
List quotes;
if (order == null) {
quotes = lq.QuoteUtils.getQuotesOrderedByIdDesc();
} else if(order.equals("id")) {
quotes = lq.QuoteUtils.getQuotesOrderedByIdDesc();
} else if(order.equals("score")) {
quotes = lq.QuoteUtils.getQuotesOrderedByScoreDesc();
} else if(order.equals("date")) {
quotes = lq.QuoteUtils.getQuotesOrderedByDateDesc();
} else {
quotes = lq.QuoteUtils.getQuotesOrderedByIdDesc();
}
for (lq.Quote quote : quotes) {
out.println("
");
out.println("" +
"#" + quote.getId() +
""+
", lagt til av " + lq.Strings.escape(quote.getAuthor()) + "
");
String score = quote.getScore().toString();
String date = lq.DateUtil.dateFormat.format(quote.getQuoteDate());
out.println("Dato: " + date + ", Score: ");
out.println("");
out.println((score==null?"-":(score+ " (fra " + quote.getVotes().size() +")")));
out.println("
Vote: ");
for(int nv=1; nv<=5; nv++)
out.println(""+nv+" ");
out.println(" ");
out.println("
");
out.println();
String content = lq.Strings.escape(quote.getContent());
out.println(content
.replaceAll("(http://[^ \r\n]+)","$1")
.replaceAll("\n","
\n"));
out.println("");
out.println("
");
}
%>