");
if (paramTag != null) {
out.println("← Все записи с тегом " +
StringEscapeUtils.escapeHtml4(paramTag.getName()) + "
");
}
templates.printMessages(out, user, mids, visitor);
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);
}
}
@GetMapping("/{uname}/tags")
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);
}
}
@GetMapping("/{uname}/friends")
protected void doGetFriends(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()) {
throw new HttpForbiddenException();
}
response.setContentType("text/html; charset=UTF-8");
try (PrintWriter out = response.getWriter()) {
String head = "