From c2d316449f85bd2b74ae9ffaa3d08b7a5ee282cf Mon Sep 17 00:00:00 2001 From: Alex Bitney Date: Sun, 7 Feb 2016 00:00:41 +0200 Subject: added tags when posting new message added templates engine (rythm engine) and moved something to it. WARNING: textext plugin does not work when minimized, and also I fixed bug in it. --- src/main/java/com/juick/http/www/User.java | 73 +++++++++++++++++++----------- 1 file changed, 47 insertions(+), 26 deletions(-) (limited to 'src/main/java/com/juick/http/www/User.java') diff --git a/src/main/java/com/juick/http/www/User.java b/src/main/java/com/juick/http/www/User.java index 1f2b7dc0..5d06045c 100644 --- a/src/main/java/com/juick/http/www/User.java +++ b/src/main/java/com/juick/http/www/User.java @@ -17,25 +17,21 @@ */ package com.juick.http.www; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.serializer.JSONSerializer; import com.juick.Tag; import com.juick.server.Endpoints; import com.juick.server.MessagesQueries; import com.juick.server.TagQueries; import com.juick.server.UserQueries; -import com.juick.xmpp.Stream; import org.apache.commons.lang3.tuple.Pair; +import org.json.JSONArray; +import org.json.JSONObject; import org.springframework.jdbc.core.JdbcTemplate; import java.io.IOException; import java.io.PrintWriter; -import java.io.UnsupportedEncodingException; import java.net.URLEncoder; -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; import javax.servlet.ServletException; @@ -183,7 +179,7 @@ public class User { pageUserColumn(out, sql, user, visitor); out.println("
"); - out.println("

" + pageUserTags(sql, user, visitor, 0) + "

"); + out.println("

" + pageUserTags(sql, user, 0) + "

"); out.println("
"); PageTemplates.pageFooter(request, out, visitor, false); @@ -306,12 +302,16 @@ public class User { out.println("
  • Блог
  • "); out.println("
  • Рекомендации
  • "); out.println("
  • Фотографии
  • "); + if (visitor != null && visitor.getUID() == user.getUID()) { + out.println("
  • Мои комментарии
  • "); + out.println("
  • Неотвеченные
  • "); + } out.println(" "); out.println("
    "); out.println("
    "); out.println("

    "); out.println("
    "); - out.println("

    " + pageUserTags(sql, user, visitor, 20) + "...

    "); + out.println("

    " + pageUserTags(sql, user, 20) + "...

    "); out.println("
    "); out.println("