[Notice] Announcing the End of Demo Server [Read me]

fix user info link error at board
@cea82c21d774581199920c33441ae0f574f3a7bb
--- app/controllers/BoardApp.java
+++ app/controllers/BoardApp.java
... | ... | @@ -4,18 +4,27 @@ |
4 | 4 |
|
5 | 5 |
package controllers; |
6 | 6 |
|
7 |
-import models.*; |
|
8 |
-import models.enumeration.*; |
|
7 |
+import java.io.File; |
|
8 |
+ |
|
9 |
+import models.Attachment; |
|
10 |
+import models.Comment; |
|
11 |
+import models.Post; |
|
12 |
+import models.Project; |
|
13 |
+import models.enumeration.Direction; |
|
14 |
+import models.enumeration.Operation; |
|
15 |
+import models.enumeration.Resource; |
|
9 | 16 |
import play.Logger; |
10 | 17 |
import play.data.Form; |
11 |
-import play.mvc.*; |
|
18 |
+import play.mvc.Controller; |
|
12 | 19 |
import play.mvc.Http.MultipartFormData; |
13 | 20 |
import play.mvc.Http.MultipartFormData.FilePart; |
14 | 21 |
import play.mvc.Http.Request; |
15 |
-import utils.*; |
|
16 |
-import views.html.board.*; |
|
17 |
- |
|
18 |
-import java.io.*; |
|
22 |
+import play.mvc.Result; |
|
23 |
+import utils.AccessControl; |
|
24 |
+import utils.Constants; |
|
25 |
+import views.html.board.editPost; |
|
26 |
+import views.html.board.newPost; |
|
27 |
+import views.html.board.postList; |
|
19 | 28 |
|
20 | 29 |
public class BoardApp extends Controller { |
21 | 30 |
|
... | ... | @@ -76,6 +85,7 @@ |
76 | 85 |
} else { |
77 | 86 |
Post post = postForm.get(); |
78 | 87 |
post.authorId = UserApp.currentUser().id; |
88 |
+ post.authorLoginId = UserApp.currentUser().loginId; |
|
79 | 89 |
post.authorName = UserApp.currentUser().name; |
80 | 90 |
post.commentCount = 0; |
81 | 91 |
post.filePath = saveFile(request()); |
... | ... | @@ -116,6 +126,7 @@ |
116 | 126 |
Comment comment = commentForm.get(); |
117 | 127 |
comment.post = Post.findById(postId); |
118 | 128 |
comment.authorId = UserApp.currentUser().id; |
129 |
+ comment.authorLoginId = UserApp.currentUser().loginId; |
|
119 | 130 |
comment.authorName = UserApp.currentUser().name; |
120 | 131 |
comment.filePath = saveFile(request()); |
121 | 132 |
|
--- app/controllers/ProjectApp.java
+++ app/controllers/ProjectApp.java
... | ... | @@ -22,7 +22,7 @@ |
22 | 22 |
import views.html.project.newProject; |
23 | 23 |
import views.html.project.projectHome; |
24 | 24 |
import views.html.project.setting; |
25 |
-import views.html.projectList; |
|
25 |
+import views.html.project.projectList; |
|
26 | 26 |
|
27 | 27 |
import com.avaje.ebean.ExpressionList; |
28 | 28 |
import com.avaje.ebean.Page; |
--- app/controllers/UserApp.java
+++ app/controllers/UserApp.java
... | ... | @@ -210,7 +210,7 @@ |
210 | 210 |
return ok(memberInfo.render(user)); |
211 | 211 |
} |
212 | 212 |
|
213 |
- public static Result user(String loginId){ |
|
213 |
+ public static Result userInfo(String loginId){ |
|
214 | 214 |
User user = User.findByLoginId(loginId); |
215 | 215 |
return ok(memberInfo.render(user)); |
216 | 216 |
} |
--- app/views/board/post.scala.html
+++ app/views/board/post.scala.html
... | ... | @@ -14,10 +14,10 @@ |
14 | 14 |
</div> |
15 | 15 |
<div class="board-body"> |
16 | 16 |
<div class="author-info"> |
17 |
- <a href="@routes.UserApp.user(post.authorLoginId)" class="pull-left img-rounded"><img src="/assets/images/default-avatar-34.png" class="media-object" width="32" height="32" alt="avatar"></a> |
|
17 |
+ <a href="@routes.UserApp.userInfo(post.authorLoginId)" class="pull-left img-rounded"><img src="/assets/images/default-avatar-34.png" class="media-object" width="32" height="32" alt="avatar"></a> |
|
18 | 18 |
<div class="media-body"> |
19 | 19 |
<p> |
20 |
- <a href="@routes.UserApp.user(post.authorLoginId)"><strong>@post.authorName</strong></a> <!--<span class="name">(Loren Brichter)</span>--> |
|
20 |
+ <a href="@routes.UserApp.userInfo(post.authorLoginId)"><strong>@post.authorName</strong></a> <!--<span class="name">(Loren Brichter)</span>--> |
|
21 | 21 |
</p> |
22 | 22 |
<p class="status"> |
23 | 23 |
<!--Hit <strong class="num">777</strong> -->Comment <strong class="num">@post.commentCount</strong><!-- Like <i class="ico ico-like-small"></i> <strong class="num">522</strong>--> |
... | ... | @@ -37,12 +37,12 @@ |
37 | 37 |
<ul class="comments"> |
38 | 38 |
@for(comment <-post.comments){ |
39 | 39 |
<li class="comment"> |
40 |
- <a href="@routes.UserApp.user(comment.authorLoginId)" class="pull-left img-rounded"><img src="/assets/images/default-avatar-34.png" width="32" height="32" class="media-object" alt="avatar"></a> |
|
40 |
+ <a href="@routes.UserApp.userInfo(comment.authorLoginId)" class="pull-left img-rounded"><img src="/assets/images/default-avatar-34.png" width="32" height="32" class="media-object" alt="avatar"></a> |
|
41 | 41 |
<div class="media-body"> |
42 | 42 |
@roleCheck(session.get("userId"), project.id, Resource.BOARD_COMMENT, Operation.DELETE, comment.id){ |
43 | 43 |
<a class="pull-right close" href="@routes.BoardApp.deleteComment(project.owner, project.name, post.id, comment.id)">×</a> |
44 | 44 |
} |
45 |
- <p class="commenter"><a href="@routes.UserApp.user(comment.authorLoginId)"><strong>@comment.authorName</strong></a><!-- <span class="name">(Sam sstephenson)</span> --> <span class="date">@utils.TemplateHelper.agoString(post.ago())</span></p> |
|
45 |
+ <p class="commenter"><a href="@routes.UserApp.userInfo(comment.authorLoginId)"><strong>@comment.authorName</strong></a><!-- <span class="name">(Sam sstephenson)</span> --> <span class="date">@utils.TemplateHelper.agoString(post.ago())</span></p> |
|
46 | 46 |
<div class="comment-body" markdown resourceType=@Resource.BOARD_COMMENT resourceId=@comment.id>@comment.contents</div> |
47 | 47 |
<!-- |
48 | 48 |
<ul class="attaches"> |
--- app/views/board/postList.scala.html
+++ app/views/board/postList.scala.html
... | ... | @@ -59,13 +59,13 @@ |
59 | 59 |
<div class="attach-wrap"></div> |
60 | 60 |
<div class="contents"> |
61 | 61 |
<p class="title"><a href="@routes.BoardApp.post(project.owner, project.name, post.id)">@post.title</a></p> |
62 |
- <p class="infos nm">by <a href="@routes.UserApp.user(post.authorLoginId)" class="author">@post.authorName</a> <span class="date">@utils.TemplateHelper.agoString(post.ago())</span></p> |
|
62 |
+ <p class="infos nm">by <a href="@routes.UserApp.userInfo(post.authorLoginId)" class="author">@post.authorName</a> <span class="date">@utils.TemplateHelper.agoString(post.ago())</span></p> |
|
63 | 63 |
</div> |
64 | 64 |
<div class="right-panel"> |
65 | 65 |
<div class="comment-wrap"> |
66 | 66 |
<i class="ico ico-comment-bubble"></i><span class="num">@post.commentCount</span> |
67 | 67 |
</div> |
68 |
- <a href="@routes.UserApp.user(post.authorLoginId)" class="author-avatar img-rounded pull-right"> |
|
68 |
+ <a href="@routes.UserApp.userInfo(post.authorLoginId)" class="author-avatar img-rounded pull-right"> |
|
69 | 69 |
<img class="user-picture" src="@urlToPicture(User.find.byId(post.authorId).email, 34)" alt="@post.authorName"> |
70 | 70 |
</div> |
71 | 71 |
</li> |
--- app/views/issue/issueList.scala.html
+++ app/views/issue/issueList.scala.html
... | ... | @@ -113,7 +113,7 @@ |
113 | 113 |
<td class="attachmend attached">@if(Attachment.findByContainer(Resource.ISSUE_POST, issue.id).size > 0){<span class="icon-file"/>}</td> |
114 | 114 |
<td class="info"> |
115 | 115 |
<p><a href="@routes.IssueApp.issue(project.owner, project.name, issue.id)">@issue.title</a></p> |
116 |
- <p class="author">by <a href="@routes.UserApp.user(issue.authorLoginId)">@Option(issue.getAuthorName).orElse(Option(Messages("issue.noAuthor"))).get</a> @agoString(issue.ago)</p> |
|
116 |
+ <p class="author">by <a href="@routes.UserApp.userInfo(issue.authorLoginId)">@Option(issue.getAuthorName).orElse(Option(Messages("issue.noAuthor"))).get</a> @agoString(issue.ago)</p> |
|
117 | 117 |
</td> |
118 | 118 |
<td class="state @issue.state.toString.toLowerCase">@Messages(issue.state.state)</td> |
119 | 119 |
<td class="comments"> |
--- app/views/projectList.scala.html
+++ app/views/project/projectList.scala.html
No changes |
--- conf/initial-data.yml
+++ conf/initial-data.yml
... | ... | @@ -77,6 +77,7 @@ |
77 | 77 |
title: 게시판이 새로 생성되었습니다. |
78 | 78 |
contents: 새로운 게시판에서 많은 활동 부탁드립니다. |
79 | 79 |
authorId: 2 |
80 |
+ authorLoginId: hobi |
|
80 | 81 |
authorName: hobi |
81 | 82 |
commentCount: 1 |
82 | 83 |
project: !!models.Project |
--- conf/routes
+++ conf/routes
... | ... | @@ -141,4 +141,4 @@ |
141 | 141 |
|
142 | 142 |
# Statistics |
143 | 143 |
GET /:user/:project/statistics controllers.StatisticsApp.statistics(user, project) |
144 |
-GET /:user controllers.UserApp.user(user) |
|
144 |
+GET /:user controllers.UserApp.userInfo(user) |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?