From 9280d6d9524e1af4e13f6d3f9802333525865b0d Mon Sep 17 00:00:00 2001
From: koda
Date: Tue, 24 Feb 2015 07:17:51 +0900
Subject: [PATCH] =?UTF-8?q?0.4.5=20=E3=83=AA=E3=83=AA=E3=83=BC=E3=82=B9?=
=?UTF-8?q?=E5=80=99=E8=A3=9C=20#13=20=E3=82=AF=E3=83=83=E3=82=AD=E3=83=BC?=
=?UTF-8?q?=E3=82=92=E4=BD=BF=E3=81=A3=E3=81=9F=E3=83=AD=E3=82=B0=E3=82=A4?=
=?UTF-8?q?=E3=83=B3=E6=83=85=E5=A0=B1=E3=81=AE=E4=BF=9D=E6=8C=81=20#15=20?=
=?UTF-8?q?=E6=97=A2=E8=AA=AD=E3=83=BB=E6=9C=AA=E8=AA=AD=E3=81=8C=E3=82=8F?=
=?UTF-8?q?=E3=81=8B=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=97=E3=81=9F?=
=?UTF-8?q?=E3=81=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pom.xml | 4 +-
.../control/KnowledgeControlBase.java | 22 +++++
.../knowledge/control/admin/UsersControl.java | 2 +-
.../control/open/KnowledgeControl.java | 58 +++++++++++-
.../control/protect/AccountControl.java | 2 +-
.../control/protect/KnowledgeControl.java | 29 +++++-
.../project/knowledge/dao/LikesDao.java | 10 ++
.../project/knowledge/entity/LikesEntity.java | 17 ++++
.../project/knowledge/logic/UserLogic.java | 8 +-
src/main/resources/appresource.properties | 12 ++-
src/main/resources/appresource_ja.properties | 10 +-
.../LikesDao/LikesDao_selectOnKnowledge.sql | 15 +++
.../WEB-INF/views/open/knowledge/likes.jsp | 91 +++++++++++++++++++
.../WEB-INF/views/open/knowledge/list.jsp | 30 +++---
.../WEB-INF/views/open/knowledge/search.jsp | 2 +-
.../WEB-INF/views/open/knowledge/view.jsp | 36 +++++---
.../views/protect/knowledge/view_add.jsp | 6 +-
.../views/protect/knowledge/view_edit.jsp | 14 ++-
src/main/webapp/WEB-INF/web.xml | 8 ++
19 files changed, 322 insertions(+), 54 deletions(-)
create mode 100644 src/main/java/org/support/project/knowledge/control/KnowledgeControlBase.java
create mode 100644 src/main/resources/org/support/project/knowledge/dao/sql/LikesDao/LikesDao_selectOnKnowledge.sql
create mode 100644 src/main/webapp/WEB-INF/views/open/knowledge/likes.jsp
diff --git a/pom.xml b/pom.xml
index 5c32b20e6..a07babce5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
org.support-project
knowledge
war
- 0.4.4
+ 0.4.5-SNAPSHOT
webapp for knowledge
https://support-project.org/
@@ -17,7 +17,7 @@
org.support-project
web
- 0.4.4
+ 0.4.5-SNAPSHOT
diff --git a/src/main/java/org/support/project/knowledge/control/KnowledgeControlBase.java b/src/main/java/org/support/project/knowledge/control/KnowledgeControlBase.java
new file mode 100644
index 000000000..87ad47d43
--- /dev/null
+++ b/src/main/java/org/support/project/knowledge/control/KnowledgeControlBase.java
@@ -0,0 +1,22 @@
+package org.support.project.knowledge.control;
+
+import org.support.project.di.DI;
+import org.support.project.di.Instance;
+
+@DI(instance=Instance.Prototype)
+public class KnowledgeControlBase extends Control {
+
+ protected String setViewParam() {
+ StringBuilder params = new StringBuilder();
+ params.append("?keyword=").append(getParamWithDefault("keyword", ""));
+ params.append("&tag=").append(getParamWithDefault("tag", ""));
+ params.append("&user=").append(getParamWithDefault("user", ""));
+ params.append("&offset=").append(getParamWithDefault("offset", ""));
+ setAttribute("params", params.toString());
+ return params.toString();
+ }
+
+
+
+
+}
diff --git a/src/main/java/org/support/project/knowledge/control/admin/UsersControl.java b/src/main/java/org/support/project/knowledge/control/admin/UsersControl.java
index 1439c1e8d..44cbafdaa 100644
--- a/src/main/java/org/support/project/knowledge/control/admin/UsersControl.java
+++ b/src/main/java/org/support/project/knowledge/control/admin/UsersControl.java
@@ -291,7 +291,7 @@ public Boundary delete() throws Exception {
UsersEntity user = dao.selectOnKey(getParam("userId", Integer.class));
if (user != null) {
//dao.delete(user.getUserId());
- UserLogic.get().withdrawal(user.getUserId(), true);
+ UserLogic.get().withdrawal(user.getUserId(), true, HttpUtil.getLocale(getRequest()));
}
String successMsg = "message.success.delete";
setResult(successMsg, null);
diff --git a/src/main/java/org/support/project/knowledge/control/open/KnowledgeControl.java b/src/main/java/org/support/project/knowledge/control/open/KnowledgeControl.java
index 4ecff3ef8..e0b055e90 100644
--- a/src/main/java/org/support/project/knowledge/control/open/KnowledgeControl.java
+++ b/src/main/java/org/support/project/knowledge/control/open/KnowledgeControl.java
@@ -12,12 +12,13 @@
import org.support.project.common.util.StringUtils;
import org.support.project.di.DI;
import org.support.project.di.Instance;
-import org.support.project.knowledge.control.Control;
+import org.support.project.knowledge.control.KnowledgeControlBase;
import org.support.project.knowledge.dao.CommentsDao;
import org.support.project.knowledge.dao.LikesDao;
import org.support.project.knowledge.dao.TagsDao;
import org.support.project.knowledge.entity.CommentsEntity;
import org.support.project.knowledge.entity.KnowledgesEntity;
+import org.support.project.knowledge.entity.LikesEntity;
import org.support.project.knowledge.entity.TagsEntity;
import org.support.project.knowledge.logic.GroupLogic;
import org.support.project.knowledge.logic.KnowledgeLogic;
@@ -34,7 +35,7 @@
import org.support.project.web.exception.InvalidParamException;
@DI(instance=Instance.Prototype)
-public class KnowledgeControl extends Control {
+public class KnowledgeControl extends KnowledgeControlBase {
private static final int COOKIE_COUNT = 5;
/** ログ */
@@ -49,6 +50,9 @@ public class KnowledgeControl extends Control {
* @throws InvalidParamException
*/
public Boundary view() throws InvalidParamException {
+ // 共通処理呼の表示条件の保持の呼び出し
+ setViewParam();
+
Long knowledgeId = super.getPathLong(Long.valueOf(-1));
KnowledgeLogic knowledgeLogic = KnowledgeLogic.get();
@@ -131,10 +135,14 @@ public Boundary view() throws InvalidParamException {
*/
public Boundary list() throws Exception {
LOG.trace("Call list");
+ Integer offset = super.getPathInteger(0);
+ setAttribute("offset", offset);
+ // 共通処理呼の表示条件の保持の呼び出し
+ setViewParam();
+
TagsDao tagsDao = TagsDao.get();
KnowledgeLogic knowledgeLogic = KnowledgeLogic.get();
- Integer offset = super.getPathInteger(0);
LoginedUser loginedUser = super.getLoginedUser();
String keyword = getParam("keyword");
String tag = getParam("tag");
@@ -260,8 +268,52 @@ public Boundary escape(KnowledgesEntity entity) throws PolicyException, ScanExce
* @return
*/
public Boundary search() {
+ // 共通処理呼の表示条件の保持の呼び出し
+ setViewParam();
return forward("search.jsp");
}
+
+ /**
+ * いいねを押したユーザを一覧表示
+ * @return
+ * @throws InvalidParamException
+ */
+ public Boundary likes() throws InvalidParamException {
+ // 共通処理呼の表示条件の保持の呼び出し
+ setViewParam();
+
+ Long knowledgeId = super.getPathLong(Long.valueOf(-1));
+ setAttribute("knowledgeId", knowledgeId);
+ // 権限チェック(いったんアクセスできるユーザは全て表示) TODO 登録者のみにする?
+ KnowledgeLogic knowledgeLogic = KnowledgeLogic.get();
+ KnowledgesEntity entity = knowledgeLogic.select(knowledgeId, getLoginedUser());
+ if (entity == null) {
+ return sendError(HttpStatus.SC_404_NOT_FOUND, "NOT FOUND");
+ }
+
+ Integer page = 0;
+ String p = getParamWithDefault("page", "");
+ if (StringUtils.isInteger(p)) {
+ page = Integer.parseInt(p);
+ }
+
+ LikesDao likesDao = LikesDao.get();
+ List likes = likesDao.selectOnKnowledge(knowledgeId, page * PAGE_LIMIT, PAGE_LIMIT);
+ setAttribute("likes", likes);
+
+
+ int previous = page -1;
+ if (previous < 0) {
+ previous = 0;
+ }
+ setAttribute("page", page);
+ setAttribute("previous", previous);
+ setAttribute("next", page + 1);
+
+ return forward("likes.jsp");
+ }
+
+
}
diff --git a/src/main/java/org/support/project/knowledge/control/protect/AccountControl.java b/src/main/java/org/support/project/knowledge/control/protect/AccountControl.java
index 4efed0796..42e78176d 100644
--- a/src/main/java/org/support/project/knowledge/control/protect/AccountControl.java
+++ b/src/main/java/org/support/project/knowledge/control/protect/AccountControl.java
@@ -110,7 +110,7 @@ public Boundary delete() throws Exception {
if ("2".equals(getParam("knowledge_remove"))) {
knowledgeRemove = false;
}
- UserLogic.get().withdrawal(getLoginUserId(), knowledgeRemove);
+ UserLogic.get().withdrawal(getLoginUserId(), knowledgeRemove, HttpUtil.getLocale(getRequest()));
// セッションを破棄
AuthenticationLogic authenticationLogic = Container.getComp(DefaultAuthenticationLogicImpl.class);
diff --git a/src/main/java/org/support/project/knowledge/control/protect/KnowledgeControl.java b/src/main/java/org/support/project/knowledge/control/protect/KnowledgeControl.java
index 876f7a842..e4bd2ea03 100644
--- a/src/main/java/org/support/project/knowledge/control/protect/KnowledgeControl.java
+++ b/src/main/java/org/support/project/knowledge/control/protect/KnowledgeControl.java
@@ -11,7 +11,7 @@
import org.support.project.di.Container;
import org.support.project.di.DI;
import org.support.project.di.Instance;
-import org.support.project.knowledge.control.Control;
+import org.support.project.knowledge.control.KnowledgeControlBase;
import org.support.project.knowledge.dao.CommentsDao;
import org.support.project.knowledge.dao.KnowledgesDao;
import org.support.project.knowledge.entity.CommentsEntity;
@@ -27,7 +27,7 @@
import org.support.project.web.exception.InvalidParamException;
@DI(instance=Instance.Prototype)
-public class KnowledgeControl extends Control {
+public class KnowledgeControl extends KnowledgeControlBase {
/** ログ */
private static Log LOG = LogFactory.getLog(KnowledgeControl.class);
@@ -39,6 +39,9 @@ public class KnowledgeControl extends Control {
* @return
*/
public Boundary view_add() {
+ // 共通処理呼の表示条件の保持の呼び出し
+ setViewParam();
+
String offset = super.getParam("offset", String.class);
if (StringUtils.isEmpty(offset)) {
offset = "0";
@@ -53,6 +56,9 @@ public Boundary view_add() {
* @throws InvalidParamException
*/
public Boundary view_edit() throws InvalidParamException {
+ // 共通処理呼の表示条件の保持の呼び出し
+ setViewParam();
+
String offset = super.getParam("offset", String.class);
if (StringUtils.isEmpty(offset)) {
offset = "0";
@@ -88,7 +94,9 @@ public Boundary view_edit() throws InvalidParamException {
* @throws Exception
*/
public Boundary add(KnowledgesEntity entity) throws Exception {
- LOG.trace("validate");
+ // 共通処理呼の表示条件の保持の呼び出し
+ setViewParam();
+
String groupsstr = super.getParam("groups");
String[] groupssp = groupsstr.split(",");
List groups = GroupLogic.get().selectGroups(groupssp);
@@ -150,7 +158,9 @@ public Boundary add(KnowledgesEntity entity) throws Exception {
* @throws Exception
*/
public Boundary update(KnowledgesEntity entity) throws Exception {
- LOG.trace("validate");
+ // 共通処理呼の表示条件の保持の呼び出し
+ setViewParam();
+
String groupsstr = super.getParam("groups");
String[] groupssp = groupsstr.split(",");
List groups = GroupLogic.get().selectGroups(groupssp);
@@ -224,6 +234,9 @@ public Boundary update(KnowledgesEntity entity) throws Exception {
* @throws Exception
*/
public Boundary delete() throws Exception {
+ // 共通処理呼の表示条件の保持の呼び出し
+ setViewParam();
+
LOG.trace("validate");
KnowledgesDao dao = Container.getComp(KnowledgesDao.class);
String id = getParam("knowledgeId");
@@ -256,6 +269,9 @@ public Boundary delete() throws Exception {
* @throws InvalidParamException
*/
public Boundary view() throws InvalidParamException {
+ // 共通処理呼の表示条件の保持の呼び出し
+ setViewParam();
+
Long knowledgeId = super.getPathLong(Long.valueOf(-1));
return super.redirect(getRequest().getContextPath() + "/open.knowledge/view/" + knowledgeId);
}
@@ -266,6 +282,9 @@ public Boundary view() throws InvalidParamException {
* @throws InvalidParamException
*/
public Boundary comment() throws InvalidParamException {
+ // 共通処理呼の表示条件の保持の呼び出し
+ String params = setViewParam();
+
Long knowledgeId = super.getPathLong(Long.valueOf(-1));
String comment = getParam("comment");
@@ -278,7 +297,7 @@ public Boundary comment() throws InvalidParamException {
// 一覧表示用の情報を更新
KnowledgeLogic.get().updateKnowledgeExInfo(knowledgeId);
- return super.redirect(getRequest().getContextPath() + "/open.knowledge/view/" + knowledgeId);
+ return super.redirect(getRequest().getContextPath() + "/open.knowledge/view/" + knowledgeId + params);
}
}
diff --git a/src/main/java/org/support/project/knowledge/dao/LikesDao.java b/src/main/java/org/support/project/knowledge/dao/LikesDao.java
index 77cd41515..3417f5bd2 100644
--- a/src/main/java/org/support/project/knowledge/dao/LikesDao.java
+++ b/src/main/java/org/support/project/knowledge/dao/LikesDao.java
@@ -1,9 +1,14 @@
package org.support.project.knowledge.dao;
+import java.util.List;
+
import org.support.project.di.Container;
import org.support.project.di.DI;
import org.support.project.di.Instance;
import org.support.project.knowledge.dao.gen.GenLikesDao;
+import org.support.project.knowledge.entity.KnowledgesEntity;
+import org.support.project.knowledge.entity.LikesEntity;
+import org.support.project.ormapping.common.SQLManager;
/**
* いいね
@@ -28,6 +33,11 @@ public Long countOnKnowledgeId(Long knowledgeId) {
return super.executeQuerySingle(sql, Long.class, knowledgeId);
}
+ public List selectOnKnowledge(Long knowledgeId, int offset, int limit) {
+ String sql = SQLManager.getInstance().getSql("/org/support/project/knowledge/dao/sql/LikesDao/LikesDao_selectOnKnowledge.sql");
+ return executeQuery(sql, LikesEntity.class, knowledgeId, limit, offset);
+ }
+
}
diff --git a/src/main/java/org/support/project/knowledge/entity/LikesEntity.java b/src/main/java/org/support/project/knowledge/entity/LikesEntity.java
index c903123ed..f78860831 100644
--- a/src/main/java/org/support/project/knowledge/entity/LikesEntity.java
+++ b/src/main/java/org/support/project/knowledge/entity/LikesEntity.java
@@ -14,6 +14,9 @@ public class LikesEntity extends GenLikesEntity {
/** SerialVersion */
private static final long serialVersionUID = 1L;
+
+
+ private String userName;
/**
* インスタンス取得
@@ -40,4 +43,18 @@ public LikesEntity(Long no) {
super(no);
}
+ /**
+ * @return the userName
+ */
+ public String getUserName() {
+ return userName;
+ }
+
+ /**
+ * @param userName the userName to set
+ */
+ public void setUserName(String userName) {
+ this.userName = userName;
+ }
+
}
diff --git a/src/main/java/org/support/project/knowledge/logic/UserLogic.java b/src/main/java/org/support/project/knowledge/logic/UserLogic.java
index 848d4bbb7..d015ce162 100644
--- a/src/main/java/org/support/project/knowledge/logic/UserLogic.java
+++ b/src/main/java/org/support/project/knowledge/logic/UserLogic.java
@@ -2,10 +2,12 @@
import java.util.HashMap;
import java.util.List;
+import java.util.Locale;
import java.util.Map;
import org.support.project.aop.Aspect;
import org.support.project.common.config.INT_FLAG;
+import org.support.project.common.config.Resources;
import org.support.project.common.log.Log;
import org.support.project.common.log.LogFactory;
import org.support.project.common.util.RandomUtil;
@@ -152,17 +154,19 @@ private void insertRoles(UsersEntity user, String[] roles) {
* 退会
* @param loginUserId
* @param knowledgeRemove
+ * @param locale
* @throws Exception
*/
@Aspect(advice=org.support.project.ormapping.transaction.Transaction.class)
- public void withdrawal(Integer loginUserId, boolean knowledgeRemove) throws Exception {
+ public void withdrawal(Integer loginUserId, boolean knowledgeRemove, Locale locale) throws Exception {
// アカウント削除
UsersDao usersDao = UsersDao.get();
UsersEntity user = usersDao.selectOnKey(loginUserId);
if (user != null) {
user.setPassword(RandomUtil.randamGen(32));
user.setUserKey(RandomUtil.randamGen(32));
- user.setUserName("削除済ユーザー");
+ Resources resources = Resources.getInstance(locale);
+ user.setUserName(resources.getResource("knowledge.withdrawal.label.name"));
user.setDeleteFlag(INT_FLAG.ON.getValue());
usersDao.update(user);
usersDao.delete(loginUserId);
diff --git a/src/main/resources/appresource.properties b/src/main/resources/appresource.properties
index a31622d14..0e4f00957 100644
--- a/src/main/resources/appresource.properties
+++ b/src/main/resources/appresource.properties
@@ -51,7 +51,7 @@ message.success.save.target={1} was Saved.
message.allready.updated=Allready updated.
# Common Label
-label.version=0.4.4
+label.version=0.4.5
label.login=Sign in
label.previous = Previous
label.next=Next
@@ -82,6 +82,7 @@ label.download=Download
label.upload=Upload
label.backup=Backup
label.restore=Restore
+label.back=Back
label.public.view= [Public]
label.protect.view= [Protection]
@@ -175,6 +176,10 @@ knowledge.edit.label.confirm.delete=Are you sure you want to delete?
knowledge.edit.noaccess=It is not possible to edit other than those that have registered their
knowledge.delete.none=Knowledge to be deleted is not specified
+knowledge.likes.title=User list that was me press the "Like"
+knowledge.likes.list.label.empty=In this page, the user presses the "Like" did not have
+knowledge.likes.anonymous=Anonymous (not sign in user)
+
knowledge.signup.title=Sign Up
knowledge.signup.label.mail=Mail Address (will at the time of signin ID and / There is no published is that)
knowledge.signup.label.name=User Name (The name that display in this service)
@@ -197,6 +202,7 @@ knowledge.withdrawal.label.remove=Remove
knowledge.withdrawal.label.leave=Leave (registrant name will be "deleted user")
knowledge.withdrawal.label.bottun=The withdrawal will be made (not cancel)
knowledge.withdrawal.label.confirm=Do you really sure you want to run the withdrawal?
can not be undone this process.
+knowledge.withdrawal.label.name=deleted user
knowledge.registration.result.title=Registration Result
knowledge.registration.msg.wait=I accept the registration.
use the start of the service, has become necessary to confirm the administrator. Please wait until the confirmation of
administrator.
@@ -234,8 +240,8 @@ knowledge.user.list.title=User List
knowledge.user.list.label.empty=The data corresponding to the condition does not exist. Please switch the page.
knowledge.user.add.title=Add User
knowledge.user.edit.title=Edit User
-knowledge.user.invalid.same.password=Password\u3068Confirm Password\u304c\u9055\u3063\u3066\u3044\u307e\u3059
-knowledge.user.mail.exist=\u65e2\u306b\u767b\u9332\u3055\u308c\u3066\u3044\u308bEmail Address\u3067\u3059
+knowledge.user.invalid.same.password=Password and Confirm Password has a different
+knowledge.user.mail.exist=The Email Address already registered
knowledge.group.view.title=View Group
knowledge.group.view.label.groupname=Group name
diff --git a/src/main/resources/appresource_ja.properties b/src/main/resources/appresource_ja.properties
index e80c511aa..35aabd663 100644
--- a/src/main/resources/appresource_ja.properties
+++ b/src/main/resources/appresource_ja.properties
@@ -51,7 +51,7 @@ message.success.save.target={1} \u4fdd\u5b58\u3057\u307e\u3057\u305f\u3002
message.allready.updated=\u3059\u3067\u306b\u66f4\u65b0\u3055\u308c\u3066\u3044\u307e\u3059
# Common Label
-label.version=0.4.4
+label.version=0.4.5
label.login=\u30b5\u30a4\u30f3\u30a4\u30f3
label.previous = \u524d\u3078
label.next = \u6b21\u3078
@@ -82,6 +82,7 @@ label.download=\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9
label.upload=\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9
label.backup=\u30d0\u30c3\u30af\u30a2\u30c3\u30d7
label.restore=\u5fa9\u5143
+label.back=\u623b\u308b
label.public.view= [\u516c\u958b]
label.protect.view= [\u4fdd\u8b77]
@@ -175,6 +176,10 @@ knowledge.edit.label.confirm.delete=\u672c\u5f53\u306b\u524a\u9664\u3057\u307e\u
knowledge.edit.noaccess=\u81ea\u5206\u3067\u767b\u9332\u3057\u305f\u3082\u306e\u4ee5\u5916\u306f\u7de8\u96c6\u51fa\u6765\u307e\u305b\u3093
knowledge.delete.none=\u524a\u9664\u3059\u308b\u30ca\u30ec\u30c3\u30b8\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093
+knowledge.likes.title=\u53c2\u8003\u306b\u306a\u3063\u305f\u3092\u62bc\u3057\u3066\u304f\u308c\u305f\u30e6\u30fc\u30b6\u4e00\u89a7
+knowledge.likes.list.label.empty=\u3053\u306e\u30da\u30fc\u30b8\u3067\u306f\u3001\u53c2\u8003\u306b\u306a\u3063\u305f\uff01\u3092\u62bc\u3057\u305f\u30e6\u30fc\u30b6\u306f\u3044\u307e\u305b\u3093\u3067\u3057\u305f
+knowledge.likes.anonymous=Anonymous(\u672a\u30ed\u30b0\u30a4\u30f3\u30e6\u30fc\u30b6)
+
knowledge.signup.title=\u30e6\u30fc\u30b6\u65b0\u898f\u767b\u9332
knowledge.signup.label.mail=\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9(\u30ed\u30b0\u30a4\u30f3\u6642\u306eID\u306b\u306a\u308a\u307e\u3059/\u516c\u958b\u3055\u308c\u308b\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093)
knowledge.signup.label.name=\u540d\u524d(\u3053\u306e\u30b5\u30fc\u30d3\u30b9\u306e\u4e2d\u3067\u8868\u793a\u3055\u308c\u308b\u540d\u79f0\u3067\u3059)
@@ -194,9 +199,10 @@ knowledge.account.delete=\u3054\u5229\u7528\u3042\u308a\u304c\u3068\u3046\u3054\
knowledge.withdrawal.title=\u9000\u4f1a
knowledge.withdrawal.msg=Knowledge\u306e\u30b5\u30fc\u30d3\u30b9\u304b\u3089\u9000\u4f1a\u3057\u307e\u3059\u3002
\u4eca\u307e\u3067\u767b\u9332\u3057\u305f\u30ca\u30ec\u30c3\u30b8\u3092\u3069\u3046\u3057\u307e\u3059\u304b\uff1f
knowledge.withdrawal.label.remove=\u524a\u9664\u3059\u308b
-knowledge.withdrawal.label.leave=Leave (registrant name will be "deleted user")
+knowledge.withdrawal.label.leave=\u6b8b\u3059 (\u30ca\u30ec\u30c3\u30b8\u306e\u767b\u9332\u8005\u306f "\u9000\u4f1a\u6e08" \u306b\u306a\u308a\u307e\u3059)
knowledge.withdrawal.label.bottun=\u9000\u4f1a\u3059\u308b\uff08\u53d6\u308a\u6d88\u305b\u307e\u305b\u3093\uff09
knowledge.withdrawal.label.confirm=\u672c\u5f53\u306b\u9000\u4f1a\u3092\u5b9f\u884c\u3057\u3066\u3088\u308d\u3057\u3044\u3067\u3059\u304b\uff1f
\u3053\u306e\u51e6\u7406\u306f\u53d6\u308a\u6d88\u305b\u307e\u305b\u3093\u3002
+knowledge.withdrawal.label.name=\u9000\u4f1a\u6e08
knowledge.registration.result.title=\u767b\u9332\u53d7\u4ed8\u7d50\u679c
knowledge.registration.msg.wait=\u767b\u9332\u3092\u53d7\u3051\u4ed8\u3051\u307e\u3057\u305f\u3002
\u672c\u30b5\u30fc\u30d3\u30b9\u306e\u5229\u7528\u958b\u59cb\u306f\u3001\u7ba1\u7406\u8005\u306e\u78ba\u8a8d\u304c\u5fc5\u8981\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002
\u7ba1\u7406\u8005\u306e\u78ba\u8a8d\u307e\u3067\u3057\u3070\u3089\u304f\u304a\u5f85\u3061\u304f\u3060\u3055\u3044\u3002
diff --git a/src/main/resources/org/support/project/knowledge/dao/sql/LikesDao/LikesDao_selectOnKnowledge.sql b/src/main/resources/org/support/project/knowledge/dao/sql/LikesDao/LikesDao_selectOnKnowledge.sql
new file mode 100644
index 000000000..71eb3b476
--- /dev/null
+++ b/src/main/resources/org/support/project/knowledge/dao/sql/LikesDao/LikesDao_selectOnKnowledge.sql
@@ -0,0 +1,15 @@
+SELECT
+ LIKES.*,
+ USERS.USER_NAME
+ FROM
+ LIKES
+ LEFT OUTER JOIN USERS ON (LIKES.INSERT_USER = USERS.USER_ID)
+ WHERE
+ LIKES.KNOWLEDGE_ID = ?
+ AND LIKES.DELETE_FLAG = 0
+ ORDER BY
+ LIKES.UPDATE_DATETIME DESC LIMIT ? OFFSET ?;
+
+
+
+
diff --git a/src/main/webapp/WEB-INF/views/open/knowledge/likes.jsp b/src/main/webapp/WEB-INF/views/open/knowledge/likes.jsp
new file mode 100644
index 000000000..87216d0b8
--- /dev/null
+++ b/src/main/webapp/WEB-INF/views/open/knowledge/likes.jsp
@@ -0,0 +1,91 @@
+<%@page import="org.support.project.web.util.JspUtil"%>
+<%@page pageEncoding="UTF-8" isELIgnored="false" session="false"
+ errorPage="/WEB-INF/views/commons/errors/jsp_error.jsp"%>
+<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
+<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
+
+<%
+ JspUtil jspUtil = new JspUtil(request, pageContext);
+%>
+
+
+
+
+
+
+
+
+
+
+ <%= jspUtil.label("knowledge.likes.title") %>
+ page[<%= jspUtil.getValue("page", Integer.class) + 1 %>]
+
+
+
+
+
+
+
+<%= jspUtil.label("knowledge.likes.list.label.empty") %>
+
+
+
+ -
+
+
+
+ <%= jspUtil.label("knowledge.likes.anonymous") %>
+
+ <%= jspUtil.out("like.userName") %>
+
+
+
+ <%= jspUtil.date("like.insertDatetime")%>
+
+
+
+
+
+
+
+
+
+ <%= jspUtil.out("params") %>"
+ class="btn btn-warning" role="button"> <%= jspUtil.label("label.back") %>
+
+
+ <%= jspUtil.out("params") %>"
+ class="btn btn-success" role="button"> <%= jspUtil.label("knowledge.view.back.list") %>
+
+
+
+
+
+
diff --git a/src/main/webapp/WEB-INF/views/open/knowledge/list.jsp b/src/main/webapp/WEB-INF/views/open/knowledge/list.jsp
index 886bf68ce..c61a2f591 100644
--- a/src/main/webapp/WEB-INF/views/open/knowledge/list.jsp
+++ b/src/main/webapp/WEB-INF/views/open/knowledge/list.jsp
@@ -59,17 +59,17 @@
<%-- --%>
- <%= jspUtil.out("knowledge.content", JspUtil.ESCAPE_CLEAR) %>
+ <%= jspUtil.out("knowledge.content", JspUtil.ESCAPE_CLEAR, 200) %>
@@ -145,7 +145,7 @@
<%= jspUtil.label("knowledge.list.menu.search") %>
&keyword=<%= jspUtil.out("keyword") %>&tag=<%= jspUtil.out("tag") %>&user=<%= jspUtil.out("user") %>"
+ href="<%= request.getContextPath() %>/protect.knowledge/view_add<%= jspUtil.out("params") %>"
style="cursor: pointer;">
<%= jspUtil.label("knowledge.list.menu.add") %>
@@ -181,7 +181,7 @@
- <%= jspUtil.label("knowledge.list.history") %> -
diff --git a/src/main/webapp/WEB-INF/views/open/knowledge/view.jsp b/src/main/webapp/WEB-INF/views/open/knowledge/view.jsp
index a9d848305..9cc4eefbe 100644
--- a/src/main/webapp/WEB-INF/views/open/knowledge/view.jsp
+++ b/src/main/webapp/WEB-INF/views/open/knowledge/view.jsp
@@ -9,8 +9,6 @@
<% JspUtil jspUtil = new JspUtil(request, pageContext); %>
-<% String params = "offset=" + jspUtil.out("offset") + "&keyword=" + jspUtil.out("keyword") + "&tag=" + jspUtil.out("tag") + "&user=" + jspUtil.out("user"); %>
-
@@ -51,23 +49,28 @@ var LABEL_LIKE = '<%= jspUtil.label("knowledge.view.like") %>';
-
+
"
alt="icon" width="36" height="36" style="float:left" />
- ">
- <%= jspUtil.out("insertUserName") %>
-
+
+ <%= jspUtil.date("updateDatetime")%>
<%= jspUtil.is(String.valueOf(KnowledgeLogic.PUBLIC_FLAG_PUBLIC), "publicFlag",
jspUtil.label("label.public.view")) %>
@@ -76,7 +79,10 @@ var LABEL_LIKE = '<%= jspUtil.label("knowledge.view.like") %>';
<%= jspUtil.is(String.valueOf(KnowledgeLogic.PUBLIC_FLAG_PROTECT), "publicFlag",
jspUtil.label("label.protect.view")) %>
- <%= jspUtil.date("updateDatetime")%>
+
+ ">
+ <%= jspUtil.out("insertUserName") %>
+
@@ -99,19 +105,19 @@ var LABEL_LIKE = '<%= jspUtil.label("knowledge.view.like") %>';
<% if (request.getRemoteUser() != null) {
if (request.isUserInRole("admin")
|| jspUtil.out("insertUser").equals(request.getRemoteUser())) { %>
- ?<%= params %>"
+ <%= jspUtil.out("params") %>"
class="btn btn-primary" role="button">
<%= jspUtil.label("label.edit") %>
<% } %>
<% } else { %>
- ?<%= params %>"
+ <%= jspUtil.out("params") %>"
class="btn btn-primary" role="button">
<%= jspUtil.label("knowledge.view.edit.with.login") %>
<% } %>
- ?<%= params %>"
+ <%= jspUtil.out("params") %>"
class="btn btn-success" role="button"> <%= jspUtil.label("knowledge.view.back.list") %>
@@ -157,9 +163,15 @@ var LABEL_LIKE = '<%= jspUtil.label("knowledge.view.like") %>';
<% if (request.getRemoteUser() != null) { %>
-
<% } else { %>
diff --git a/src/main/webapp/WEB-INF/views/protect/knowledge/view_edit.jsp b/src/main/webapp/WEB-INF/views/protect/knowledge/view_edit.jsp
index 0068186fc..5764419cf 100644
--- a/src/main/webapp/WEB-INF/views/protect/knowledge/view_edit.jsp
+++ b/src/main/webapp/WEB-INF/views/protect/knowledge/view_edit.jsp
@@ -134,21 +134,25 @@ selectedGroups.push({label: '<%= jspUtil.out("group.groupName") %>', value: '<%=
-
" />
+
" />
" />
" />
+ " />
+
<%= jspUtil.label("label.save") %>
<%= jspUtil.label("label.preview") %>
<%= jspUtil.label("label.delete") %>
- ?offset=<%= jspUtil.out("offset") %>&keyword=<%= jspUtil.out("keyword") %>&tag=<%= jspUtil.out("tag") %>&user=<%= jspUtil.out("user") %>"
- class="btn btn-warning" role="button"> <%= jspUtil.label("label.cancel") %>
- ?keyword=<%= jspUtil.out("keyword") %>&tag=<%= jspUtil.out("tag") %>&user=<%= jspUtil.out("user") %>"
- class="btn btn-success" role="button"> <%= jspUtil.label("label.backlist") %>
+ <%= jspUtil.out("params") %>"
+ class="btn btn-warning" role="button"> <%= jspUtil.label("label.cancel") %>
+
+ <%= jspUtil.out("params") %>"
+ class="btn btn-success" role="button"> <%= jspUtil.label("label.backlist") %>
+
diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml
index 97fc862c0..51d71552e 100644
--- a/src/main/webapp/WEB-INF/web.xml
+++ b/src/main/webapp/WEB-INF/web.xml
@@ -55,6 +55,14 @@
auth-class-name
org.support.project.web.logic.impl.DefaultAuthenticationLogicImpl
+
+ cookie-max-age
+ 10
+
+
+ cookie-secure
+ false
+