");
if (paramTag != null) {
out.println("← Все записи с тегом " +
StringEscapeUtils.escapeHtml4(paramTag.getName()) + "
");
}
templates.printMessages(out, user, mids, visitor, visitor.getUid() == 0 ? 4 : 5, 0);
if (mids.size() >= 20) {
String nextpage = "?before=" + mids.get(mids.size() - 1);
if (paramShow != null) {
nextpage += "&show=" + paramShow;
}
if (paramTag != null) {
nextpage += "&tag=" + URLEncoder.encode(paramTag.getName(), CharEncoding.UTF_8);
}
if (paramSearch != null) {
nextpage += "&search=" + URLEncoder.encode(paramSearch, CharEncoding.UTF_8);
}
out.println("Читать дальше →
");
}
out.println("");
}
templates.pageFooter(request, out, visitor, true);
templates.pageEnd(out);
}
}
@RequestMapping(value = "/{uname}/tags", method = RequestMethod.GET)
protected void doGetTags(HttpServletRequest request, HttpServletResponse response,
@PathVariable String uname) throws IOException {
com.juick.User user = userService.getUserByName(uname);
com.juick.User visitor = UserUtils.getCurrentUser();
if (visitor.isBanned()) {
response.sendError(HttpServletResponse.SC_NOT_FOUND);
return;
}
response.setContentType("text/html; charset=UTF-8");
try (PrintWriter out = response.getWriter()) {
String head = "");
out.println("" + pageUserTags(user, visitor, 0) + "
");
out.println("");
templates.pageFooter(request, out, visitor, false);
templates.pageEnd(out);
}
}
@RequestMapping(value = "/{uname}/friends", method = RequestMethod.GET)
protected void doGetFriends(HttpServletRequest request, HttpServletResponse response,
@PathVariable String uname) throws ServletException, IOException {
com.juick.User user = userService.getUserByName(uname);
com.juick.User visitor = UserUtils.getCurrentUser();
if (visitor.isBanned()) {
response.sendError(HttpServletResponse.SC_NOT_FOUND);
return;
}
response.setContentType("text/html; charset=UTF-8");
try (PrintWriter out = response.getWriter()) {
String head = "