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

apply markup : codeBrowser because main.scala.html, many files changed. it's not perfectly work. but it's working.
because main.scala.html, many files changed. it's not perfectly work. but it's working.
@af28ddb7910be7e19ce117644ca1281b684737ca
--- app/controllers/CodeApp.java
+++ app/controllers/CodeApp.java
... | ... | @@ -11,7 +11,9 @@ |
11 | 11 |
import play.mvc.Result; |
12 | 12 |
import playRepository.RepositoryService; |
13 | 13 |
import utils.Config; |
14 |
+import play.Logger; |
|
14 | 15 |
import views.html.code.codeView; |
16 |
+import views.html.code.nohead; |
|
15 | 17 |
|
16 | 18 |
import javax.servlet.ServletException; |
17 | 19 |
import java.io.IOException; |
... | ... | @@ -25,6 +27,9 @@ |
25 | 27 |
if (RepositoryService.VCS_GIT.equals(project.vcs)) { |
26 | 28 |
String msg = "Clone this Repository : git clone " + CodeApp.getURL(userName, projectName); |
27 | 29 |
List<String> branches = RepositoryService.getRepository(project).getBranches(); |
30 |
+ if(branches.size() == 0){ |
|
31 |
+ return ok(nohead.render("no Head", project)); |
|
32 |
+ } |
|
28 | 33 |
return ok(codeView.render(msg, project, branches)); |
29 | 34 |
} else if (RepositoryService.VCS_SUBVERSION.equals(project.vcs)) { |
30 | 35 |
String msg = "Check out Repository : svn checkout " + CodeApp.getSvnURL(userName, projectName); |
--- app/views/board/editPost.scala.html
+++ app/views/board/editPost.scala.html
... | ... | @@ -5,6 +5,7 @@ |
5 | 5 |
@implicitField = @{ helper.FieldConstructor(simpleForm) } |
6 | 6 |
|
7 | 7 |
@main(title, project, utils.MenuType.BOARD) { |
8 |
+<div class="page"> |
|
8 | 9 |
@pageTitle(project,"Board") |
9 | 10 |
<div class="content-wrap"> |
10 | 11 |
|
... | ... | @@ -61,10 +62,13 @@ |
61 | 62 |
</div> |
62 | 63 |
} |
63 | 64 |
</div> |
64 |
- <script>nforge.require("board.vaildate");</script> |
|
65 |
+</div> |
|
65 | 66 |
|
66 |
- @views.html.markdown() |
|
67 |
- <script type="text/javascript"> |
|
68 |
- nforge.require('shortcut.submit'); |
|
69 |
- </script> |
|
67 |
+<script>nforge.require("board.vaildate");</script> |
|
68 |
+ |
|
69 |
+@views.html.markdown() |
|
70 |
+<script type="text/javascript"> |
|
71 |
+ nforge.require('shortcut.submit'); |
|
72 |
+</script> |
|
73 |
+ |
|
70 | 74 |
} |
--- app/views/board/newPost.scala.html
+++ app/views/board/newPost.scala.html
... | ... | @@ -4,7 +4,8 @@ |
4 | 4 |
@implicitField = @{ helper.FieldConstructor(simpleForm) } |
5 | 5 |
|
6 | 6 |
@main(title, project, utils.MenuType.BOARD) { |
7 |
-@pageTitle(project,"Board") |
|
7 |
+<div class="page"> |
|
8 |
+ @pageTitle(project,"Board") |
|
8 | 9 |
<div class="content-wrap"> |
9 | 10 |
|
10 | 11 |
@helper.form(action=routes.BoardApp.savePost(project.owner, project.name), 'enctype -> "multipart/form-data", 'class->"nm"){ |
... | ... | @@ -60,11 +61,11 @@ |
60 | 61 |
</div> |
61 | 62 |
} |
62 | 63 |
</div> |
64 |
+</div> |
|
65 |
+<script>nforge.require("board.vaildate");</script> |
|
63 | 66 |
|
64 |
- <script>nforge.require("board.vaildate");</script> |
|
65 |
- |
|
66 |
- @views.html.markdown() |
|
67 |
- <script type="text/javascript"> |
|
68 |
- nforge.require('shortcut.submit'); |
|
69 |
- </script> |
|
67 |
+@views.html.markdown() |
|
68 |
+<script type="text/javascript"> |
|
69 |
+nforge.require('shortcut.submit'); |
|
70 |
+</script> |
|
70 | 71 |
} |
--- app/views/board/post.scala.html
+++ app/views/board/post.scala.html
... | ... | @@ -5,138 +5,139 @@ |
5 | 5 |
@implicitField = @{ helper.FieldConstructor(simpleForm) } |
6 | 6 |
|
7 | 7 |
@main("상세보기", project, utils.MenuType.BOARD){ |
8 |
-@pageTitle(project,"Board") |
|
9 |
-<div class="board-header"> |
|
10 |
- <div class="board-id div">@post.id</div> |
|
11 |
- <h1 class="title div">@post.title</h1> |
|
12 |
- <div class="date div">@utils.TemplateHelper.agoString(post.ago())</div> |
|
13 |
-</div> |
|
14 |
-<div class="board-body"> |
|
15 |
- <div class="author-info"> |
|
16 |
- <a href="@routes.UserApp.userInfo(post.authorName)" class="pull-left img-rounded"><img src="/assets/images/default-avatar-34.png" class="media-object" width="32" height="32" alt="avatar"></a> |
|
17 |
- <div class="media-body"> |
|
18 |
- <p> |
|
19 |
- <a href="@routes.UserApp.userInfo(post.authorName)"><strong>@post.authorName</strong></a> <!--<span class="name">(Loren Brichter)</span>--> |
|
20 |
- </p> |
|
21 |
- <p class="status"> |
|
22 |
- <!--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>--> |
|
23 |
- </p> |
|
24 |
- </div> |
|
25 |
- </div> |
|
26 |
- <div class="content" markdown resourceType=@Resource.BOARD_POST resourceId="@post.id">@post.contents</div> |
|
27 |
- <!-- |
|
28 |
- <ul class="attaches wm"> |
|
29 |
- <li class="attach"><i class="ico ico-clip"></i>K23.png (11KB)</li> |
|
30 |
- <li class="attach"><i class="ico ico-clip"></i>K23.png (11KB)</li> |
|
31 |
- <li class="attach"><i class="ico ico-clip"></i>K23.png (11KB)</li> |
|
32 |
- </ul>--> |
|
33 |
-</div> |
|
34 |
-<div class="board-comment-wrap"> |
|
35 |
- <div class="comment-header"><strong>Comment</strong> <strong class="num">5</strong></div> |
|
36 |
- <ul class="comments"> |
|
37 |
- @for(comment <-post.comments){ |
|
38 |
- <li class="comment"> |
|
39 |
- <a href="@routes.UserApp.userInfo(comment.authorName)" class="pull-left img-rounded"><img src="/assets/images/default-avatar-34.png" width="32" height="32" class="media-object" alt="avatar"></a> |
|
8 |
+<div class="page board-view"> |
|
9 |
+ @pageTitle(project,"Board") |
|
10 |
+ <div class="board-header"> |
|
11 |
+ <div class="board-id div">@post.id</div> |
|
12 |
+ <h1 class="title div">@post.title</h1> |
|
13 |
+ <div class="date div">@utils.TemplateHelper.agoString(post.ago())</div> |
|
14 |
+ </div> |
|
15 |
+ <div class="board-body"> |
|
16 |
+ <div class="author-info"> |
|
17 |
+ <a href="@routes.UserApp.userInfo(post.authorName)" class="pull-left img-rounded"><img src="/assets/images/default-avatar-34.png" class="media-object" width="32" height="32" alt="avatar"></a> |
|
40 | 18 |
<div class="media-body"> |
41 |
- @roleCheck(session.get("userId"), project.id, Resource.BOARD_COMMENT, Operation.DELETE, comment.id){ |
|
42 |
- <a class="pull-right close" href="@routes.BoardApp.deleteComment(project.owner, project.name, post.id, comment.id)">×</a> |
|
43 |
- } |
|
44 |
- <p class="commenter"><a href="@routes.UserApp.userInfo(comment.authorName)"><strong>@comment.authorName</strong></a><!-- <span class="name">(Sam sstephenson)</span> --> <span class="date">@utils.TemplateHelper.agoString(post.ago())</span></p> |
|
45 |
- <div class="comment-body" markdown resourceType=@Resource.BOARD_COMMENT resourceId=@comment.id>@comment.contents</div> |
|
46 |
- <!-- |
|
47 |
- <ul class="attaches"> |
|
48 |
- <li class="attach"><i class="ico ico-clip"></i><a href="/file-down">첨부파일(iabcde-test.exe) <i class="ico ico-blue-dot"></i> Donwload</a></li> |
|
49 |
- </ul>--> |
|
50 |
- </div> |
|
51 |
- </li> |
|
52 |
- } |
|
53 |
- </ul> |
|
54 |
- @roleCheck(session.get("userId"), project.id, Resource.BOARD_COMMENT, Operation.WRITE){ |
|
55 |
- <div class="write-comment-box"> |
|
56 |
- @helper.form(routes.BoardApp.saveComment(project.owner, project.name, post.id), 'class->"nm", 'enctype -> "multipart/form-data"){ |
|
57 |
- <div class="write-comment-wrap"> |
|
58 |
- <!-- when the user signed in.. |
|
59 |
- <textarea class="text comment" name="comment></textarea> |
|
60 |
- --> |
|
61 |
- <style> |
|
62 |
- .write-comment-wrap div[div=preview] { |
|
63 |
- font-size: 12px; |
|
64 |
- width : 729px; |
|
65 |
- min-height: 80px; |
|
66 |
- margin:0px; |
|
67 |
- display: inline-block; |
|
68 |
- vertical-align : middle; |
|
69 |
- } |
|
70 |
- .write-comment-wrap div{font-size: 10px;} |
|
71 |
- </style> |
|
72 |
- @helper.textarea(commentForm("contents"), 'placeholder->"로그인 후 댓글 입력이 가능합니다.", 'class->"text comment", 'markdown->true) |
|
73 |
- <button class="comment-btn">COMMENT</button> |
|
74 |
- <div class="file-attachment"></div> |
|
75 |
- </div> |
|
76 |
- <!-- |
|
77 |
- <div class="attach-wrap"> |
|
78 |
- <div class="thumb-wrap"> |
|
79 |
- <img src="/images/default-avatar-34.png" class="img-rounded" width="32" height="32" alt="avatar"> |
|
19 |
+ <p> |
|
20 |
+ <a href="@routes.UserApp.userInfo(post.authorName)"><strong>@post.authorName</strong></a> <!--<span class="name">(Loren Brichter)</span>--> |
|
21 |
+ </p> |
|
22 |
+ <p class="status"> |
|
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>--> |
|
24 |
+ </p> |
|
80 | 25 |
</div> |
81 |
- <div class="attach-info-wrap"> |
|
82 |
- <div> |
|
83 |
- <span class="progress-num">15%</span> |
|
84 |
- <span class="sp-line"> </span> |
|
85 |
- <strong>total</strong> |
|
86 |
- <span class="total-num">50MB</span> |
|
26 |
+ </div> |
|
27 |
+ <div class="content" markdown resourceType=@Resource.BOARD_POST resourceId="@post.id">@post.contents</div> |
|
28 |
+ <!-- |
|
29 |
+ <ul class="attaches wm"> |
|
30 |
+ <li class="attach"><i class="ico ico-clip"></i>K23.png (11KB)</li> |
|
31 |
+ <li class="attach"><i class="ico ico-clip"></i>K23.png (11KB)</li> |
|
32 |
+ <li class="attach"><i class="ico ico-clip"></i>K23.png (11KB)</li> |
|
33 |
+ </ul>--> |
|
34 |
+ </div> |
|
35 |
+ <div class="board-comment-wrap"> |
|
36 |
+ <div class="comment-header"><strong>Comment</strong> <strong class="num">@post.comments.size()</strong></div> |
|
37 |
+ <ul class="comments"> |
|
38 |
+ @for(comment <-post.comments){ |
|
39 |
+ <li class="comment"> |
|
40 |
+ <a href="@routes.UserApp.userInfo(comment.authorName)" class="pull-left img-rounded"><img src="/assets/images/default-avatar-34.png" width="32" height="32" class="media-object" alt="avatar"></a> |
|
41 |
+ <div class="media-body"> |
|
42 |
+ @roleCheck(session.get("userId"), project.id, Resource.BOARD_COMMENT, Operation.DELETE, comment.id){ |
|
43 |
+ <a class="pull-right close" href="@routes.BoardApp.deleteComment(project.owner, project.name, post.id, comment.id)">×</a> |
|
44 |
+ } |
|
45 |
+ <p class="commenter"><a href="@routes.UserApp.userInfo(comment.authorName)"><strong>@comment.authorName</strong></a><!-- <span class="name">(Sam sstephenson)</span> --> <span class="date">@utils.TemplateHelper.agoString(post.ago())</span></p> |
|
46 |
+ <div class="comment-body" markdown resourceType=@Resource.BOARD_COMMENT resourceId=@comment.id>@comment.contents</div> |
|
47 |
+ <!-- |
|
48 |
+ <ul class="attaches"> |
|
49 |
+ <li class="attach"><i class="ico ico-clip"></i><a href="/file-down">첨부파일(iabcde-test.exe) <i class="ico ico-blue-dot"></i> Donwload</a></li> |
|
50 |
+ </ul>--> |
|
51 |
+ </div> |
|
52 |
+ </li> |
|
53 |
+ } |
|
54 |
+ </ul> |
|
55 |
+ @roleCheck(session.get("userId"), project.id, Resource.BOARD_COMMENT, Operation.WRITE){ |
|
56 |
+ <div class="write-comment-box"> |
|
57 |
+ @helper.form(routes.BoardApp.saveComment(project.owner, project.name, post.id), 'class->"nm", 'enctype -> "multipart/form-data"){ |
|
58 |
+ <div class="write-comment-wrap"> |
|
59 |
+ <!-- when the user signed in.. |
|
60 |
+ <textarea class="text comment" name="comment></textarea> |
|
61 |
+ --> |
|
62 |
+ <style> |
|
63 |
+ .write-comment-wrap div[div=preview] { |
|
64 |
+ font-size: 12px; |
|
65 |
+ width : 729px; |
|
66 |
+ min-height: 80px; |
|
67 |
+ margin:0px; |
|
68 |
+ display: inline-block; |
|
69 |
+ vertical-align : middle; |
|
70 |
+ } |
|
71 |
+ .write-comment-wrap div{font-size: 10px;} |
|
72 |
+ </style> |
|
73 |
+ @helper.textarea(commentForm("contents"), 'placeholder->"로그인 후 댓글 입력이 가능합니다.", 'class->"text comment", 'markdown->true) |
|
74 |
+ <button class="comment-btn">COMMENT</button> |
|
75 |
+ <div class="file-attachment"></div> |
|
76 |
+ </div> |
|
77 |
+ <!-- |
|
78 |
+ <div class="attach-wrap"> |
|
79 |
+ <div class="thumb-wrap"> |
|
80 |
+ <img src="/images/default-avatar-34.png" class="img-rounded" width="32" height="32" alt="avatar"> |
|
87 | 81 |
</div> |
88 |
- <div class="progress-wrap"> |
|
89 |
- <div class="progress n4"> |
|
90 |
- <div class="bar orange" style="width: 40%;"></div> |
|
82 |
+ <div class="attach-info-wrap"> |
|
83 |
+ <div> |
|
84 |
+ <span class="progress-num">15%</span> |
|
85 |
+ <span class="sp-line"> </span> |
|
86 |
+ <strong>total</strong> |
|
87 |
+ <span class="total-num">50MB</span> |
|
88 |
+ </div> |
|
89 |
+ <div class="progress-wrap"> |
|
90 |
+ <div class="progress n4"> |
|
91 |
+ <div class="bar orange" style="width: 40%;"></div> |
|
92 |
+ </div> |
|
93 |
+ </div> |
|
94 |
+ <a href="#!/cancel"><i class="ico btn-cancel"></i></a> |
|
95 |
+ </div> |
|
96 |
+ <div class="btn-wrap"> |
|
97 |
+ <div class="ns-btn fake-file-wrap"><i class="ico ico-plus-blue"></i>UPLOAD |
|
98 |
+ <input type="file" class="file"> |
|
91 | 99 |
</div> |
92 | 100 |
</div> |
93 |
- <a href="#!/cancel"><i class="ico btn-cancel"></i></a> |
|
94 | 101 |
</div> |
95 |
- <div class="btn-wrap"> |
|
96 |
- <div class="ns-btn fake-file-wrap"><i class="ico ico-plus-blue"></i>UPLOAD |
|
97 |
- <input type="file" class="file"> |
|
98 |
- </div> |
|
99 |
- </div> |
|
100 |
- </div> |
|
101 |
- --> |
|
102 |
- } |
|
103 |
- <!--<div class="attached-files-wrap"> |
|
104 |
- <ul class="attached-files"> |
|
105 |
- <li class="attached-file"><strong>test-image.jpg(15MB)</strong><a href="#!/delete-attached-file" class="attached-delete"><i class="ico btn-delete"></i></a></li> |
|
106 |
- <li class="attached-file"><strong>test-image.jpg(15MB)</strong><a href="#!/delete-attached-file" class="attached-delete"><i class="ico btn-delete"></i></a></li> |
|
107 |
- <li class="attached-file"><strong>test-image.jpg(15MB)</strong><a href="#!/delete-attached-file" class="attached-delete"><i class="ico btn-delete"></i></a></li> |
|
108 |
- </ul> |
|
109 |
- </div>--> |
|
102 |
+ --> |
|
103 |
+ } |
|
104 |
+ <!--<div class="attached-files-wrap"> |
|
105 |
+ <ul class="attached-files"> |
|
106 |
+ <li class="attached-file"><strong>test-image.jpg(15MB)</strong><a href="#!/delete-attached-file" class="attached-delete"><i class="ico btn-delete"></i></a></li> |
|
107 |
+ <li class="attached-file"><strong>test-image.jpg(15MB)</strong><a href="#!/delete-attached-file" class="attached-delete"><i class="ico btn-delete"></i></a></li> |
|
108 |
+ <li class="attached-file"><strong>test-image.jpg(15MB)</strong><a href="#!/delete-attached-file" class="attached-delete"><i class="ico btn-delete"></i></a></li> |
|
109 |
+ </ul> |
|
110 |
+ </div>--> |
|
111 |
+ </div> |
|
112 |
+ } |
|
113 |
+ </div> |
|
114 |
+ <div class="board-footer"> |
|
115 |
+ <!--<a href="/add-notification" class="add-btn"><i class="ico ico-plus-blue"></i>자동알림추가</a>--> |
|
116 |
+ <a href="@routes.BoardApp.posts(project.owner, project.name)" class="n-btn gray small">LIST</a> |
|
117 |
+ @roleCheck(session.get("userId"), project.id, Resource.BOARD_POST, Operation.DELETE){ |
|
118 |
+ <a data-toggle="modal" href="#deleteConfirm" class="n-btn gray small">DELETE</a> |
|
119 |
+ } |
|
120 |
+ @roleCheck(session.get("userId"), project.id, Resource.BOARD_POST, Operation.EDIT){ |
|
121 |
+ <a href="@routes.BoardApp.editPost(project.owner, project.name, post.id)" class="n-btn blue small">EDIT</a> |
|
122 |
+ } |
|
123 |
+ </div> |
|
124 |
+ |
|
125 |
+ <!--삭제확인상자--> |
|
126 |
+ <div class="modal hide fade" id="deleteConfirm"> |
|
127 |
+ <div class="modal-header"> |
|
128 |
+ <button type="button" class="close" data-dismiss="modal">×</button> |
|
129 |
+ <h3>확인</h3> |
|
110 | 130 |
</div> |
111 |
- } |
|
112 |
-</div> |
|
113 |
-<div class="board-footer"> |
|
114 |
- <!--<a href="/add-notification" class="add-btn"><i class="ico ico-plus-blue"></i>자동알림추가</a>--> |
|
115 |
- <a href="@routes.BoardApp.posts(project.owner, project.name)" class="n-btn gray small">LIST</a> |
|
116 |
- @roleCheck(session.get("userId"), project.id, Resource.BOARD_POST, Operation.DELETE){ |
|
117 |
- <a data-toggle="modal" href="#deleteConfirm" class="n-btn gray small">DELETE</a> |
|
118 |
- } |
|
119 |
- @roleCheck(session.get("userId"), project.id, Resource.BOARD_POST, Operation.EDIT){ |
|
120 |
- <a href="@routes.BoardApp.editPost(project.owner, project.name, post.id)" class="n-btn blue small">EDIT</a> |
|
121 |
- } |
|
122 |
-</div> |
|
123 |
- |
|
124 |
-<!--삭제확인상자--> |
|
125 |
-<div class="modal hide fade" id="deleteConfirm"> |
|
126 |
- <div class="modal-header"> |
|
127 |
- <button type="button" class="close" data-dismiss="modal">×</button> |
|
128 |
- <h3>확인</h3> |
|
129 |
- </div> |
|
130 |
- <div class="modal-body"> |
|
131 |
- <p>게시글이 삭제되며 영원히 복구할수 없습니다.</p> |
|
132 |
- <p>그래도 삭제하시겠습니까?</p> |
|
133 |
- </div> |
|
134 |
- <div class="modal-footer"> |
|
135 |
- <a class="btn btn-primary" href="@routes.BoardApp.deletePost(project.owner, project.name, post.id)">예</a> |
|
136 |
- <a href="#" class="btn" data-dismiss="modal">아니오</a> |
|
131 |
+ <div class="modal-body"> |
|
132 |
+ <p>게시글이 삭제되며 영원히 복구할수 없습니다.</p> |
|
133 |
+ <p>그래도 삭제하시겠습니까?</p> |
|
134 |
+ </div> |
|
135 |
+ <div class="modal-footer"> |
|
136 |
+ <a class="btn btn-primary" href="@routes.BoardApp.deletePost(project.owner, project.name, post.id)">예</a> |
|
137 |
+ <a href="#" class="btn" data-dismiss="modal">아니오</a> |
|
138 |
+ </div> |
|
137 | 139 |
</div> |
138 | 140 |
</div> |
139 |
- |
|
140 | 141 |
@views.html.markdown() |
141 | 142 |
<script type="text/javascript"> |
142 | 143 |
nforge.require('shortcut.submit'); |
--- app/views/board/postList.scala.html
+++ app/views/board/postList.scala.html
... | ... | @@ -16,6 +16,7 @@ |
16 | 16 |
} |
17 | 17 |
|
18 | 18 |
@main(title, project, utils.MenuType.BOARD) { |
19 |
+<div class="page"> |
|
19 | 20 |
@pageTitle(project,"Board") |
20 | 21 |
<div class="header-wrap"> |
21 | 22 |
<div class="search-wrap board"> |
... | ... | @@ -76,6 +77,7 @@ |
76 | 77 |
</div> |
77 | 78 |
} |
78 | 79 |
@pagination(page, 5, "pagination") |
80 |
+</div> |
|
79 | 81 |
<script type="text/javascript"> |
80 | 82 |
nforge.require('board.list'); |
81 | 83 |
</script> |
--- app/views/code/codeView.scala.html
+++ app/views/code/codeView.scala.html
... | ... | @@ -1,196 +1,94 @@ |
1 | 1 |
@(msg : String, project:Project, branches:List[String]) |
2 | 2 |
|
3 | 3 |
@main("코드", project, utils.MenuType.CODE){ |
4 |
-<ul class="nav nav-tabs"> |
|
5 |
- <a href="@routes.CodeApp.codeBrowser(project.owner, project.name)">@Messages("Files")</a></li> |
|
6 |
- <a href="@routes.CodeHistoryApp.historyUntilHead(project.owner, project.name)">@Messages("Commits")</a></li> |
|
7 |
-</ul> |
|
8 |
- |
|
9 |
-<div class="well">@msg</div> |
|
10 |
-<div class="row" id="codeBrowser"> |
|
11 |
- <div class="span3"> |
|
12 |
- <ul id="codeRoot" class="well nav nav-list"> |
|
13 |
- <li id="codeBrowserHeader"><a href="#">코드 탐색기</a></li> |
|
4 |
+<div class="page code-browse"> |
|
5 |
+ @pageTitle(project, "Code Browser") |
|
6 |
+ <ul class="nav nav-tabs code-tab"> |
|
7 |
+ <li class="active"> |
|
8 |
+ <a href="@routes.CodeApp.codeBrowser(project.owner, project.name)">@Messages("Files")</a> |
|
9 |
+ </li> |
|
10 |
+ <li> |
|
11 |
+ <a href="@routes.CodeHistoryApp.historyUntilHead(project.owner, project.name)">@Messages("Commits")</a> |
|
12 |
+ </li> |
|
13 |
+ </ul> |
|
14 |
+ <span id="breadcrumbs">Breadcrumbs</span> |
|
15 |
+ <div class="bubble-wrap gray"> |
|
16 |
+ <div class="inner-bubble repo-info"> |
|
17 |
+ <strong class="clone-label">CLONE THIS REPOSITORY</strong> |
|
18 |
+ <input type="text" class="text repo-url" readonly value="@msg"><a href="#!/copy-url" class="copy-btn">COPY TO CLIPBOARD</a> |
|
19 |
+ <div class="btn-group"> |
|
20 |
+ <button data-toggle="dropdown" class="btn dropdown-toggle d-label">HEAD</button> |
|
21 |
+ <button data-toggle="dropdown" class="btn dropdown-toggle"><span class="caret"></span></button> |
|
22 |
+ <ul class="dropdown-menu"> |
|
23 |
+ @for(name <- branches){ |
|
24 |
+ <li><a href="">@name</a></li> |
|
25 |
+ } |
|
14 | 26 |
</ul> |
27 |
+ </div> |
|
15 | 28 |
</div> |
16 |
- <div class="span9" > |
|
17 |
- <div> |
|
18 |
- <span id="breadcrumbs">Breadcrumbs</span> |
|
19 |
- <span> |
|
20 |
- <select id="branchSelector"> |
|
21 |
- @for(name <- branches){ |
|
22 |
- <option>@name</option> |
|
23 |
- } |
|
24 |
- </select> |
|
25 |
- </span> |
|
26 |
- </div> |
|
27 |
- <div id="folderView"> |
|
28 |
- <table class="table table-bordered"> |
|
29 |
- <thead> |
|
30 |
- <tr> |
|
31 |
- <th>FileName</th> |
|
32 |
- <th>Commit Message</th> |
|
33 |
- <th>Commit Date</th> |
|
34 |
- <th>Author</th> |
|
35 |
- </tr> |
|
36 |
- </thead> |
|
37 |
- <tbody> |
|
38 |
- </tbody> |
|
39 |
- </table> |
|
40 |
- </div> |
|
29 |
+ <hr class="double-sp"/> |
|
30 |
+ <div class="code-browse-wrap"> |
|
31 |
+ <div class="code-browse-header">리비전 619e11d0dcae4fa88b56f94d1462faa566e82e16</div> |
|
32 |
+ <div class="directory-wrap cell"> |
|
33 |
+ <div class="directory-header"><strong>FOLDER NAME</strong></div> |
|
34 |
+ <!-- note.. |
|
35 |
+ depth : 20px + (depth * 5); |
|
36 |
+ start depth : 0 |
|
37 |
+ first folder : 20 + (1 * 5 ) = 25px; |
|
38 |
+ second folder : 20 + (2 * 5 ) = 30px; |
|
39 |
+ --> |
|
40 |
+ <ul class="directories" id="folderNav"> |
|
41 |
+ <li class="directory" data-path="/"><a href="#/"><i class="ico btn-folder open"></i>/</a></li> |
|
42 |
+ <!-- |
|
43 |
+ <li class="directory selected" style="padding-left: 25px;"><a href="#!/folder" data-path="html"><i class="ico btn-folder closed"></i>html</a></li> |
|
44 |
+ <li class="directory" style="padding-left: 25px;"><a href="#!/folder" data-path="images"><i class="ico btn-folder closed"></i>images</a></li> |
|
45 |
+ <li class="directory" style="padding-left: 25px;"><a href="#!/folder" data-path="javascript"><i class="ico btn-folder closed"></i>javaspript</a></li> |
|
46 |
+ <li class="directory" style="padding-left: 25px;"><a href="#!/folder" data-path="psd"><i class="ico btn-folder closed"></i>psd</a></li> |
|
47 |
+ <li class="directory" style="padding-left: 25px;"><a href="#!/folder" data-path="stylesheets"><i class="ico btn-folder closed"></i>stylesheets</a></li>--> |
|
48 |
+ </ul> |
|
49 |
+ </div> |
|
50 |
+ <div class="sp-wrap cell"></div> |
|
51 |
+ <div class="file-wrap cell"> |
|
52 |
+ <table class="code-table sources" id="folderView"> |
|
53 |
+ <thead class="thead"> |
|
54 |
+ <tr> |
|
55 |
+ <td class="filename"><strong>FILENAME</strong></td> |
|
56 |
+ <td class="messages"><strong>COMMIT MESSAGES</strong></td> |
|
57 |
+ <td class="date"><strong>COMMIT DATE</strong></td> |
|
58 |
+ <td class="author"><strong>AUTHOR</strong></td> |
|
59 |
+ </tr> |
|
60 |
+ </thead> |
|
61 |
+ <tbody class="tbody"> |
|
62 |
+ <tr> |
|
63 |
+ <td class="filename"><a href="/code-file.html?filenema=gitignore">.gitignore</a></td> |
|
64 |
+ <td class="messages"><a href="/code-commit.html?id=xxxx">fix bug</a></td> |
|
65 |
+ <td class="date">5 days ago</td> |
|
66 |
+ <td class="author"><a href="/uname" class="img-rounded"><img src="/images/default-avatar-34.png" width="32" height="32" alt="avatar"></a></td> |
|
67 |
+ </tr> |
|
68 |
+ </tbody> |
|
69 |
+ </table> |
|
41 | 70 |
<div id="codeView" class="hide"> |
42 |
- <div> |
|
43 |
- <span id="commiter"></span> | <span id="commitDate"></span> | <span id="commitMessage"></span> |
|
44 |
- <span class="pull-right"><a id="rawCode" class="btn btn-mini" target="_blank">Raw</a></span> |
|
45 |
- </div> |
|
46 |
- <hr /> |
|
47 |
- <div> |
|
48 |
- <pre><code style="overflow:hidden"></code></pre> |
|
49 |
- </div> |
|
71 |
+ <div> |
|
72 |
+ <span id="commiter"></span> | <span id="commitDate"></span> | <span id="commitMessage"></span> |
|
73 |
+ <span class="pull-right"><a id="rawCode" class="btn btn-mini" target="_blank">Raw</a></span> |
|
74 |
+ </div> |
|
75 |
+ <hr /> |
|
76 |
+ <div> |
|
77 |
+ <pre><code style="overflow:hidden"></code></pre> |
|
78 |
+ </div> |
|
50 | 79 |
</div> |
51 |
- |
|
80 |
+ </div> |
|
52 | 81 |
</div> |
53 |
- |
|
82 |
+ </div> |
|
54 | 83 |
</div> |
55 |
-<div id="codeError" class="hide row"> |
|
56 |
- <div class="well span12"> |
|
57 |
- <p>HEAD커밋이 존재하지 않습니다. 다음과 같은 방법을 시도해 보세요</p> |
|
58 |
- <pre><code>@msg |
|
59 |
-touch readme.md |
|
60 |
-git add readme.md |
|
61 |
-git commit -m "init" |
|
62 |
-git push origin master</code></pre> |
|
63 |
- </div> |
|
64 |
-</div> |
|
84 |
+ |
|
85 |
+ |
|
86 |
+ |
|
65 | 87 |
<script type="text/javascript" src="/assets/javascripts/hljs.js"></script> |
66 | 88 |
<script type="text/javascript" src="/assets/javascripts/hljs.jquery.js"></script> |
67 | 89 |
<script type="text/javascript" src="/assets/javascripts/languages/allinone.js"></script> |
68 | 90 |
<style> |
69 | 91 |
@@IMPORT url("/assets/stylesheets/hljsstyles/googlecode.css"); |
70 | 92 |
</style> |
71 |
-<script> |
|
72 |
- $(document).ready(function(){ |
|
73 |
- $(window).bind('hashchange', function(e){ |
|
74 |
- //대기 표시 한다. |
|
75 |
- //여기서 요청을 보내고 |
|
76 |
- var path = getHash().replace(/^#/, ""); |
|
77 |
- |
|
78 |
- $.ajax("code/!" + path, { |
|
79 |
- datatype : "json", |
|
80 |
- success : function(data, textStatus, jqXHR){ |
|
81 |
- updateBreadcrumbs(path); |
|
82 |
- updateNav(path); |
|
83 |
- switch(data.type){ |
|
84 |
- case "file" : |
|
85 |
- handleFile(data); |
|
86 |
- break; |
|
87 |
- case "folder" : |
|
88 |
- handleFolder(data); |
|
89 |
- break; |
|
90 |
- } |
|
91 |
- } |
|
92 |
- }); |
|
93 |
- function handleFile(data){ |
|
94 |
- //파일을 표시한다. |
|
95 |
- $("#commiter").text(data.author); |
|
96 |
- $("#commitMessage").text(data.msg); |
|
97 |
- $("#commitDate").text(data.date); |
|
98 |
- $("code").text(data.data); |
|
99 |
- $("#rawCode").attr("href", path.replace(/\/!/, ""));//TODO 현재 동작하지 않음. |
|
100 |
- |
|
101 |
- $("#folderView").hide(); |
|
102 |
- $("#codeView").show(); |
|
103 |
- $("code").highlight(); |
|
104 |
- } |
|
105 |
- function handleFolder(data){ |
|
106 |
- //폴더내용을 리스팅 한다. |
|
107 |
- $("#commiter").text(data.author); |
|
108 |
- $("#commitMessage").text(data.msg); |
|
109 |
- $("#commitDate").text(data.date); |
|
110 |
- |
|
111 |
- $("tbody").children().remove(); |
|
112 |
- |
|
113 |
- for(var name in data.data){ |
|
114 |
- var info = data.data[name]; |
|
115 |
- var tablerow = makeTableRow(name, info.msg, info.date, info.author); |
|
116 |
- $("tbody").append(tablerow); |
|
117 |
- } |
|
118 |
- |
|
119 |
- $("#folderView").show(); |
|
120 |
- $("#codeView").hide(); |
|
121 |
- } |
|
122 |
- function makeTableRow(name, message, date, author){ |
|
123 |
- return $("<tr>") |
|
124 |
- .append( |
|
125 |
- $("<td>").append( |
|
126 |
- $("<a>").text(name).attr("href", "#" + (path !== "/" ? path : "") + "/" +name) |
|
127 |
- ) |
|
128 |
- ) |
|
129 |
- .append($("<td>").text(message)) |
|
130 |
- .append($("<td>").text(date)) |
|
131 |
- .append($("<td>").text(author)); |
|
132 |
- } |
|
133 |
- function updateBreadcrumbs(path){ |
|
134 |
- var $breadcrumbs = $("#breadcrumbs"); |
|
135 |
- $($breadcrumbs).html('<a href="#/">/</a>'); |
|
136 |
- |
|
137 |
- var names = path.split("/"); |
|
138 |
- var str = "#" |
|
139 |
- for(var i = 1; i < names.length; i++){ |
|
140 |
- var name = names[i]; |
|
141 |
- str += "/" + name; |
|
142 |
- $breadcrumbs.append(" > "); |
|
143 |
- $("<a>").text(name).attr("href", str).appendTo($breadcrumbs); |
|
144 |
- } |
|
145 |
- } |
|
146 |
- }); |
|
147 |
- $(window).trigger('hashchange'); |
|
148 |
- }); |
|
149 |
- |
|
150 |
- function getHash(){ |
|
151 |
- //혹시 있을지도 모를 호완성을 위해. |
|
152 |
- return location.hash; |
|
153 |
- |
|
154 |
- } |
|
155 |
- function setHash(hash){ |
|
156 |
- return location.hash = hash; |
|
157 |
- } |
|
158 |
- var stack = []; |
|
159 |
- function updateNav(path){ |
|
160 |
- $.ajax("code/!" + path, { |
|
161 |
- success : function(data, textStatus, jqXHR){ |
|
162 |
- data.path = path; |
|
163 |
- stack.push(data); |
|
164 |
- var $codeRoot = $("#codeRoot"); |
|
165 |
- var $a = $codeRoot.find("li a[href='#"+ path +"']"); |
|
166 |
- if($a.length !== 0) { |
|
167 |
- stackTrace(stack); |
|
168 |
- } else { |
|
169 |
- updateNav(path.substr(0, path.lastIndexOf("/"))); |
|
170 |
- } |
|
171 |
- } |
|
172 |
- }); |
|
173 |
- } |
|
174 |
- function stackTrace(stack){ |
|
175 |
- while(stack.length !== 0) { |
|
176 |
- var data = stack.pop(); |
|
177 |
- if(data.type === "file") continue; |
|
178 |
- |
|
179 |
- var $ul = $("<ul>").addClass("nav nav-list"); |
|
180 |
- for(var name in data.data){ |
|
181 |
- if(data.data[name].type !== "folder") continue; |
|
182 |
- |
|
183 |
- var $li = $("<li>"); |
|
184 |
- $("<a>").attr("href", "#" + data.path + "/" + name).text(name).appendTo($li); |
|
185 |
- $li.appendTo($ul); |
|
186 |
- } |
|
187 |
- var parentStr = data.path.substr(0, data.path.lastIndexOf("/")); |
|
188 |
- $("#codeRoot").find("li a[href='#" + data.path + "']").parent().after($ul); |
|
189 |
- } |
|
190 |
- } |
|
191 |
- |
|
192 |
- $("#branchSelector option").click(function(){ |
|
193 |
- alert($(this).text()); |
|
194 |
- }); |
|
195 |
- </script> |
|
196 |
-}(No newline at end of file) |
|
93 |
+<script src="/assets/javascripts/code.js"></script> |
|
94 |
+} |
--- app/views/code/diff.scala.html
+++ app/views/code/diff.scala.html
... | ... | @@ -1,6 +1,7 @@ |
1 | 1 |
@(project: Project, patch: String) |
2 | 2 |
|
3 | 3 |
@main(Messages("Commit"), project, utils.MenuType.CODE) { |
4 |
+ |
|
4 | 5 |
<script type="text/javascript" src="/assets/javascripts/hljs.js"></script> |
5 | 6 |
<script type="text/javascript" src="/assets/javascripts/hljs.jquery.js"></script> |
6 | 7 |
<script type="text/javascript" src="/assets/javascripts/languages/allinone.js"></script> |
--- app/views/code/history.scala.html
+++ app/views/code/history.scala.html
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 |
@import java.net.URLEncoder |
5 | 5 |
|
6 | 6 |
@main(Messages("title.commitHistory"), project, utils.MenuType.CODE) { |
7 |
- |
|
7 |
+<div class="page"> |
|
8 | 8 |
@defining(RepositoryService.getRepository(project).getBranches()) { branches => |
9 | 9 |
@if(branches.length > 0) { |
10 | 10 |
<select id="branch" name="branch"> |
... | ... | @@ -15,6 +15,7 @@ |
15 | 15 |
} |
16 | 16 |
</select> |
17 | 17 |
} |
18 |
+ |
|
18 | 19 |
} |
19 | 20 |
|
20 | 21 |
@defining( |
... | ... | @@ -58,5 +59,5 @@ |
58 | 59 |
</script> |
59 | 60 |
} |
60 | 61 |
} |
61 |
- |
|
62 |
+</div> |
|
62 | 63 |
} |
--- app/views/code/nohead.scala.html
+++ app/views/code/nohead.scala.html
... | ... | @@ -1,12 +1,17 @@ |
1 | 1 |
@(url: String, project: Project) |
2 | 2 |
|
3 | 3 |
@main(Messages("Commit History"), project, utils.MenuType.CODE) { |
4 |
- <ul class="nav nav-tabs"> |
|
5 |
- <a href="@routes.CodeApp.codeBrowser(project.owner, project.name)">@Messages("code.files")</a></li> |
|
6 |
- <a href="@routes.CodeHistoryApp.historyUntilHead(project.owner, project.name)">@Messages("code.commits")</a></li> |
|
7 |
- </ul> |
|
4 |
+<div class="page"> |
|
5 |
+ <ul class="nav nav-tabs code-tab"> |
|
6 |
+ <li> |
|
7 |
+ <a href="@routes.CodeApp.codeBrowser(project.owner, project.name)">@Messages("Files")</a> |
|
8 |
+ </li> |
|
9 |
+ <li class="active"> |
|
10 |
+ <a href="@routes.CodeHistoryApp.historyUntilHead(project.owner, project.name)">@Messages("Commits")</a> |
|
11 |
+ </li> |
|
12 |
+ </ul> |
|
8 | 13 |
|
9 |
- <div id="codeError" class="row"> |
|
14 |
+ <div id="codeError" class="row-fluid"> |
|
10 | 15 |
<div class="well span12"> |
11 | 16 |
<p>HEAD커밋이 존재하지 않습니다. 다음과 같은 방법을 시도해 보세요</p> |
12 | 17 |
<pre><code>git clone @url |
... | ... | @@ -16,4 +21,5 @@ |
16 | 21 |
git push origin master</code></pre> |
17 | 22 |
</div> |
18 | 23 |
</div> |
24 |
+</div> |
|
19 | 25 |
} |
--- app/views/issue/editIssue.scala.html
+++ app/views/issue/editIssue.scala.html
... | ... | @@ -11,6 +11,8 @@ |
11 | 11 |
} |
12 | 12 |
|
13 | 13 |
@main(Messages(title), project, utils.MenuType.ISSUE) { |
14 |
+<div class="page"> |
|
15 |
+ |
|
14 | 16 |
<style> |
15 | 17 |
@@IMPORT url("/assets/stylesheets/issue.css"); |
16 | 18 |
</style> |
... | ... | @@ -91,4 +93,5 @@ |
91 | 93 |
} |
92 | 94 |
}); |
93 | 95 |
</script> |
96 |
+</div> |
|
94 | 97 |
} |
--- app/views/issue/issue.scala.html
+++ app/views/issue/issue.scala.html
... | ... | @@ -15,6 +15,7 @@ |
15 | 15 |
} |
16 | 16 |
} |
17 | 17 |
@main(Messages(title),project, utils.MenuType.ISSUE) { |
18 |
+<div class="page"> |
|
18 | 19 |
<style> |
19 | 20 |
@@IMPORT url("/assets/stylesheets/issue.css"); |
20 | 21 |
</style> |
... | ... | @@ -162,4 +163,5 @@ |
162 | 163 |
} |
163 | 164 |
}); |
164 | 165 |
</script> |
166 |
+</div> |
|
165 | 167 |
} |
--- app/views/issue/issueError.scala.html
+++ app/views/issue/issueError.scala.html
... | ... | @@ -1,8 +1,12 @@ |
1 | 1 |
@(message:String, returnURL:Call, project:Project) |
2 | 2 |
|
3 | 3 |
@main("Warnning!", project, utils.MenuType.ISSUE){ |
4 |
+<div class="page"> |
|
5 |
+ |
|
4 | 6 |
<div class="alert alert-error"> |
5 | 7 |
@Messages(message) |
6 | 8 |
</div> |
7 | 9 |
<a class="btn" href="@returnURL">돌아가기</a> |
10 |
+</div> |
|
11 |
+ |
|
8 | 12 |
}(No newline at end of file) |
--- app/views/issue/issueList.scala.html
+++ app/views/issue/issueList.scala.html
... | ... | @@ -36,6 +36,8 @@ |
36 | 36 |
} |
37 | 37 |
|
38 | 38 |
@main(Messages(title), project, utils.MenuType.ISSUE){ |
39 |
+<div class="page"> |
|
40 |
+ |
|
39 | 41 |
<style> |
40 | 42 |
@@IMPORT url("/assets/stylesheets/issue.css"); |
41 | 43 |
</style> |
... | ... | @@ -109,4 +111,5 @@ |
109 | 111 |
nforge.require('issue.label', '@routes.IssueLabelApp.getAll(project.owner, project.name)', '@routes.IssueLabelApp.post(project.owner, project.name)', {editable: true}); |
110 | 112 |
nforge.require('issue.list'); |
111 | 113 |
</script> |
114 |
+</div> |
|
112 | 115 |
} |
--- app/views/issue/newIssue.scala.html
+++ app/views/issue/newIssue.scala.html
... | ... | @@ -11,6 +11,7 @@ |
11 | 11 |
} |
12 | 12 |
|
13 | 13 |
@main(Messages(title), project, utils.MenuType.ISSUE) { |
14 |
+<div class="page"> |
|
14 | 15 |
<style> |
15 | 16 |
@@IMPORT url("/assets/stylesheets/issue.css"); |
16 | 17 |
</style> |
... | ... | @@ -75,4 +76,5 @@ |
75 | 76 |
nforge.require('shortcut.submit'); |
76 | 77 |
nforge.require('issue.label', '@routes.IssueLabelApp.getAll(project.owner, project.name)', '@routes.IssueLabelApp.post(project.owner, project.name)'); |
77 | 78 |
</script> |
79 |
+</div> |
|
78 | 80 |
} |
--- app/views/issue/notExistingPage.scala.html
+++ app/views/issue/notExistingPage.scala.html
... | ... | @@ -3,6 +3,8 @@ |
3 | 3 |
@import helper.twitterBootstrap._ |
4 | 4 |
|
5 | 5 |
@main(title, project, utils.MenuType.NONE) { |
6 |
+<div class="page"> |
|
6 | 7 |
<h1>존재하지 않는 게시물 입니다.</h1> |
7 | 8 |
<a href="@routes.IssueApp.issues(project.owner, project.name, "all")" class="btn">목록으로 가기</a> |
9 |
+</div> |
|
8 | 10 |
} |
--- app/views/main.scala.html
+++ app/views/main.scala.html
... | ... | @@ -3,20 +3,18 @@ |
3 | 3 |
@import utils._ |
4 | 4 |
|
5 | 5 |
@layout(Messages(title))("") { |
6 |
- <header class="gnb-outer"> |
|
7 |
- @topmenu(project, menuType) |
|
8 |
- <div class="sub-menu-sp"></div> |
|
9 |
- @sidemenu(project) |
|
10 |
- </header> |
|
11 |
- <div class="container page-wrap"> |
|
12 |
- <div class="page"> |
|
13 |
- @views.html.alert() |
|
14 |
- @content |
|
15 |
- </div> |
|
6 |
+ <header class="gnb-outer"> |
|
7 |
+ @topmenu(project, menuType) |
|
8 |
+ <div class="sub-menu-sp"></div> |
|
9 |
+ @sidemenu(project) |
|
10 |
+ </header> |
|
11 |
+ <div class="container page-wrap"> |
|
12 |
+ @views.html.alert() |
|
13 |
+ @content |
|
14 |
+ </div> |
|
15 |
+ <footer class="page-footer-outer"> |
|
16 |
+ <div class="page-footer"> |
|
17 |
+ <span class="provider">Powered by <strong>nFORGE.</strong></span> |
|
16 | 18 |
</div> |
17 |
- <footer class="page-footer-outer"> |
|
18 |
- <div class="page-footer"> |
|
19 |
- <span class="provider">Powered by <strong>nFORGE.</strong></span> |
|
20 |
- </div> |
|
21 |
- </footer> |
|
19 |
+ </footer> |
|
22 | 20 |
}(No newline at end of file) |
--- app/views/project/projectHome.scala.html
+++ app/views/project/projectHome.scala.html
... | ... | @@ -1,6 +1,7 @@ |
1 | 1 |
@(message: String, project: Project) |
2 | 2 |
|
3 | 3 |
@main(message, project, utils.MenuType.PROJECT_HOME) { |
4 |
+<div class="page"> |
|
4 | 5 |
@pageTitle(project,"Project Home") |
5 | 6 |
<div class="bubble-wrap dark-gray project-home"> |
6 | 7 |
<div class="inner logo"> |
... | ... | @@ -64,7 +65,7 @@ |
64 | 65 |
</div> |
65 | 66 |
</div> |
66 | 67 |
} |
68 |
+ @views.html.markdown() |
|
67 | 69 |
</div> |
68 |
- |
|
69 |
-@views.html.markdown() |
|
70 |
+</div> |
|
70 | 71 |
} |
--- app/views/project/statistics.scala.html
+++ app/views/project/statistics.scala.html
... | ... | @@ -1,5 +1,7 @@ |
1 | 1 |
@(message: String)(project:Project) |
2 | 2 |
|
3 | 3 |
@main(message, project, utils.MenuType.ISSUE) { |
4 |
+<div class="page"> |
|
4 | 5 |
<h1>underconstruction.html</h1> |
6 |
+</div> |
|
5 | 7 |
}(No newline at end of file) |
--- app/views/search/contentsSearch.scala.html
+++ app/views/search/contentsSearch.scala.html
... | ... | @@ -2,6 +2,8 @@ |
2 | 2 |
@import utils.TemplateHelper._ |
3 | 3 |
|
4 | 4 |
@main(title, project, utils.MenuType.NONE) { |
5 |
+<div class="page"> |
|
6 |
+ |
|
5 | 7 |
<input class="filter" type="hidden" value="@filter" /> |
6 | 8 |
<div class="row"> |
7 | 9 |
<div class="span12"> |
... | ... | @@ -66,4 +68,5 @@ |
66 | 68 |
</div> |
67 | 69 |
</div> |
68 | 70 |
<script type="text/javascript">nforge.require('pages.contentSearch');</script> |
71 |
+</div> |
|
69 | 72 |
}(No newline at end of file) |
--- app/views/task/taskView.scala.html
+++ app/views/task/taskView.scala.html
... | ... | @@ -1,6 +1,7 @@ |
1 | 1 |
@(project:Project) |
2 | 2 |
@import utils.TemplateHelper._ |
3 | 3 |
@main("TaskManager", project, utils.MenuType.TASK){ |
4 |
+<div class="page"> |
|
4 | 5 |
<style> |
5 | 6 |
@@IMPORT url(@getCSSLink("taskboard")); |
6 | 7 |
</style> |
... | ... | @@ -183,4 +184,5 @@ |
183 | 184 |
<script type="text/javascript" src="http://underscorejs.org/underscore.js"></script> |
184 | 185 |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.min.js"></script> |
185 | 186 |
<script type="text/javascript" src="https://raw.github.com/angular-ui/angular-ui/master/build/angular-ui.min.js"></script> |
187 |
+</div> |
|
186 | 188 |
} |
+++ public/javascripts/code.js
... | ... | @@ -0,0 +1,173 @@ |
1 | +$(document).ready(function(){ | |
2 | + $(window).bind('hashchange', function(e){ | |
3 | + //대기 표시 한다. | |
4 | + //여기서 요청을 보내고 | |
5 | + var path = getHash().replace(/^#/, ""); | |
6 | + | |
7 | + $.ajax("code/!" + path, { | |
8 | + datatype : "json", | |
9 | + success : function(data, textStatus, jqXHR){ | |
10 | + updateBreadcrumbs(path); | |
11 | + updateNav(path); | |
12 | + switch(data.type){ | |
13 | + case "file" : | |
14 | + handleFile(data); | |
15 | + break; | |
16 | + case "folder" : | |
17 | + handleFolder(data); | |
18 | + break; | |
19 | + } | |
20 | + }, | |
21 | + error : function(){ | |
22 | + $("#codeError").show(); | |
23 | + } | |
24 | + }); | |
25 | + function handleFile(data){ | |
26 | + //파일을 표시한다. | |
27 | + $("#commiter").text(data.author); | |
28 | + $("#commitMessage").text(data.msg); | |
29 | + $("#commitDate").text(data.date.substr(0,3)); | |
30 | + $("code").text(data.data); | |
31 | + $("#rawCode").attr("href", path.replace(/\/!/, ""));//TODO 현재 동작하지 않음. | |
32 | + | |
33 | + $("#folderView").hide(); | |
34 | + $("#codeView").show(); | |
35 | + $("code").highlight(); | |
36 | + } | |
37 | + function handleFolder(data){ | |
38 | + //폴더내용을 리스팅 한다. | |
39 | + $("#commiter").text(data.author); | |
40 | + $("#commitMessage").text(data.msg); | |
41 | + $("#commitDate").text(data.date); | |
42 | + | |
43 | + $("tbody").children().remove(); | |
44 | + | |
45 | + for(var name in data.data){ | |
46 | + var info = data.data[name]; | |
47 | + var tablerow = makeTableRow(name, info.msg, info.date, info.author); | |
48 | + $("tbody").append(tablerow); | |
49 | + } | |
50 | + | |
51 | + $("#folderView").show(); | |
52 | + $("#codeView").hide(); | |
53 | + } | |
54 | + function makeTableRow(name, message, date, author){ | |
55 | + return $("<tr>") | |
56 | + .append( | |
57 | + $("<td>").append( | |
58 | + $("<a>").text(name).attr("href", "#" + (path !== "/" ? path : "") + "/" +name) | |
59 | + ).addClass("filename") | |
60 | + ) | |
61 | + .append($("<td>").text(message).addClass("message")) | |
62 | + .append($("<td>").text("just now"/*date*/).addClass("date")) | |
63 | + //.append($("<td>").text(author).addClass("author")) | |
64 | + .append($('<td class="author"><a href="/'+ author+'" class="img-rounded"><img src="/assets/images/default-avatar-34.png" width="32" height="32" alt="avatar"></a></td>')); | |
65 | + } | |
66 | + function updateBreadcrumbs(path){ | |
67 | + var $breadcrumbs = $("#breadcrumbs"); | |
68 | + $($breadcrumbs).html('<a href="#/">/</a>'); | |
69 | + | |
70 | + var names = path.split("/"); | |
71 | + var str = "#" | |
72 | + for(var i = 1; i < names.length; i++){ | |
73 | + var name = names[i]; | |
74 | + str += "/" + name; | |
75 | + $breadcrumbs.append(" > "); | |
76 | + $("<a>").text(name).attr("href", str).appendTo($breadcrumbs); | |
77 | + } | |
78 | + } | |
79 | + }); | |
80 | + $(window).trigger('hashchange'); | |
81 | + }); | |
82 | + | |
83 | + function getHash(){ | |
84 | + //혹시 있을지도 모를 호완성을 위해. | |
85 | + return location.hash; | |
86 | + | |
87 | + } | |
88 | + function setHash(hash){ | |
89 | + return location.hash = hash; | |
90 | + } | |
91 | + function standizePath(path){ | |
92 | + return "/" + path.split("/").filter(isEmpty).join("/"); | |
93 | + function isEmpty(data){ | |
94 | + if(data == ""){ | |
95 | + return false; | |
96 | + } else { | |
97 | + return true; | |
98 | + } | |
99 | + } | |
100 | + } | |
101 | + | |
102 | + function updateNav(path){ | |
103 | + console.log("update triggered!"); | |
104 | + var stack = []; | |
105 | + var pathSeg = path.split("/"); | |
106 | + pathSeg = pathSeg.filter(function(data){if(data == "") return false; else return true;}); | |
107 | + path = "/" + pathSeg.join("/"); | |
108 | + while(true){ | |
109 | + if($("#folderNav").find("li[data-path='" + path +"']").length == 0){ | |
110 | + stack.push(path); | |
111 | + pathSeg.pop(); | |
112 | + path = "/" + pathSeg.join("/"); | |
113 | + } else { | |
114 | + stack.push(path); | |
115 | + break; | |
116 | + } | |
117 | + } | |
118 | + //request all | |
119 | + //check response | |
120 | + var count = stack.length; | |
121 | + stack.map(function(path){ | |
122 | + $.ajax("code/!" + path, { | |
123 | + success : function(data){ | |
124 | + stack = stack.map(function(d){ | |
125 | + if(path == d){ | |
126 | + data.path = path; | |
127 | + return data; | |
128 | + } else { | |
129 | + return d; | |
130 | + } | |
131 | + }); | |
132 | + | |
133 | + if(--count <= 0){ | |
134 | + addItem(stack); | |
135 | + } | |
136 | + } | |
137 | + }); | |
138 | + return path; | |
139 | + }); | |
140 | + } | |
141 | + function addItem(stack){ | |
142 | + | |
143 | + $folderNav = $("#folderNav"); | |
144 | + | |
145 | + while(stack.length !== 0){ | |
146 | + var data = stack.pop(); | |
147 | + if(data.type === "file") continue; | |
148 | + | |
149 | + var $target = $folderNav.find("li[data-path='" + data.path + "']"); | |
150 | + for(var name in data.data){ | |
151 | + if(data.data[name].type === "file") continue; | |
152 | + var tpath = (data.path == "/"? "" : data.path) + "/" +name; | |
153 | + if($folderNav.find("li[data-path='" + tpath + "']").length == 0){ | |
154 | + var $li = makeListItem(name, data.path); | |
155 | + $target.after($li); | |
156 | + } | |
157 | + } | |
158 | + } | |
159 | + function makeListItem(name, path){ | |
160 | + var depth = path.split("/").length - 1; | |
161 | + if(path =="/") depth -= 1; | |
162 | + var margin = depth * 5 + 25; | |
163 | + var tpath = (path == "/"? "" : path) + "/" +name | |
164 | + var $a = $("<a>").attr("href", "#" + tpath).appendTo($li); | |
165 | + $("<i>").addClass("ico btn-folder").appendTo($a); | |
166 | + $a.append(name); | |
167 | + return $("<li>").addClass("directory").attr("data-path", tpath).css({paddingLeft: margin}).append($a); | |
168 | + } | |
169 | + } | |
170 | + | |
171 | + $("#branchSelector option").click(function(){ | |
172 | + alert($(this).text()); | |
173 | + });(No newline at end of file) |
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?