Fix Broken layout when browser resize
@819c5e68684732c183f9564e2631ee285d2d2c41
--- app/assets/stylesheets/less/_common.less
+++ app/assets/stylesheets/less/_common.less
... | ... | @@ -3,10 +3,6 @@ |
3 | 3 |
padding:0 |
4 | 4 |
} |
5 | 5 |
|
6 |
-html, body { |
|
7 |
- min-height: 100%; |
|
8 |
-} |
|
9 |
- |
|
10 | 6 |
body { |
11 | 7 |
background-color: @yobi-background; |
12 | 8 |
font-family: @base-font-family; |
--- app/assets/stylesheets/less/_page.less
+++ app/assets/stylesheets/less/_page.less
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 |
|
6 | 6 |
.gnb-outer { |
7 | 7 |
height:40px; |
8 |
- background-color:#1d2d46; |
|
8 |
+ background-color:#1d2d46; |
|
9 | 9 |
} |
10 | 10 |
|
11 | 11 |
.gnb-inner { |
... | ... | @@ -313,6 +313,10 @@ |
313 | 313 |
} |
314 | 314 |
} |
315 | 315 |
|
316 |
+.page-wrap-outer { |
|
317 |
+ min-height: 450px; |
|
318 |
+} |
|
319 |
+ |
|
316 | 320 |
.page-wrap { |
317 | 321 |
background-color: @white; |
318 | 322 |
width: 1170px; |
... | ... | @@ -444,18 +448,16 @@ |
444 | 448 |
} |
445 | 449 |
|
446 | 450 |
.page-footer-outer { |
447 |
- |
|
448 |
- padding:10px 0; |
|
449 |
- position: absolute; |
|
450 |
- bottom:0; |
|
451 |
- width:100%; |
|
452 |
- .center-block; |
|
451 |
+ margin-top:50px; |
|
453 | 452 |
background-color:@yobi-white; |
454 |
- border-top:1px solid #e8e8e8; |
|
453 |
+ padding:10px 0; |
|
455 | 454 |
|
456 | 455 |
.page-footer { |
456 |
+ margin: 0 auto; |
|
457 | 457 |
text-align:center; |
458 | 458 |
line-height: 34px; |
459 |
+ border-top:1px solid #e8e8e8; |
|
460 |
+ width:1170px; |
|
459 | 461 |
} |
460 | 462 |
|
461 | 463 |
.provider { |
--- app/assets/stylesheets/less/_reponsive.less
+++ app/assets/stylesheets/less/_reponsive.less
... | ... | @@ -1,11 +1,19 @@ |
1 | 1 |
// responsive |
2 | 2 |
@media all and (max-width:1199px){ |
3 | 3 |
.gnb-outer { |
4 |
+ min-width: 1000px; |
|
5 |
+ padding:0 10px; |
|
6 |
+ |
|
4 | 7 |
.gnb-inner { |
5 | 8 |
width:980px; |
6 | 9 |
} |
7 | 10 |
} |
8 | 11 |
|
12 |
+ .page-wrap-outer { |
|
13 |
+ min-width: 1000px; |
|
14 |
+ padding:0 10px; |
|
15 |
+ } |
|
16 |
+ |
|
9 | 17 |
.page-wrap { |
10 | 18 |
width:980px; |
11 | 19 |
} |
... | ... | @@ -19,11 +27,17 @@ |
19 | 27 |
} |
20 | 28 |
|
21 | 29 |
.site-breadcrumb-outer { |
30 |
+ min-width: 1000px; |
|
31 |
+ padding:0 10px; |
|
32 |
+ |
|
22 | 33 |
.site-breadcrumb-inner { |
23 | 34 |
width: 980px; |
24 | 35 |
} |
25 | 36 |
} |
26 | 37 |
.project-header-outer { |
38 |
+ min-width: 1000px; |
|
39 |
+ padding:0 10px; |
|
40 |
+ |
|
27 | 41 |
.project-header-inner { |
28 | 42 |
.project-header-wrap { |
29 | 43 |
width: 980px; |
... | ... | @@ -32,10 +46,14 @@ |
32 | 46 |
} |
33 | 47 |
|
34 | 48 |
.project-menu-outer { |
49 |
+ min-width: 1000px; |
|
50 |
+ padding:0 10px; |
|
51 |
+ |
|
35 | 52 |
.project-menu-inner { |
36 | 53 |
width: 980px; |
37 | 54 |
} |
38 | 55 |
} |
56 |
+ |
|
39 | 57 |
.project-home-header { |
40 | 58 |
.project-clone-wrap { |
41 | 59 |
.project-clone-url { |
... | ... | @@ -94,4 +112,13 @@ |
94 | 112 |
.site-setting-wrap { |
95 | 113 |
width:980px; |
96 | 114 |
} |
115 |
+ |
|
116 |
+ .page-footer-outer { |
|
117 |
+ min-width: 1000px; |
|
118 |
+ padding:10px; |
|
119 |
+ |
|
120 |
+ .page-footer { |
|
121 |
+ width:980px; |
|
122 |
+ } |
|
123 |
+ } |
|
97 | 124 |
} |
--- app/assets/stylesheets/less/_yobiUI.less
+++ app/assets/stylesheets/less/_yobiUI.less
... | ... | @@ -6,7 +6,6 @@ |
6 | 6 |
* (bootstrap 2.3.1 : 14px, |
7 | 7 |
* bootstrap 2.2.1 : 12px) |
8 | 8 |
*/ |
9 |
-html {position: relative; padding-bottom: 90px; } |
|
10 | 9 |
body { font-size:12px; } |
11 | 10 |
label, input, button, select, textarea { font-size:12px; } |
12 | 11 |
select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], |
--- app/views/board/create.scala.html
+++ app/views/board/create.scala.html
... | ... | @@ -6,62 +6,64 @@ |
6 | 6 |
|
7 | 7 |
@projectLayout(title, project, utils.MenuType.BOARD) { |
8 | 8 |
@projectMenu(project, utils.MenuType.BOARD, "main-menu-only") |
9 |
-<div class="project-page-wrap"> |
|
10 |
- <form action="@routes.BoardApp.newPost(project.owner, project.name)" method="post" enctype="multipart/form-data" class="nm"> |
|
11 |
- <div class="content-wrap frm-wrap"> |
|
12 |
- <dl> |
|
13 |
- <dt> |
|
14 |
- <label for="title">@Messages("title")</label> |
|
15 |
- </dt> |
|
16 |
- <dd> |
|
17 |
- @defining(form.errors().get("title")) { errors => |
|
18 |
- <input type="text" id="title" name="title" class="zen-mode text title @if(errors != null) {error}" maxlength="250" tabindex="1" /> |
|
19 |
- @if(errors != null) { |
|
20 |
- <div class="message"> |
|
21 |
- @for(error <- errors) { |
|
22 |
- <div>@Messages(error.message)</div> |
|
23 |
- } |
|
24 |
- </div> |
|
25 |
- } |
|
26 |
- } |
|
27 |
- </dd> |
|
9 |
+<div class="page-wrap-outer"> |
|
10 |
+ <div class="project-page-wrap"> |
|
11 |
+ <form action="@routes.BoardApp.newPost(project.owner, project.name)" method="post" enctype="multipart/form-data" class="nm"> |
|
12 |
+ <div class="content-wrap frm-wrap"> |
|
13 |
+ <dl> |
|
14 |
+ <dt> |
|
15 |
+ <label for="title">@Messages("title")</label> |
|
16 |
+ </dt> |
|
17 |
+ <dd> |
|
18 |
+ @defining(form.errors().get("title")) { errors => |
|
19 |
+ <input type="text" id="title" name="title" class="zen-mode text title @if(errors != null) {error}" maxlength="250" tabindex="1" /> |
|
20 |
+ @if(errors != null) { |
|
21 |
+ <div class="message"> |
|
22 |
+ @for(error <- errors) { |
|
23 |
+ <div>@Messages(error.message)</div> |
|
24 |
+ } |
|
25 |
+ </div> |
|
26 |
+ } |
|
27 |
+ } |
|
28 |
+ </dd> |
|
28 | 29 |
|
29 |
- <dd style="position: relative;"> |
|
30 |
- <div id="mode-select"> |
|
31 |
- <input type="radio" name="edit-mode" id="edit-mode" value="edit" checked="checked" class="radio-btn"> |
|
32 |
- <label for="edit-mode" style="margin-right:3px;">Edit</label> |
|
33 |
- <input type="radio" name="edit-mode" id="preview-mode" value="preview" class="radio-btn"> |
|
34 |
- <label for="preview-mode">Preview</label> |
|
35 |
- </div> |
|
36 |
- <a href="#" class="go-zen"><i class="s s--zen" >Edit in Zen Mode</i></a> |
|
37 |
- @help.markdown() |
|
38 |
- <div class="textarea-box"> |
|
39 |
- <textarea id="body" name="body" class="zen-mode content" markdown="true" tabindex="2" data-label="@Messages("post.error.emptyBody")"></textarea> |
|
40 |
- </div> |
|
41 |
- |
|
42 |
- </dd> |
|
30 |
+ <dd style="position: relative;"> |
|
31 |
+ <div id="mode-select"> |
|
32 |
+ <input type="radio" name="edit-mode" id="edit-mode" value="edit" checked="checked" class="radio-btn"> |
|
33 |
+ <label for="edit-mode" style="margin-right:3px;">Edit</label> |
|
34 |
+ <input type="radio" name="edit-mode" id="preview-mode" value="preview" class="radio-btn"> |
|
35 |
+ <label for="preview-mode">Preview</label> |
|
36 |
+ </div> |
|
37 |
+ <a href="#" class="go-zen"><i class="s s--zen" >Edit in Zen Mode</i></a> |
|
38 |
+ @help.markdown() |
|
39 |
+ <div class="textarea-box"> |
|
40 |
+ <textarea id="body" name="body" class="zen-mode content" markdown="true" tabindex="2" data-label="@Messages("post.error.emptyBody")"></textarea> |
|
41 |
+ </div> |
|
42 |
+ |
|
43 |
+ </dd> |
|
43 | 44 |
|
44 |
- @if(isAllowedToNotice){ |
|
45 |
- <dd class="right-txt"> |
|
46 |
- <input type="checkbox" id="notice" name="notice" class="checkbox" /><!-- |
|
47 |
- --><label for="notice" class="label-public">@Messages("post.notice.label")</label> |
|
48 |
- </dd> |
|
49 |
- } |
|
50 |
- </dl> |
|
45 |
+ @if(isAllowedToNotice){ |
|
46 |
+ <dd class="right-txt"> |
|
47 |
+ <input type="checkbox" id="notice" name="notice" class="checkbox" /><!-- |
|
48 |
+ --><label for="notice" class="label-public">@Messages("post.notice.label")</label> |
|
49 |
+ </dd> |
|
50 |
+ } |
|
51 |
+ </dl> |
|
51 | 52 |
|
52 |
- @** fileUploader **@ |
|
53 |
- @if(!UserApp.currentUser.isAnonymous) { |
|
54 |
- @common.fileUploader(ResourceType.BOARD_POST, null) |
|
55 |
- } |
|
56 |
- @** end of fileUploader **@ |
|
53 |
+ @** fileUploader **@ |
|
54 |
+ @if(!UserApp.currentUser.isAnonymous) { |
|
55 |
+ @common.fileUploader(ResourceType.BOARD_POST, null) |
|
56 |
+ } |
|
57 |
+ @** end of fileUploader **@ |
|
57 | 58 |
|
58 |
- <div class="actions"> |
|
59 |
- <button class="ybtn ybtn-success" tabindex="3">@Messages("button.save")</button><!-- |
|
60 |
- --><a href="javascript:history.back();" class="ybtn" tabindex="4">@Messages("button.cancel")</a> |
|
61 |
- </div> |
|
59 |
+ <div class="actions"> |
|
60 |
+ <button class="ybtn ybtn-success" tabindex="3">@Messages("button.save")</button><!-- |
|
61 |
+ --><a href="javascript:history.back();" class="ybtn" tabindex="4">@Messages("button.cancel")</a> |
|
62 |
+ </div> |
|
62 | 63 |
|
63 |
- </div> |
|
64 |
- </form> |
|
64 |
+ </div> |
|
65 |
+ </form> |
|
66 |
+ </div> |
|
65 | 67 |
</div> |
66 | 68 |
|
67 | 69 |
@common.markdown(project) |
--- app/views/board/edit.scala.html
+++ app/views/board/edit.scala.html
... | ... | @@ -6,65 +6,66 @@ |
6 | 6 |
|
7 | 7 |
@projectLayout(title, project, utils.MenuType.BOARD) { |
8 | 8 |
@projectMenu(project, utils.MenuType.BOARD, "main-menu-only") |
9 |
-<div class="project-page-wrap"> |
|
10 |
- <form action="@routes.BoardApp.editPost(project.owner, project.name, number)" method="post" enctype="multipart/form-data" class="nm"> |
|
11 |
- <div class="content-wrap frm-wrap"> |
|
12 |
- <dl> |
|
13 |
- <dt> |
|
14 |
- <label for="title">@Messages("title")</label> |
|
15 |
- </dt> |
|
16 |
- <dd> |
|
17 |
- @defining(form.errors().get("title")) { errors => |
|
18 |
- <input type="text" id="title" name="title" value="@posting.title" class="zen-mode text title @if(errors != null) {error}" maxlength="250" tabindex="1" /> |
|
19 |
- @if(errors != null) { |
|
20 |
- <div class="message"> |
|
21 |
- @for(error <- errors) { |
|
22 |
- <div>@Messages(error.message)</div> |
|
23 |
- } |
|
24 |
- </div> |
|
25 |
- } |
|
26 |
- } |
|
27 |
- </dd> |
|
9 |
+<div class="page-wrap-outer"> |
|
10 |
+ <div class="project-page-wrap"> |
|
11 |
+ <form action="@routes.BoardApp.editPost(project.owner, project.name, number)" method="post" enctype="multipart/form-data" class="nm"> |
|
12 |
+ <div class="content-wrap frm-wrap"> |
|
13 |
+ <dl> |
|
14 |
+ <dt> |
|
15 |
+ <label for="title">@Messages("title")</label> |
|
16 |
+ </dt> |
|
17 |
+ <dd> |
|
18 |
+ @defining(form.errors().get("title")) { errors => |
|
19 |
+ <input type="text" id="title" name="title" value="@posting.title" class="zen-mode text title @if(errors != null) {error}" maxlength="250" tabindex="1" /> |
|
20 |
+ @if(errors != null) { |
|
21 |
+ <div class="message"> |
|
22 |
+ @for(error <- errors) { |
|
23 |
+ <div>@Messages(error.message)</div> |
|
24 |
+ } |
|
25 |
+ </div> |
|
26 |
+ } |
|
27 |
+ } |
|
28 |
+ </dd> |
|
28 | 29 |
|
29 |
- <dd style="position: relative;"> |
|
30 |
- <div id="mode-select"> |
|
31 |
- <input type="radio" name="edit-mode" id="edit-mode" value="edit" checked="checked" class="radio-btn"> |
|
32 |
- <label for="edit-mode" style="margin-right:3px;">Edit</label> |
|
33 |
- <input type="radio" name="edit-mode" id="preview-mode" value="preview" class="radio-btn"> |
|
34 |
- <label for="preview-mode">Preview</label> |
|
35 |
- </div> |
|
36 |
- <a href="#" class="go-zen" ><i class="s s--zen">Edit in Zen Mode</i></a> |
|
37 |
- @help.markdown() |
|
38 |
- <div class="textarea-box"> |
|
39 |
- <textarea id="body" name="body" class="zen-mode content" markdown="true" tabindex="2" data-label="@Messages("post.error.emptyBody")">@posting.body</textarea> |
|
40 |
- </div> |
|
41 |
- </dd> |
|
30 |
+ <dd style="position: relative;"> |
|
31 |
+ <div id="mode-select"> |
|
32 |
+ <input type="radio" name="edit-mode" id="edit-mode" value="edit" checked="checked" class="radio-btn"> |
|
33 |
+ <label for="edit-mode" style="margin-right:3px;">Edit</label> |
|
34 |
+ <input type="radio" name="edit-mode" id="preview-mode" value="preview" class="radio-btn"> |
|
35 |
+ <label for="preview-mode">Preview</label> |
|
36 |
+ </div> |
|
37 |
+ <a href="#" class="go-zen" ><i class="s s--zen">Edit in Zen Mode</i></a> |
|
38 |
+ @help.markdown() |
|
39 |
+ <div class="textarea-box"> |
|
40 |
+ <textarea id="body" name="body" class="zen-mode content" markdown="true" tabindex="2" data-label="@Messages("post.error.emptyBody")">@posting.body</textarea> |
|
41 |
+ </div> |
|
42 |
+ </dd> |
|
42 | 43 |
|
43 |
- @if(isAllowedToNotice){ |
|
44 |
- @helper.input(form("notice")){(id, name, value, args) => |
|
45 |
- <dd class="right-txt"> |
|
46 |
- <input type="checkbox" id="notice" name="notice" class="checkbox" @toHtmlArgs(args) @(if(value.equals(Some("true"))) "checked" else "")/><!-- |
|
47 |
- --><label for="notice" class="label-public">@Messages("post.notice.label")</label> |
|
48 |
- </dd> |
|
49 |
- } |
|
50 |
- } |
|
51 |
- </dl> |
|
44 |
+ @if(isAllowedToNotice){ |
|
45 |
+ @helper.input(form("notice")){(id, name, value, args) => |
|
46 |
+ <dd class="right-txt"> |
|
47 |
+ <input type="checkbox" id="notice" name="notice" class="checkbox" @toHtmlArgs(args) @(if(value.equals(Some("true"))) "checked" else "")/><!-- |
|
48 |
+ --><label for="notice" class="label-public">@Messages("post.notice.label")</label> |
|
49 |
+ </dd> |
|
50 |
+ } |
|
51 |
+ } |
|
52 |
+ </dl> |
|
52 | 53 |
|
53 |
- @** fileUploader **@ |
|
54 |
- @if(!UserApp.currentUser.isAnonymous) { |
|
55 |
- @common.fileUploader(ResourceType.BOARD_POST, posting.id) |
|
56 |
- } |
|
57 |
- @** end of fileUploader **@ |
|
54 |
+ @** fileUploader **@ |
|
55 |
+ @if(!UserApp.currentUser.isAnonymous) { |
|
56 |
+ @common.fileUploader(ResourceType.BOARD_POST, posting.id) |
|
57 |
+ } |
|
58 |
+ @** end of fileUploader **@ |
|
58 | 59 |
|
59 |
- <div class="actions"> |
|
60 |
- <button class="ybtn ybtn-info" tabindex="3">@Messages("button.save")</button><!-- |
|
61 |
- --><a href="javascript:history.back();" class="ybtn" tabindex="4">@Messages("button.cancel")</a> |
|
62 |
- </div> |
|
60 |
+ <div class="actions"> |
|
61 |
+ <button class="ybtn ybtn-info" tabindex="3">@Messages("button.save")</button><!-- |
|
62 |
+ --><a href="javascript:history.back();" class="ybtn" tabindex="4">@Messages("button.cancel")</a> |
|
63 |
+ </div> |
|
63 | 64 |
|
64 |
- </div> |
|
65 |
- </form> |
|
65 |
+ </div> |
|
66 |
+ </form> |
|
67 |
+ </div> |
|
66 | 68 |
</div> |
67 |
- |
|
68 | 69 |
@common.markdown(project) |
69 | 70 |
|
70 | 71 |
<link rel="stylesheet" type="text/css" media="screen" href="@routes.Assets.at("javascripts/lib/mentionjs/mention.css")"> |
--- app/views/board/list.scala.html
+++ app/views/board/list.scala.html
... | ... | @@ -18,67 +18,68 @@ |
18 | 18 |
|
19 | 19 |
@projectLayout(title, project, utils.MenuType.BOARD) { |
20 | 20 |
@projectMenu(project, utils.MenuType.BOARD, "main-menu-only") |
21 |
-<div class="project-page-wrap"> |
|
22 |
- <div class="search-wrap underline"> |
|
23 |
- <form id="option_form" method="get" class="pull-left"> |
|
24 |
- <input type="hidden" name="orderBy" value="@param.orderBy"> |
|
25 |
- <input type="hidden" name="orderDir" value="@param.orderDir"> |
|
26 |
- <div class="search-bar"> |
|
27 |
- <input name="filter" class="textbox" type="text" placeholder="@Messages("project.searchPlaceholder")" value="@param.filter"> |
|
28 |
- <button type="submit" class="search-btn"><i class="yobicon-search"></i></button> |
|
21 |
+<div class="page-wrap-outer"> |
|
22 |
+ <div class="project-page-wrap"> |
|
23 |
+ <div class="search-wrap underline"> |
|
24 |
+ <form id="option_form" method="get" class="pull-left"> |
|
25 |
+ <input type="hidden" name="orderBy" value="@param.orderBy"> |
|
26 |
+ <input type="hidden" name="orderDir" value="@param.orderDir"> |
|
27 |
+ <div class="search-bar"> |
|
28 |
+ <input name="filter" class="textbox" type="text" placeholder="@Messages("project.searchPlaceholder")" value="@param.filter"> |
|
29 |
+ <button type="submit" class="search-btn"><i class="yobicon-search"></i></button> |
|
30 |
+ </div> |
|
31 |
+ </form> |
|
32 |
+ <div class="pull-right"> |
|
33 |
+ <a href="@routes.BoardApp.newPostForm(project.owner, project.name)" class="ybtn ybtn-success">@Messages("post.write")</a> |
|
29 | 34 |
</div> |
30 |
- </form> |
|
31 |
- <div class="pull-right"> |
|
32 |
- <a href="@routes.BoardApp.newPostForm(project.owner, project.name)" class="ybtn ybtn-success">@Messages("post.write")</a> |
|
33 | 35 |
</div> |
36 |
+ |
|
37 |
+ @if(page.getTotalRowCount == 0 && notices.size == 0){ |
|
38 |
+ |
|
39 |
+ <div class="error-wrap"> |
|
40 |
+ <i class="ico ico-err1"></i> |
|
41 |
+ <p>@Messages("post.is.empty")</p> |
|
42 |
+ </div> |
|
43 |
+ |
|
44 |
+ } else { |
|
45 |
+ |
|
46 |
+ @if(page.getTotalRowCount > 1){ |
|
47 |
+ <div class="filter-wrap board"> |
|
48 |
+ <div class="filters"> |
|
49 |
+ @makeFilterLink("updatedDate", param.orderBy, param.orderDir, Messages("common.order.updatedDate")) |
|
50 |
+ @makeFilterLink("createdDate", param.orderBy, param.orderDir, Messages("common.order.date")) |
|
51 |
+ @makeFilterLink("numOfComments", param.orderBy, param.orderDir, Messages("common.order.comments")) |
|
52 |
+ </div> |
|
53 |
+ </div> |
|
54 |
+ } |
|
55 |
+ |
|
56 |
+ @if(notices != null && notices.size > 0) { |
|
57 |
+ |
|
58 |
+ <ul class="post-list-wrap notice-wrap"> |
|
59 |
+ @for(post <- notices) { |
|
60 |
+ @partial_list(post, project) |
|
61 |
+ } |
|
62 |
+ </ul> |
|
63 |
+ |
|
64 |
+ } |
|
65 |
+ |
|
66 |
+ <ul class="post-list-wrap"> |
|
67 |
+ @for(post <- page.getList()){ |
|
68 |
+ @partial_list(post, project) |
|
69 |
+ } |
|
70 |
+ </ul> |
|
71 |
+ } |
|
72 |
+ |
|
73 |
+ <div class="write-btn-wrap"> |
|
74 |
+ </div> |
|
75 |
+ |
|
76 |
+ <div id="pagination"> |
|
77 |
+ <!-- pagination.js will fill here. --> |
|
78 |
+ </div> |
|
79 |
+ |
|
80 |
+ @help.keymap("boardList", project) |
|
34 | 81 |
</div> |
35 |
- |
|
36 |
- @if(page.getTotalRowCount == 0 && notices.size == 0){ |
|
37 |
- |
|
38 |
- <div class="error-wrap"> |
|
39 |
- <i class="ico ico-err1"></i> |
|
40 |
- <p>@Messages("post.is.empty")</p> |
|
41 |
- </div> |
|
42 |
- |
|
43 |
- } else { |
|
44 |
- |
|
45 |
- @if(page.getTotalRowCount > 1){ |
|
46 |
- <div class="filter-wrap board"> |
|
47 |
- <div class="filters"> |
|
48 |
- @makeFilterLink("updatedDate", param.orderBy, param.orderDir, Messages("common.order.updatedDate")) |
|
49 |
- @makeFilterLink("createdDate", param.orderBy, param.orderDir, Messages("common.order.date")) |
|
50 |
- @makeFilterLink("numOfComments", param.orderBy, param.orderDir, Messages("common.order.comments")) |
|
51 |
- </div> |
|
52 |
- </div> |
|
53 |
- } |
|
54 |
- |
|
55 |
- @if(notices != null && notices.size > 0) { |
|
56 |
- |
|
57 |
- <ul class="post-list-wrap notice-wrap"> |
|
58 |
- @for(post <- notices) { |
|
59 |
- @partial_list(post, project) |
|
60 |
- } |
|
61 |
- </ul> |
|
62 |
- |
|
63 |
- } |
|
64 |
- |
|
65 |
- <ul class="post-list-wrap"> |
|
66 |
- @for(post <- page.getList()){ |
|
67 |
- @partial_list(post, project) |
|
68 |
- } |
|
69 |
- </ul> |
|
70 |
- } |
|
71 |
- |
|
72 |
- <div class="write-btn-wrap"> |
|
73 |
- </div> |
|
74 |
- |
|
75 |
- <div id="pagination"> |
|
76 |
- <!-- pagination.js will fill here. --> |
|
77 |
- </div> |
|
78 |
- |
|
79 |
- @help.keymap("boardList", project) |
|
80 | 82 |
</div> |
81 |
- |
|
82 | 83 |
<script type="text/javascript"> |
83 | 84 |
$(document).ready(function() { |
84 | 85 |
$yobi.loadModule("board.List", { |
--- app/views/board/view.scala.html
+++ app/views/board/view.scala.html
... | ... | @@ -14,100 +14,100 @@ |
14 | 14 |
|
15 | 15 |
@projectLayout(post.title, project, utils.MenuType.BOARD){ |
16 | 16 |
@projectMenu(project, utils.MenuType.BOARD, "main-menu-only") |
17 |
-<div class="project-page-wrap board-view"> |
|
18 |
- |
|
19 |
- @** Post Info **@ |
|
20 |
- <div class="board-header issue"> |
|
21 |
- <div class="pull-right mr10 mt10"> |
|
22 |
- <div class="date" title="@JodaDateUtil.getDateString(post.createdDate)"> |
|
23 |
- @agoString(post.ago) |
|
17 |
+<div class="page-wrap-outer"> |
|
18 |
+ <div class="project-page-wrap board-view"> |
|
19 |
+ @** Post Info **@ |
|
20 |
+ <div class="board-header issue"> |
|
21 |
+ <div class="pull-right mr10 mt10"> |
|
22 |
+ <div class="date" title="@JodaDateUtil.getDateString(post.createdDate)"> |
|
23 |
+ @agoString(post.ago) |
|
24 |
+ </div> |
|
25 |
+ </div> |
|
26 |
+ <div class="title"> |
|
27 |
+ <strong class="board-id">@post.getNumber</strong> @post.title |
|
24 | 28 |
</div> |
25 | 29 |
</div> |
26 |
- <div class="title"> |
|
27 |
- <strong class="board-id">@post.getNumber</strong> @post.title |
|
28 |
- </div> |
|
29 |
- </div> |
|
30 | 30 |
|
31 |
- @** Content body **@ |
|
32 |
- <div class="board-body"> |
|
33 |
- <div class="author-info"> |
|
34 |
- <a href="@routes.UserApp.userInfo(post.authorLoginId)" class="avatar-wrap pull-left mr10"> |
|
35 |
- <img src="@User.findByLoginId(post.authorLoginId).avatarUrl" width="32" height="32" alt="@post.authorName"> |
|
36 |
- </a> |
|
37 |
- <div class="media-body"> |
|
38 |
- <p> |
|
39 |
- <a href="@routes.UserApp.userInfo(post.authorLoginId)"><strong>@post.authorLoginId</strong> (@post.authorName)</a> |
|
40 |
- </p> |
|
41 |
- <p class="status"> |
|
42 |
- @Messages("comment") <strong class="num">@post.numOfComments</strong> |
|
43 |
- </p> |
|
44 |
- </div> |
|
45 |
- </div> |
|
46 |
- <div class="content markdown-wrap markdown-before" markdown="true">@post.body</div> |
|
47 |
- <div class="attachments" id="attachments" data-resourceType="@ResourceType.BOARD_POST" data-resourceId="@post.id"></div> |
|
48 |
- </div> |
|
49 |
- <div class="board-footer board-actrow"> |
|
50 |
- <div class="pull-left"> |
|
51 |
- <a href="@urlToPostings" class="ybtn">@Messages("button.list")</a> |
|
52 |
- </div> |
|
31 |
+ @** Content body **@ |
|
32 |
+ <div class="board-body"> |
|
33 |
+ <div class="author-info"> |
|
34 |
+ <a href="@routes.UserApp.userInfo(post.authorLoginId)" class="avatar-wrap pull-left mr10"> |
|
35 |
+ <img src="@User.findByLoginId(post.authorLoginId).avatarUrl" width="32" height="32" alt="@post.authorName"> |
|
36 |
+ </a> |
|
37 |
+ <div class="media-body"> |
|
38 |
+ <p> |
|
39 |
+ <a href="@routes.UserApp.userInfo(post.authorLoginId)"><strong>@post.authorLoginId</strong> (@post.authorName)</a> |
|
40 |
+ </p> |
|
41 |
+ <p class="status"> |
|
42 |
+ @Messages("comment") <strong class="num">@post.numOfComments</strong> |
|
43 |
+ </p> |
|
44 |
+ </div> |
|
45 |
+ </div> |
|
46 |
+ <div class="content markdown-wrap markdown-before" markdown="true">@post.body</div> |
|
47 |
+ <div class="attachments" id="attachments" data-resourceType="@ResourceType.BOARD_POST" data-resourceId="@post.id"></div> |
|
48 |
+ </div> |
|
49 |
+ <div class="board-footer board-actrow"> |
|
50 |
+ <div class="pull-left"> |
|
51 |
+ <a href="@urlToPostings" class="ybtn">@Messages("button.list")</a> |
|
52 |
+ </div> |
|
53 | 53 |
|
54 |
- @if(isAllowed(UserApp.currentUser(), post.asResource(), Operation.DELETE)){ |
|
55 |
- <a href="#deleteConfirm" class="ybtn ybtn-danger" data-toggle="modal">@Messages("button.delete")</a> |
|
56 |
- } |
|
54 |
+ @if(isAllowed(UserApp.currentUser(), post.asResource(), Operation.DELETE)){ |
|
55 |
+ <a href="#deleteConfirm" class="ybtn ybtn-danger" data-toggle="modal">@Messages("button.delete")</a> |
|
56 |
+ } |
|
57 | 57 |
|
58 |
- @if(isAllowed(UserApp.currentUser(), post.asResource(), Operation.UPDATE)){ |
|
59 |
- <a href="@routes.BoardApp.editPostForm(project.owner, project.name, post.getNumber)" class="ybtn">@Messages("button.edit")</a> |
|
60 |
- } |
|
58 |
+ @if(isAllowed(UserApp.currentUser(), post.asResource(), Operation.UPDATE)){ |
|
59 |
+ <a href="@routes.BoardApp.editPostForm(project.owner, project.name, post.getNumber)" class="ybtn">@Messages("button.edit")</a> |
|
60 |
+ } |
|
61 | 61 |
|
62 |
- @if(isAllowed(UserApp.currentUser(), post.asResource(), Operation.WATCH)){ |
|
63 |
- <button id="watch-button" type="button" class="ybtn" data-toggle="button" data-watching="@if(post.getWatchers.contains(UserApp.currentUser())){true}else{false}"> |
|
64 |
- @if(post.getWatchers.contains(UserApp.currentUser())) { @Messages("project.unwatch") } else { @Messages("project.watch") } |
|
65 |
- </button> |
|
66 |
- } |
|
67 |
- </div> |
|
62 |
+ @if(isAllowed(UserApp.currentUser(), post.asResource(), Operation.WATCH)){ |
|
63 |
+ <button id="watch-button" type="button" class="ybtn" data-toggle="button" data-watching="@if(post.getWatchers.contains(UserApp.currentUser())){true}else{false}"> |
|
64 |
+ @if(post.getWatchers.contains(UserApp.currentUser())) { @Messages("project.unwatch") } else { @Messages("project.watch") } |
|
65 |
+ </button> |
|
66 |
+ } |
|
67 |
+ </div> |
|
68 | 68 |
|
69 |
- @** Comment **@ |
|
70 |
- <div id="comments" class="board-comment-wrap"> |
|
71 |
- <div class="comment-header"><i class="yobicon-comments"></i> <strong>@Messages("common.comment")</strong> <strong class="num">@post.comments.size</strong></div> |
|
72 |
- <hr class="nm" /> |
|
69 |
+ @** Comment **@ |
|
70 |
+ <div id="comments" class="board-comment-wrap"> |
|
71 |
+ <div class="comment-header"><i class="yobicon-comments"></i> <strong>@Messages("common.comment")</strong> <strong class="num">@post.comments.size</strong></div> |
|
72 |
+ <hr class="nm" /> |
|
73 | 73 |
|
74 |
- <ul class="comments"> |
|
75 |
- @for(comment <-post.comments){ |
|
76 |
- <li class="comment @isAuthorComment(comment.authorLoginId)" id="comment-@comment.id"> |
|
77 |
- <div class="comment-avatar"> |
|
78 |
- <a href="@routes.UserApp.userInfo(comment.authorLoginId)" class="avatar-wrap" data-toggle="tooltip" data-placement="top" title="@comment.authorName"> |
|
79 |
- <img src="@User.findByLoginId(comment.authorLoginId).avatarUrl" width="32" height="32" alt="@comment.authorLoginId"> |
|
80 |
- </a> |
|
81 |
- </div> |
|
82 |
- <div class="media-body"> |
|
83 |
- <div class="meta-info"> |
|
84 |
- <span class="comment_author pull-left"> |
|
85 |
- <a href="@routes.UserApp.userInfo(comment.authorLoginId)" data-toggle="tooltip" data-placement="top" title="@comment.authorName"> |
|
86 |
- <strong>@comment.authorLoginId </strong> |
|
87 |
- </a> |
|
88 |
- </span> |
|
89 |
- <a href="#comment-@comment.id" class="ago">@utils.TemplateHelper.agoString(comment.ago())</a> |
|
90 |
- @if(isAllowed(UserApp.currentUser(), comment.asResource(), Operation.DELETE)){ |
|
91 |
- <span class="edit pull-right"> |
|
92 |
- <button type="button" class="btn-transparent close" data-request-method="delete" data-request-uri="@routes.BoardApp.deleteComment(project.owner, project.name, post.getNumber, comment.id)"><i class="yobicon-trash"></i></button> |
|
93 |
- </span> |
|
94 |
- } |
|
74 |
+ <ul class="comments"> |
|
75 |
+ @for(comment <-post.comments){ |
|
76 |
+ <li class="comment @isAuthorComment(comment.authorLoginId)" id="comment-@comment.id"> |
|
77 |
+ <div class="comment-avatar"> |
|
78 |
+ <a href="@routes.UserApp.userInfo(comment.authorLoginId)" class="avatar-wrap" data-toggle="tooltip" data-placement="top" title="@comment.authorName"> |
|
79 |
+ <img src="@User.findByLoginId(comment.authorLoginId).avatarUrl" width="32" height="32" alt="@comment.authorLoginId"> |
|
80 |
+ </a> |
|
95 | 81 |
</div> |
82 |
+ <div class="media-body"> |
|
83 |
+ <div class="meta-info"> |
|
84 |
+ <span class="comment_author pull-left"> |
|
85 |
+ <a href="@routes.UserApp.userInfo(comment.authorLoginId)" data-toggle="tooltip" data-placement="top" title="@comment.authorName"> |
|
86 |
+ <strong>@comment.authorLoginId </strong> |
|
87 |
+ </a> |
|
88 |
+ </span> |
|
89 |
+ <a href="#comment-@comment.id" class="ago">@utils.TemplateHelper.agoString(comment.ago())</a> |
|
90 |
+ @if(isAllowed(UserApp.currentUser(), comment.asResource(), Operation.DELETE)){ |
|
91 |
+ <span class="edit pull-right"> |
|
92 |
+ <button type="button" class="btn-transparent close" data-request-method="delete" data-request-uri="@routes.BoardApp.deleteComment(project.owner, project.name, post.getNumber, comment.id)"><i class="yobicon-trash"></i></button> |
|
93 |
+ </span> |
|
94 |
+ } |
|
95 |
+ </div> |
|
96 | 96 |
|
97 |
- <div class="comment-body markdown-wrap markdown-before" markdown="true">@comment.contents</div> |
|
97 |
+ <div class="comment-body markdown-wrap markdown-before" markdown="true">@comment.contents</div> |
|
98 | 98 |
|
99 |
- <div class="attachments pull-right" data-resourceType="@ResourceType.NONISSUE_COMMENT" data-resourceId="@comment.id"></div> |
|
100 |
- </div> |
|
101 |
- </li> |
|
102 |
- } |
|
103 |
- </ul> |
|
99 |
+ <div class="attachments pull-right" data-resourceType="@ResourceType.NONISSUE_COMMENT" data-resourceId="@comment.id"></div> |
|
100 |
+ </div> |
|
101 |
+ </li> |
|
102 |
+ } |
|
103 |
+ </ul> |
|
104 | 104 |
|
105 |
- @common.commentForm(project, ResourceType.NONISSUE_COMMENT, routes.BoardApp.newComment(project.owner, project.name, post.getNumber).toString()) |
|
106 |
- </div> |
|
105 |
+ @common.commentForm(project, ResourceType.NONISSUE_COMMENT, routes.BoardApp.newComment(project.owner, project.name, post.getNumber).toString()) |
|
106 |
+ </div> |
|
107 | 107 |
|
108 |
- @help.keymap("boardDetail", project) |
|
108 |
+ @help.keymap("boardDetail", project) |
|
109 |
+ </div> |
|
109 | 110 |
</div> |
110 |
- |
|
111 | 111 |
<script type="text/x-jquery-tmpl" id="tplAttachedFile"><!-- |
112 | 112 |
--><li class="attached-file" data-name="${fileName}" data-href="${fileHref}" data-mime="${mimeType}" data-size="${fileSize}"> |
113 | 113 |
<strong>${fileName}(${fileSizeReadable})${notice}</strong><!-- |
--- app/views/code/branches.scala.html
+++ app/views/code/branches.scala.html
... | ... | @@ -24,44 +24,46 @@ |
24 | 24 |
|
25 | 25 |
@projectLayout(Messages("title.branches"), project, utils.MenuType.CODE) { |
26 | 26 |
@projectMenu(project, utils.MenuType.CODE, "main-menu-only") |
27 |
-<div class="project-page-wrap"> |
|
28 |
- <div class="bubble-wrap dark-gray repo-wrap"> |
|
29 |
- <div class="code-browse-wrap"> |
|
30 |
- <ul class="nav nav-tabs" style="margin-bottom:20px;"> |
|
31 |
- <li> |
|
32 |
- <a href="@routes.CodeApp.codeBrowserWithBranch(project.owner, project.name, "HEAD", "")">@Messages("code.files")</a> |
|
33 |
- </li> |
|
34 |
- <li> |
|
35 |
- <a href="@routes.CodeHistoryApp.historyUntilHead(project.owner, project.name)">@Messages("code.commits")</a> |
|
36 |
- </li> |
|
37 |
- @if(project.isGit()) { |
|
38 |
- <li class="active"> |
|
39 |
- <a href="@routes.BranchApp.branches(project.owner, project.name)">@Messages("title.branches")</a> |
|
40 |
- </li> |
|
41 |
- } |
|
42 |
- </ul> |
|
43 |
- |
|
44 |
- <table class="table branch-list-wrap"> |
|
45 |
- <thead class="thead"> |
|
46 |
- <tr> |
|
47 |
- <th>@Messages("title.branches")</th> |
|
48 |
- <th>@Messages("code.branches.commitMsg")</th> |
|
49 |
- <th>@Messages("code.branches.commitDate")</th> |
|
50 |
- <th>@Messages("code.branches.pullRequest")</th> |
|
51 |
- @if(isAllowed(UserApp.currentUser(), project.asResource(), Operation.DELETE) || |
|
52 |
- isAllowed(UserApp.currentUser(), project.asResource(), Operation.UPDATE)) { |
|
53 |
- <th></th> |
|
54 |
- } |
|
55 |
- </tr> |
|
56 |
- </thead> |
|
57 |
- <tbody> |
|
58 |
- @partial_branchrow(project, head, true) |
|
59 |
- |
|
60 |
- @for(branch <- branches.iterator()) { |
|
61 |
- @partial_branchrow(project, branch, false) |
|
27 |
+<div class="page-wrap-outer"> |
|
28 |
+ <div class="project-page-wrap"> |
|
29 |
+ <div class="bubble-wrap dark-gray repo-wrap"> |
|
30 |
+ <div class="code-browse-wrap"> |
|
31 |
+ <ul class="nav nav-tabs" style="margin-bottom:20px;"> |
|
32 |
+ <li> |
|
33 |
+ <a href="@routes.CodeApp.codeBrowserWithBranch(project.owner, project.name, "HEAD", "")">@Messages("code.files")</a> |
|
34 |
+ </li> |
|
35 |
+ <li> |
|
36 |
+ <a href="@routes.CodeHistoryApp.historyUntilHead(project.owner, project.name)">@Messages("code.commits")</a> |
|
37 |
+ </li> |
|
38 |
+ @if(project.isGit()) { |
|
39 |
+ <li class="active"> |
|
40 |
+ <a href="@routes.BranchApp.branches(project.owner, project.name)">@Messages("title.branches")</a> |
|
41 |
+ </li> |
|
62 | 42 |
} |
63 |
- </tbody> |
|
64 |
- </table> |
|
43 |
+ </ul> |
|
44 |
+ |
|
45 |
+ <table class="table branch-list-wrap"> |
|
46 |
+ <thead class="thead"> |
|
47 |
+ <tr> |
|
48 |
+ <th>@Messages("title.branches")</th> |
|
49 |
+ <th>@Messages("code.branches.commitMsg")</th> |
|
50 |
+ <th>@Messages("code.branches.commitDate")</th> |
|
51 |
+ <th>@Messages("code.branches.pullRequest")</th> |
|
52 |
+ @if(isAllowed(UserApp.currentUser(), project.asResource(), Operation.DELETE) || |
|
53 |
+ isAllowed(UserApp.currentUser(), project.asResource(), Operation.UPDATE)) { |
|
54 |
+ <th></th> |
|
55 |
+ } |
|
56 |
+ </tr> |
|
57 |
+ </thead> |
|
58 |
+ <tbody> |
|
59 |
+ @partial_branchrow(project, head, true) |
|
60 |
+ |
|
61 |
+ @for(branch <- branches.iterator()) { |
|
62 |
+ @partial_branchrow(project, branch, false) |
|
63 |
+ } |
|
64 |
+ </tbody> |
|
65 |
+ </table> |
|
66 |
+ </div> |
|
65 | 67 |
</div> |
66 | 68 |
</div> |
67 | 69 |
</div> |
--- app/views/code/diff.scala.html
+++ app/views/code/diff.scala.html
... | ... | @@ -8,129 +8,129 @@ |
8 | 8 |
|
9 | 9 |
@projectLayout(Messages("code.commits") + " @" + commit.getId, project, utils.MenuType.CODE) { |
10 | 10 |
@projectMenu(project, utils.MenuType.CODE, "main-menu-only") |
11 |
- |
|
12 |
-<div class="project-page-wrap"> |
|
13 |
- <div class="code-browse-wrap"> |
|
14 |
- <div id="branches" class="btn-group branches pull-right" data-name="branch" data-activate="manual"> |
|
15 |
- <button class="btn dropdown-toggle large" data-toggle="dropdown"> |
|
16 |
- <span class="d-label">@selectedBranch</span> |
|
17 |
- <span class="d-caret"><span class="caret"></span></span> |
|
18 |
- </button> |
|
19 |
- <ul class="dropdown-menu"> |
|
20 |
- @defining(RepositoryService.getRepository(project).getBranches()) { branches => |
|
21 |
- @for(branch <- branches){ |
|
22 |
- @partial_branchitem(project, branch, "history", "") |
|
11 |
+<div class="page-wrap-outer"> |
|
12 |
+ <div class="project-page-wrap"> |
|
13 |
+ <div class="code-browse-wrap"> |
|
14 |
+ <div id="branches" class="btn-group branches pull-right" data-name="branch" data-activate="manual"> |
|
15 |
+ <button class="btn dropdown-toggle large" data-toggle="dropdown"> |
|
16 |
+ <span class="d-label">@selectedBranch</span> |
|
17 |
+ <span class="d-caret"><span class="caret"></span></span> |
|
18 |
+ </button> |
|
19 |
+ <ul class="dropdown-menu"> |
|
20 |
+ @defining(RepositoryService.getRepository(project).getBranches()) { branches => |
|
21 |
+ @for(branch <- branches){ |
|
22 |
+ @partial_branchitem(project, branch, "history", "") |
|
23 |
+ } |
|
23 | 24 |
} |
24 |
- } |
|
25 |
- </ul> |
|
26 |
- </div> |
|
25 |
+ </ul> |
|
26 |
+ </div> |
|
27 | 27 |
|
28 |
- <ul class="nav nav-tabs" style="margin-bottom:20px;"> |
|
29 |
- <li> |
|
30 |
- <a href="@routes.CodeApp.codeBrowser(project.owner, project.name)">@Messages("code.files")</a> |
|
31 |
- </li> |
|
32 |
- <li class="active"> |
|
33 |
- <a href="@routes.CodeHistoryApp.historyUntilHead(project.owner, project.name)">@Messages("code.commits")</a> |
|
34 |
- </li> |
|
35 |
- </ul> |
|
36 |
- |
|
37 |
- <p class="commitInfo"> |
|
38 |
- @(commit.getAuthor, commit.getAuthorEmail, commit.getAuthorName) match { |
|
39 |
- case (user: User, _, _) if !user.isAnonymous => { |
|
40 |
- <a href="@routes.UserApp.userInfo(commit.getAuthor.loginId)" class="avatar-wrap"> |
|
41 |
- <img src="@commit.getAuthor.avatarUrl" alt="@commit.getAuthor.name" width="32" height="32"/> |
|
42 |
- </a> |
|
43 |
- <strong>@commit.getAuthor.name</strong> |
|
44 |
- } |
|
45 |
- case (_, email, name) if email != null => { |
|
46 |
- <span class="avatar-wrap"> |
|
47 |
- <img src="@urlToPicture(commit.getAuthorEmail, 32)" width="32" height="32"> |
|
48 |
- </span> |
|
49 |
- @if(name != null) { |
|
50 |
- <strong>@name</strong> |
|
51 |
- } |
|
52 |
- } |
|
53 |
- case (_, _, name) if name != null => { |
|
54 |
- <strong>@name</strong> |
|
55 |
- } |
|
56 |
- case (_, _, _) => { |
|
57 |
- <strong>@User.anonymous.name</strong> |
|
58 |
- } |
|
59 |
- } |
|
60 |
- <span class="ago" title="@JodaDateUtil.getDateString(commit.getAuthorDate)"> |
|
61 |
- @agoString(JodaDateUtil.ago(commit.getAuthorDate)) |
|
62 |
- </span> |
|
63 |
- <strong class="commitId pull-right">@{"@"}@commit.getId</strong> |
|
64 |
- @if(comments.size > 0) { |
|
65 |
- <span class="pull-right mt5 mr10"> |
|
66 |
- <input id="toggle-comments" type="checkbox" checked="checked" class="checkbox"> |
|
67 |
- <label for="toggle-comments" class="form-label">@Messages("code.showcomments")</label> |
|
68 |
- </span> |
|
69 |
- } |
|
70 |
- </p> |
|
71 |
- <pre class="commitMsg">@commit.getMessage</pre> |
|
72 |
- <div class="diff-body"> |
|
73 |
- @views.html.partial_diff(diff, comments, project, project) |
|
74 |
- </div> |
|
75 |
- |
|
76 |
- @** Comment **@ |
|
77 |
- <div class="board-comment-wrap"> |
|
78 |
- @defining(comments.filter(v => v.line == null)) { comments => |
|
79 |
- @if(comments.size > 0) { |
|
80 |
- <ul class="comments"> |
|
81 |
- @for(comment <- comments){ |
|
82 |
- <li id="comment-@comment.id" data-path="@comment.path" data-side="@comment.side" data-line="@comment.line" class="comment"> |
|
83 |
- <div class="comment-avatar"> |
|
84 |
- <a href="@routes.UserApp.userInfo(comment.authorLoginId)" class="avatar-wrap" data-toggle="tooltip" data-placement="top" title="@comment.authorName"> |
|
85 |
- <img src="@User.findByLoginId(comment.authorLoginId).avatarUrl" width="32" height="32" alt="@comment.authorLoginId"> |
|
86 |
- </a> |
|
87 |
- </div> |
|
88 |
- <div class="media-body"> |
|
89 |
- <div class="meta-info"> |
|
90 |
- <span class="comment_author pull-left"> |
|
91 |
- <a href="@routes.UserApp.userInfo(comment.authorLoginId)" data-toggle="tooltip" data-placement="top" title="@comment.authorName"> |
|
92 |
- <strong>@comment.authorLoginId </strong> |
|
93 |
- </a> |
|
94 |
- </span> |
|
95 |
- <span class="ago" title="@JodaDateUtil.getDateString(comment.createdDate)"> |
|
96 |
- <a href="#comment-@comment.id"> |
|
97 |
- @agoString(JodaDateUtil.ago(comment.createdDate)) |
|
98 |
- </a> |
|
99 |
- </span> |
|
100 |
- @if(isAllowed(UserApp.currentUser(), comment.asResource(), Operation.DELETE)){ |
|
101 |
- <span class="edit pull-right"> |
|
102 |
- <button class="btn-transparent pull-right close" data-request-method="delete" data-request-uri="@routes.CodeHistoryApp.deleteComment(project.owner, project.name, commit.getId, comment.id)"><i class="yobicon-trash"></i></button> |
|
103 |
- </span> |
|
104 |
- } |
|
105 |
- </div> |
|
106 |
- |
|
107 |
- <div class="comment-body markdown-wrap markdown-before" markdown="true">@comment.contents</div> |
|
108 |
- |
|
109 |
- <div class="attachments" data-resourceType="@ResourceType.COMMIT_COMMENT" data-resourceId="@comment.id"></div> |
|
110 |
- </div> |
|
28 |
+ <ul class="nav nav-tabs" style="margin-bottom:20px;"> |
|
29 |
+ <li> |
|
30 |
+ <a href="@routes.CodeApp.codeBrowser(project.owner, project.name)">@Messages("code.files")</a> |
|
111 | 31 |
</li> |
112 |
- } |
|
32 |
+ <li class="active"> |
|
33 |
+ <a href="@routes.CodeHistoryApp.historyUntilHead(project.owner, project.name)">@Messages("code.commits")</a> |
|
34 |
+ </li> |
|
113 | 35 |
</ul> |
114 |
- } |
|
115 |
- } |
|
116 | 36 |
|
117 |
- @common.commentForm(project, ResourceType.COMMIT_COMMENT, routes.CodeHistoryApp.newComment(project.owner, project.name, commit.getId).toString()) |
|
37 |
+ <p class="commitInfo"> |
|
38 |
+ @(commit.getAuthor, commit.getAuthorEmail, commit.getAuthorName) match { |
|
39 |
+ case (user: User, _, _) if !user.isAnonymous => { |
|
40 |
+ <a href="@routes.UserApp.userInfo(commit.getAuthor.loginId)" class="avatar-wrap"> |
|
41 |
+ <img src="@commit.getAuthor.avatarUrl" alt="@commit.getAuthor.name" width="32" height="32"/> |
|
42 |
+ </a> |
|
43 |
+ <strong>@commit.getAuthor.name</strong> |
|
44 |
+ } |
|
45 |
+ case (_, email, name) if email != null => { |
|
46 |
+ <span class="avatar-wrap"> |
|
47 |
+ <img src="@urlToPicture(commit.getAuthorEmail, 32)" width="32" height="32"> |
|
48 |
+ </span> |
|
49 |
+ @if(name != null) { |
|
50 |
+ <strong>@name</strong> |
|
51 |
+ } |
|
52 |
+ } |
|
53 |
+ case (_, _, name) if name != null => { |
|
54 |
+ <strong>@name</strong> |
|
55 |
+ } |
|
56 |
+ case (_, _, _) => { |
|
57 |
+ <strong>@User.anonymous.name</strong> |
|
58 |
+ } |
|
59 |
+ } |
|
60 |
+ <span class="ago" title="@JodaDateUtil.getDateString(commit.getAuthorDate)"> |
|
61 |
+ @agoString(JodaDateUtil.ago(commit.getAuthorDate)) |
|
62 |
+ </span> |
|
63 |
+ <strong class="commitId pull-right">@{"@"}@commit.getId</strong> |
|
64 |
+ @if(comments.size > 0) { |
|
65 |
+ <span class="pull-right mt5 mr10"> |
|
66 |
+ <input id="toggle-comments" type="checkbox" checked="checked" class="checkbox"> |
|
67 |
+ <label for="toggle-comments" class="form-label">@Messages("code.showcomments")</label> |
|
68 |
+ </span> |
|
69 |
+ } |
|
70 |
+ </p> |
|
71 |
+ <pre class="commitMsg">@commit.getMessage</pre> |
|
72 |
+ <div class="diff-body"> |
|
73 |
+ @views.html.partial_diff(diff, comments, project, project) |
|
74 |
+ </div> |
|
75 |
+ |
|
76 |
+ @** Comment **@ |
|
77 |
+ <div class="board-comment-wrap"> |
|
78 |
+ @defining(comments.filter(v => v.line == null)) { comments => |
|
79 |
+ @if(comments.size > 0) { |
|
80 |
+ <ul class="comments"> |
|
81 |
+ @for(comment <- comments){ |
|
82 |
+ <li id="comment-@comment.id" data-path="@comment.path" data-side="@comment.side" data-line="@comment.line" class="comment"> |
|
83 |
+ <div class="comment-avatar"> |
|
84 |
+ <a href="@routes.UserApp.userInfo(comment.authorLoginId)" class="avatar-wrap" data-toggle="tooltip" data-placement="top" title="@comment.authorName"> |
|
85 |
+ <img src="@User.findByLoginId(comment.authorLoginId).avatarUrl" width="32" height="32" alt="@comment.authorLoginId"> |
|
86 |
+ </a> |
|
87 |
+ </div> |
|
88 |
+ <div class="media-body"> |
|
89 |
+ <div class="meta-info"> |
|
90 |
+ <span class="comment_author pull-left"> |
|
91 |
+ <a href="@routes.UserApp.userInfo(comment.authorLoginId)" data-toggle="tooltip" data-placement="top" title="@comment.authorName"> |
|
92 |
+ <strong>@comment.authorLoginId </strong> |
|
93 |
+ </a> |
|
94 |
+ </span> |
|
95 |
+ <span class="ago" title="@JodaDateUtil.getDateString(comment.createdDate)"> |
|
96 |
+ <a href="#comment-@comment.id"> |
|
97 |
+ @agoString(JodaDateUtil.ago(comment.createdDate)) |
|
98 |
+ </a> |
|
99 |
+ </span> |
|
100 |
+ @if(isAllowed(UserApp.currentUser(), comment.asResource(), Operation.DELETE)){ |
|
101 |
+ <span class="edit pull-right"> |
|
102 |
+ <button class="btn-transparent pull-right close" data-request-method="delete" data-request-uri="@routes.CodeHistoryApp.deleteComment(project.owner, project.name, commit.getId, comment.id)"><i class="yobicon-trash"></i></button> |
|
103 |
+ </span> |
|
104 |
+ } |
|
105 |
+ </div> |
|
106 |
+ |
|
107 |
+ <div class="comment-body markdown-wrap markdown-before" markdown="true">@comment.contents</div> |
|
108 |
+ |
|
109 |
+ <div class="attachments" data-resourceType="@ResourceType.COMMIT_COMMENT" data-resourceId="@comment.id"></div> |
|
110 |
+ </div> |
|
111 |
+ </li> |
|
112 |
+ } |
|
113 |
+ </ul> |
|
114 |
+ } |
|
115 |
+ } |
|
116 |
+ |
|
117 |
+ @common.commentForm(project, ResourceType.COMMIT_COMMENT, routes.CodeHistoryApp.newComment(project.owner, project.name, commit.getId).toString()) |
|
118 |
+ </div> |
|
119 |
+ @** // Comment **@ |
|
118 | 120 |
</div> |
119 |
- @** // Comment **@ |
|
120 |
- </div> |
|
121 | 121 |
|
122 |
- <button id="watch-button" type="button" class="ybtn @if(commit.getWatchers(project).contains(UserApp.currentUser())) { active ybtn-watching }" data-toggle="button">@Messages("notification.watch")</button> |
|
122 |
+ <button id="watch-button" type="button" class="ybtn @if(commit.getWatchers(project).contains(UserApp.currentUser())) { active ybtn-watching }" data-toggle="button">@Messages("notification.watch")</button> |
|
123 | 123 |
|
124 |
- <a href="@routes.CodeHistoryApp.history(project.owner, project.name, selectedBranch, path)" class="ybtn pull-right">@Messages("button.list")</a> |
|
124 |
+ <a href="@routes.CodeHistoryApp.history(project.owner, project.name, selectedBranch, path)" class="ybtn pull-right">@Messages("button.list")</a> |
|
125 | 125 |
|
126 |
- <div id="minimap" class="minimap-outer"> |
|
127 |
- <div class="minimap-wrap"> |
|
128 |
- <div class="minimap-curr"></div> |
|
129 |
- <div class="minimap-links"></div> |
|
126 |
+ <div id="minimap" class="minimap-outer"> |
|
127 |
+ <div class="minimap-wrap"> |
|
128 |
+ <div class="minimap-curr"></div> |
|
129 |
+ <div class="minimap-links"></div> |
|
130 |
+ </div> |
|
130 | 131 |
</div> |
131 | 132 |
</div> |
132 | 133 |
</div> |
133 |
- |
|
134 | 134 |
@common.markdown(project) |
135 | 135 |
@common.mergely() |
136 | 136 |
|
--- app/views/code/history.scala.html
+++ app/views/code/history.scala.html
... | ... | @@ -61,136 +61,137 @@ |
61 | 61 |
|
62 | 62 |
@projectLayout(Messages("title.commitHistory"), project, utils.MenuType.CODE) { |
63 | 63 |
@projectMenu(project, utils.MenuType.CODE, "main-menu-only") |
64 |
-<div class="project-page-wrap"> |
|
65 |
- <div class="bubble-wrap dark-gray repo-wrap"> |
|
66 |
- <div class="code-browse-wrap"> |
|
67 |
- @if(path != null){ |
|
68 |
- <div id="breadcrumbs" class="code-breadcrumb-wrap"> |
|
69 |
- <a href="@routes.CodeHistoryApp.history(project.owner, project.name, URLEncoder.encode(selectedBranch, "UTF-8"), "")">@project.name</a> |
|
70 |
- @makeBreadCrumbs(path) |
|
71 |
- </div> |
|
72 |
- } |
|
64 |
+<div class="page-wrap-outer"> |
|
65 |
+ <div class="project-page-wrap"> |
|
66 |
+ <div class="bubble-wrap dark-gray repo-wrap"> |
|
67 |
+ <div class="code-browse-wrap"> |
|
68 |
+ @if(path != null){ |
|
69 |
+ <div id="breadcrumbs" class="code-breadcrumb-wrap"> |
|
70 |
+ <a href="@routes.CodeHistoryApp.history(project.owner, project.name, URLEncoder.encode(selectedBranch, "UTF-8"), "")">@project.name</a> |
|
71 |
+ @makeBreadCrumbs(path) |
|
72 |
+ </div> |
|
73 |
+ } |
|
73 | 74 |
|
74 |
- @if(path == null){ |
|
75 |
- <div id="branches" class="btn-group branches pull-right" data-name="branch" data-activate="manual"> |
|
76 |
- <button class="btn dropdown-toggle large" data-toggle="dropdown"> |
|
77 |
- <span class="d-label">@if(selectedBranch){ @selectedBranch } else { HEAD }</span> |
|
78 |
- <span class="d-caret"><span class="caret"></span></span> |
|
79 |
- </button> |
|
80 |
- <ul class="dropdown-menu"> |
|
81 |
- @defining(RepositoryService.getRepository(project).getBranches()) { branches => |
|
82 |
- @for(branch <- branches){ |
|
83 |
- @partial_branchitem(project, branch, "history", "") |
|
75 |
+ @if(path == null){ |
|
76 |
+ <div id="branches" class="btn-group branches pull-right" data-name="branch" data-activate="manual"> |
|
77 |
+ <button class="btn dropdown-toggle large" data-toggle="dropdown"> |
|
78 |
+ <span class="d-label">@if(selectedBranch){ @selectedBranch } else { HEAD }</span> |
|
79 |
+ <span class="d-caret"><span class="caret"></span></span> |
|
80 |
+ </button> |
|
81 |
+ <ul class="dropdown-menu"> |
|
82 |
+ @defining(RepositoryService.getRepository(project).getBranches()) { branches => |
|
83 |
+ @for(branch <- branches){ |
|
84 |
+ @partial_branchitem(project, branch, "history", "") |
|
85 |
+ } |
|
84 | 86 |
} |
87 |
+ </ul> |
|
88 |
+ </div> |
|
89 |
+ |
|
90 |
+ <ul class="nav nav-tabs" style="margin-bottom:20px;"> |
|
91 |
+ <li> |
|
92 |
+ <a href="@getFilesURL">@Messages("code.files")</a> |
|
93 |
+ </li> |
|
94 |
+ <li class="active"> |
|
95 |
+ <a href="@getHistoryURL(path)">@Messages("code.commits")</a> |
|
96 |
+ </li> |
|
97 |
+ @if(project.isGit()) { |
|
98 |
+ <li> |
|
99 |
+ <a href="@routes.BranchApp.branches(project.owner, project.name)">@Messages("title.branches")</a> |
|
100 |
+ </li> |
|
85 | 101 |
} |
86 | 102 |
</ul> |
87 |
- </div> |
|
88 |
- |
|
89 |
- <ul class="nav nav-tabs" style="margin-bottom:20px;"> |
|
90 |
- <li> |
|
91 |
- <a href="@getFilesURL">@Messages("code.files")</a> |
|
92 |
- </li> |
|
93 |
- <li class="active"> |
|
94 |
- <a href="@getHistoryURL(path)">@Messages("code.commits")</a> |
|
95 |
- </li> |
|
96 |
- @if(project.isGit()) { |
|
97 |
- <li> |
|
98 |
- <a href="@routes.BranchApp.branches(project.owner, project.name)">@Messages("title.branches")</a> |
|
99 |
- </li> |
|
100 | 103 |
} |
101 |
- </ul> |
|
102 |
- } |
|
103 | 104 |
|
104 |
- <div id="history" class="commit-wrap"> |
|
105 |
- <table class="code-table commits@if(path != null){ mt10}"> |
|
106 |
- <thead class="thead"> |
|
107 |
- <tr> |
|
108 |
- <td class="commit-id"><strong>@{"@"}</strong></td> |
|
109 |
- <td class="messages"><strong>@Messages("code.commitMsg")</strong></td> |
|
110 |
- @if(path != null){ |
|
111 |
- <td class="browse"></td> |
|
112 |
- } |
|
113 |
- <td class="date"><strong>@Messages("code.commitDate")</strong></td> |
|
114 |
- <td class="author"><strong>@Messages("code.author")</strong></td> |
|
115 |
- </tr> |
|
116 |
- </thead> |
|
117 |
- <tbody class="tbody"> |
|
118 |
- @if(history.isEmpty()){ |
|
119 |
- <tr><td colspan="5" class="warning-none">@Messages("code.nocommits")</td></tr> |
|
120 |
- } |
|
121 |
- @for(commit <- history.iterator()) { |
|
122 |
- @defining(getShowCommitURL(project, commit, path)){ showCommitURL => |
|
123 |
- <tr> |
|
124 |
- <td class="commit-id"> |
|
125 |
- <a href="@showCommitURL" title="@Messages("code.showCommit")"> |
|
126 |
- @commit.getShortId() |
|
127 |
- </a> |
|
128 |
- </td> |
|
129 |
- <td class="messages"> |
|
130 |
- @defining(CommitComment.count(project, commit.getId, path)){ numOfComment => |
|
131 |
- @if(numOfComment > 0) { |
|
132 |
- <span class="number-of-comments"><i class="yobicon-comments"></i> @numOfComment</span> |
|
133 |
- } |
|
105 |
+ <div id="history" class="commit-wrap"> |
|
106 |
+ <table class="code-table commits@if(path != null){ mt10}"> |
|
107 |
+ <thead class="thead"> |
|
108 |
+ <tr> |
|
109 |
+ <td class="commit-id"><strong>@{"@"}</strong></td> |
|
110 |
+ <td class="messages"><strong>@Messages("code.commitMsg")</strong></td> |
|
111 |
+ @if(path != null){ |
|
112 |
+ <td class="browse"></td> |
|
134 | 113 |
} |
135 |
- |
|
136 |
- @common.commitMsg(commit.getShortMessage(), commit.getMessage(), showCommitURL.toString()) |
|
137 |
- </td> |
|
138 |
- @if(path != null){ |
|
139 |
- <td class="browse"> |
|
140 |
- <a href="@routes.CodeApp.codeBrowserWithBranch(project.owner, project.name, commit.getShortId(), path)" title="@Messages("code.showCodeAtThisCommit")" class="ybtn"> |
|
141 |
- @Messages("code.showCode") |
|
142 |
- </a> |
|
143 |
- </td> |
|
114 |
+ <td class="date"><strong>@Messages("code.commitDate")</strong></td> |
|
115 |
+ <td class="author"><strong>@Messages("code.author")</strong></td> |
|
116 |
+ </tr> |
|
117 |
+ </thead> |
|
118 |
+ <tbody class="tbody"> |
|
119 |
+ @if(history.isEmpty()){ |
|
120 |
+ <tr><td colspan="5" class="warning-none">@Messages("code.nocommits")</td></tr> |
|
144 | 121 |
} |
145 |
- <td class="date">@momentFromNow(commit.getAuthorDate(), lang.language)</td> |
|
146 |
- <td class="author"> |
|
147 |
- @(commit.getAuthor, commit.getAuthorEmail, commit.getAuthorName) match { |
|
148 |
- case (user: User, _, _) if !user.isAnonymous => { |
|
149 |
- |
|
150 |
- <a href="@routes.UserApp.userInfo(commit.getAuthor.loginId)" class="avatar-wrap" data-toggle="tooltip" data-placement="top" title="@user.loginId"> |
|
151 |
- @if(user.avatarUrl == UserApp.DEFAULT_AVATAR_URL){ |
|
152 |
- @if(commit.getAuthorEmail != null) { |
|
153 |
- <img src="@urlToPicture(commit.getAuthorEmail, 32)"> |
|
154 |
- } else { |
|
155 |
- <img src="@urlToPicture(commit.getAuthor.email, 32)"> |
|
122 |
+ @for(commit <- history.iterator()) { |
|
123 |
+ @defining(getShowCommitURL(project, commit, path)){ showCommitURL => |
|
124 |
+ <tr> |
|
125 |
+ <td class="commit-id"> |
|
126 |
+ <a href="@showCommitURL" title="@Messages("code.showCommit")"> |
|
127 |
+ @commit.getShortId() |
|
128 |
+ </a> |
|
129 |
+ </td> |
|
130 |
+ <td class="messages"> |
|
131 |
+ @defining(CommitComment.count(project, commit.getId, path)){ numOfComment => |
|
132 |
+ @if(numOfComment > 0) { |
|
133 |
+ <span class="number-of-comments"><i class="yobicon-comments"></i> @numOfComment</span> |
|
156 | 134 |
} |
157 |
- } else { |
|
158 |
- <img src="@commit.getAuthor.avatarUrl" alt="@commit.getAuthor.name" width="32" height="32"/> |
|
159 |
- } </a> |
|
135 |
+ } |
|
136 |
+ |
|
137 |
+ @common.commitMsg(commit.getShortMessage(), commit.getMessage(), showCommitURL.toString()) |
|
138 |
+ </td> |
|
139 |
+ @if(path != null){ |
|
140 |
+ <td class="browse"> |
|
141 |
+ <a href="@routes.CodeApp.codeBrowserWithBranch(project.owner, project.name, commit.getShortId(), path)" title="@Messages("code.showCodeAtThisCommit")" class="ybtn"> |
|
142 |
+ @Messages("code.showCode") |
|
143 |
+ </a> |
|
144 |
+ </td> |
|
160 | 145 |
} |
161 |
- case (_, email, _) if email != null => { |
|
162 |
- <span class="avatar-wrap" class="avatar-wrap" data-toggle="tooltip" data-placement="top" title="@commit.getAuthorEmail"> |
|
163 |
- <img src="@urlToPicture(commit.getAuthorEmail, 32)"> |
|
164 |
- </span> |
|
165 |
- } |
|
166 |
- case (_, _, name) if name != null => { |
|
167 |
- <span>@commit.getAuthorName</span> |
|
168 |
- } |
|
169 |
- case (_, _, _) => { |
|
170 |
- <span>@User.anonymous.name</span> |
|
171 |
- } |
|
172 |
- } |
|
173 |
- </td> |
|
174 |
- </tr> |
|
175 |
- } |
|
176 |
- } |
|
177 |
- </tbody> |
|
178 |
- </table> |
|
146 |
+ <td class="date">@momentFromNow(commit.getAuthorDate(), lang.language)</td> |
|
147 |
+ <td class="author"> |
|
148 |
+ @(commit.getAuthor, commit.getAuthorEmail, commit.getAuthorName) match { |
|
149 |
+ case (user: User, _, _) if !user.isAnonymous => { |
|
150 |
+ |
|
151 |
+ <a href="@routes.UserApp.userInfo(commit.getAuthor.loginId)" class="avatar-wrap" data-toggle="tooltip" data-placement="top" title="@user.loginId"> |
|
152 |
+ @if(user.avatarUrl == UserApp.DEFAULT_AVATAR_URL){ |
|
153 |
+ @if(commit.getAuthorEmail != null) { |
|
154 |
+ <img src="@urlToPicture(commit.getAuthorEmail, 32)"> |
|
155 |
+ } else { |
|
156 |
+ <img src="@urlToPicture(commit.getAuthor.email, 32)"> |
|
157 |
+ } |
|
158 |
+ } else { |
|
159 |
+ <img src="@commit.getAuthor.avatarUrl" alt="@commit.getAuthor.name" width="32" height="32"/> |
|
160 |
+ } </a> |
|
161 |
+ } |
|
162 |
+ case (_, email, _) if email != null => { |
|
163 |
+ <span class="avatar-wrap" class="avatar-wrap" data-toggle="tooltip" data-placement="top" title="@commit.getAuthorEmail"> |
|
164 |
+ <img src="@urlToPicture(commit.getAuthorEmail, 32)"> |
|
165 |
+ </span> |
|
166 |
+ } |
|
167 |
+ case (_, _, name) if name != null => { |
|
168 |
+ <span>@commit.getAuthorName</span> |
|
169 |
+ } |
|
170 |
+ case (_, _, _) => { |
|
171 |
+ <span>@User.anonymous.name</span> |
|
172 |
+ } |
|
173 |
+ } |
|
174 |
+ </td> |
|
175 |
+ </tr> |
|
176 |
+ } |
|
177 |
+ } |
|
178 |
+ </tbody> |
|
179 |
+ </table> |
|
180 |
+ </div> |
|
179 | 181 |
</div> |
180 |
- </div> |
|
181 | 182 |
|
182 |
- <div class="actrow margin-top-20"> |
|
183 |
- @if(page > 0) { |
|
184 |
- <a href="@getHistoryURL(path)?page=@(page - 1)" class="ybtn pull-left">@Messages("code.newer")</a> |
|
185 |
- } |
|
183 |
+ <div class="actrow margin-top-20"> |
|
184 |
+ @if(page > 0) { |
|
185 |
+ <a href="@getHistoryURL(path)?page=@(page - 1)" class="ybtn pull-left">@Messages("code.newer")</a> |
|
186 |
+ } |
|
186 | 187 |
|
187 |
- @if(isHistoryExistAndHasParent(history)) { |
|
188 |
- <a href="@getHistoryURL(path)?page=@(page + 1)" class="ybtn pull-left">@Messages("code.older")</a> |
|
189 |
- } |
|
188 |
+ @if(isHistoryExistAndHasParent(history)) { |
|
189 |
+ <a href="@getHistoryURL(path)?page=@(page + 1)" class="ybtn pull-left">@Messages("code.older")</a> |
|
190 |
+ } |
|
191 |
+ </div> |
|
190 | 192 |
</div> |
191 | 193 |
</div> |
192 | 194 |
</div> |
193 |
- |
|
194 | 195 |
<script type="text/javascript"> |
195 | 196 |
$(document).ready(function(){ |
196 | 197 |
$("button.moreBtn").on("click", function(){ |
--- app/views/code/nohead.scala.html
+++ app/views/code/nohead.scala.html
... | ... | @@ -18,39 +18,39 @@ |
18 | 18 |
|
19 | 19 |
@projectLayout(Messages("title.commitHistory"), project, utils.MenuType.CODE) { |
20 | 20 |
@projectMenu(project, utils.MenuType.CODE, "main-menu-only") |
21 |
- |
|
22 |
-<div class="project-page-wrap"> |
|
23 |
- <div class="row-fluid"> |
|
24 |
- <div class="span12"> |
|
25 |
- @Html(Messages("code.nohead")) |
|
26 |
-@if(isAllowed(UserApp.currentUser(), project.asResource(), Operation.UPDATE)) { |
|
27 |
- <h5>@Messages("code.nohead.clone", Messages("app.name"))</h5> |
|
28 |
- <pre><code>git clone @getCodeURL(project) |
|
29 |
-cd @project.name/ |
|
30 |
-echo "# @project.name" > README.md |
|
31 |
-git add README.md |
|
32 |
-git commit -m "Hello @Messages("app.name")" |
|
33 |
-git push origin master</code></pre> |
|
34 |
- <h5>@Messages("code.nohead.init", Messages("app.name"))</h5> |
|
35 |
- <pre><code>mkdir @project.name |
|
36 |
-cd @project.name/ |
|
37 |
-echo "# @project.name" > README.md |
|
38 |
-git init |
|
39 |
-git add README.md |
|
40 |
-git commit -m "Hello @Messages("app.name")" |
|
41 |
-git remote add origin @getCodeURL(project) |
|
42 |
-git push origin master</code></pre> |
|
43 |
- <h5>@Messages("code.nohead.remote", Messages("app.name"))</h5> |
|
44 |
- <pre><code>git remote add origin @getCodeURL(project) |
|
45 |
-git push origin master</code></pre> |
|
46 |
- <h5>@Messages("code.nohead.pull.push")</h5> |
|
47 |
- <pre><code>git pull origin master |
|
48 |
-git push origin master</code></pre> |
|
49 |
-} |
|
50 |
- </div> |
|
21 |
+<div class="page-wrap-outer"> |
|
22 |
+ <div class="project-page-wrap"> |
|
23 |
+ <div class="row-fluid"> |
|
24 |
+ <div class="span12"> |
|
25 |
+ @Html(Messages("code.nohead")) |
|
26 |
+ @if(isAllowed(UserApp.currentUser(), project.asResource(), Operation.UPDATE)) { |
|
27 |
+ <h5>@Messages("code.nohead.clone", Messages("app.name"))</h5> |
|
28 |
+ <pre><code>git clone @getCodeURL(project) |
|
29 |
+ cd @project.name/ |
|
30 |
+ echo "# @project.name" > README.md |
|
31 |
+ git add README.md |
|
32 |
+ git commit -m "Hello @Messages("app.name")" |
|
33 |
+ git push origin master</code></pre> |
|
34 |
+ <h5>@Messages("code.nohead.init", Messages("app.name"))</h5> |
|
35 |
+ <pre><code>mkdir @project.name |
|
36 |
+ cd @project.name/ |
|
37 |
+ echo "# @project.name" > README.md |
|
38 |
+ git init |
|
39 |
+ git add README.md |
|
40 |
+ git commit -m "Hello @Messages("app.name")" |
|
41 |
+ git remote add origin @getCodeURL(project) |
|
42 |
+ git push origin master</code></pre> |
|
43 |
+ <h5>@Messages("code.nohead.remote", Messages("app.name"))</h5> |
|
44 |
+ <pre><code>git remote add origin @getCodeURL(project) |
|
45 |
+ git push origin master</code></pre> |
|
46 |
+ <h5>@Messages("code.nohead.pull.push")</h5> |
|
47 |
+ <pre><code>git pull origin master |
|
48 |
+ git push origin master</code></pre> |
|
49 |
+ } |
|
50 |
+ </div> |
|
51 |
+ </div> |
|
51 | 52 |
</div> |
52 | 53 |
</div> |
53 |
- |
|
54 | 54 |
<script type="text/javascript"> |
55 | 55 |
$(document).ready(function(){ |
56 | 56 |
$yobi.loadModule("code.Nohead", { |
--- app/views/code/nohead_svn.scala.html
+++ app/views/code/nohead_svn.scala.html
... | ... | @@ -25,22 +25,23 @@ |
25 | 25 |
|
26 | 26 |
@projectLayout(Messages("title.commitHistory"), project, utils.MenuType.CODE) { |
27 | 27 |
@projectMenu(project, utils.MenuType.CODE, "main-menu-only") |
28 |
-<div class="project-page-wrap"> |
|
29 |
- <div class="row-fluid"> |
|
30 |
- <div class="span12"> |
|
31 |
- @Html(Messages("code.nohead")) |
|
32 |
- @if(isAllowed(UserApp.currentUser(), project.asResource(), Operation.UPDATE)) { |
|
33 |
- <h5>@Messages("code.nohead.svn.clone", Messages("app.name"))</h5> |
|
34 |
- <pre><code>svn co @CodeApp.getURL(project) --username @UserApp.currentUser().loginId |
|
35 |
-cd @project.name/ |
|
36 |
-echo "# @project.name" > README.md |
|
37 |
-svn add README.md |
|
38 |
-svn commit -m "first commit"</code></pre> |
|
39 |
-} |
|
28 |
+<div class="page-wrap-outer"> |
|
29 |
+ <div class="project-page-wrap"> |
|
30 |
+ <div class="row-fluid"> |
|
31 |
+ <div class="span12"> |
|
32 |
+ @Html(Messages("code.nohead")) |
|
33 |
+ @if(isAllowed(UserApp.currentUser(), project.asResource(), Operation.UPDATE)) { |
|
34 |
+ <h5>@Messages("code.nohead.svn.clone", Messages("app.name"))</h5> |
|
35 |
+ <pre><code>svn co @CodeApp.getURL(project) --username @UserApp.currentUser().loginId |
|
36 |
+ cd @project.name/ |
|
37 |
+ echo "# @project.name" > README.md |
|
38 |
+ svn add README.md |
|
39 |
+ svn commit -m "first commit"</code></pre> |
|
40 |
+ } |
|
41 |
+ </div> |
|
40 | 42 |
</div> |
41 | 43 |
</div> |
42 | 44 |
</div> |
43 |
- |
|
44 | 45 |
<script type="text/javascript"> |
45 | 46 |
$(document).ready(function(){ |
46 | 47 |
$yobi.loadModule("code.Nohead", { |
--- app/views/code/svnDiff.scala.html
+++ app/views/code/svnDiff.scala.html
... | ... | @@ -29,139 +29,140 @@ |
29 | 29 |
|
30 | 30 |
@projectLayout(Messages("code.commits") + " @" + commit.getId, project, utils.MenuType.CODE) { |
31 | 31 |
@projectMenu(project, utils.MenuType.CODE, "main-menu-only") |
32 |
-<div class="project-page-wrap"> |
|
33 |
- <div class="code-browse-wrap"> |
|
34 |
- <div id="branches" class="btn-group branches pull-right" data-name="branch" data-activate="manual"> |
|
35 |
- <button class="btn dropdown-toggle large" data-toggle="dropdown"> |
|
36 |
- <span class="d-label">@if(selectedBranch){ @selectedBranch } else { HEAD }</span> |
|
37 |
- <span class="d-caret"><span class="caret"></span></span> |
|
38 |
- </button> |
|
39 |
- <ul class="dropdown-menu"> |
|
40 |
- @defining(RepositoryService.getRepository(project).getBranches()) { branches => |
|
41 |
- @for(branch <- branches){ |
|
42 |
- @makeBranchItem(project, branch) |
|
32 |
+<div class="page-wrap-outer"> |
|
33 |
+ <div class="project-page-wrap"> |
|
34 |
+ <div class="code-browse-wrap"> |
|
35 |
+ <div id="branches" class="btn-group branches pull-right" data-name="branch" data-activate="manual"> |
|
36 |
+ <button class="btn dropdown-toggle large" data-toggle="dropdown"> |
|
37 |
+ <span class="d-label">@if(selectedBranch){ @selectedBranch } else { HEAD }</span> |
|
38 |
+ <span class="d-caret"><span class="caret"></span></span> |
|
39 |
+ </button> |
|
40 |
+ <ul class="dropdown-menu"> |
|
41 |
+ @defining(RepositoryService.getRepository(project).getBranches()) { branches => |
|
42 |
+ @for(branch <- branches){ |
|
43 |
+ @makeBranchItem(project, branch) |
|
44 |
+ } |
|
43 | 45 |
} |
44 |
- } |
|
45 |
- </ul> |
|
46 |
- </div> |
|
47 |
- |
|
48 |
- <ul class="nav nav-tabs" style="margin-bottom:20px;"> |
|
49 |
- <li> |
|
50 |
- <a href="@routes.CodeApp.codeBrowser(project.owner, project.name)">@Messages("code.files")</a> |
|
51 |
- </li> |
|
52 |
- <li class="active"> |
|
53 |
- <a href="@routes.CodeHistoryApp.historyUntilHead(project.owner, project.name)">@Messages("code.commits")</a> |
|
54 |
- </li> |
|
55 |
- </ul> |
|
56 |
- |
|
57 |
- <p class="commitInfo"> |
|
58 |
- @(commit.getAuthor, commit.getAuthorEmail, commit.getAuthorName) match { |
|
59 |
- case (user: User, _, _) if !user.isAnonymous => { |
|
60 |
- <a href="@routes.UserApp.userInfo(commit.getAuthor.loginId)" class="avatar-wrap"> |
|
61 |
- <img src="@commit.getAuthor.avatarUrl" alt="@commit.getAuthor.name" width="32" height="32"/> |
|
62 |
- </a> |
|
63 |
- <strong>@commit.getAuthor.name</strong> |
|
64 |
- } |
|
65 |
- case (_, email, name) if email != null => { |
|
66 |
- <span class="avatar-wrap"> |
|
67 |
- <img src="@urlToPicture(commit.getAuthorEmail, 32)" width="32" height="32"> |
|
68 |
- </span> |
|
69 |
- @if(name != null) { |
|
70 |
- <strong>@name</strong> |
|
71 |
- } |
|
72 |
- } |
|
73 |
- case (_, _, name) if name != null => { |
|
74 |
- <strong>@name</strong> |
|
75 |
- } |
|
76 |
- case (_, _, _) => { |
|
77 |
- <strong>@User.anonymous.name</strong> |
|
78 |
- } |
|
79 |
- } |
|
80 |
- <span class="ago" title="@JodaDateUtil.getDateString(commit.getAuthorDate)"> |
|
81 |
- @agoString(JodaDateUtil.ago(commit.getAuthorDate)) |
|
82 |
- </span> |
|
83 |
- <strong class="commitId pull-right">@{"@"}@commit.getId</strong> |
|
84 |
- @if(comments.size > 0) { |
|
85 |
- <span class="pull-right mt5 mr10"> |
|
86 |
- <input id="toggle-comments" type="checkbox" checked="checked" class="checkbox"> |
|
87 |
- <label for="toggle-comments" class="form-label">@Messages("code.showcomments")</label> |
|
88 |
- </span> |
|
89 |
- } |
|
90 |
- </p> |
|
91 |
- <pre class="commitMsg">@commit.getMessage</pre> |
|
92 |
- <div class="diff-wrap"> |
|
93 |
- <div id="commit" data-commit-origin="true" class="diff-body hide">@patch</div> |
|
94 |
- </div> |
|
95 |
- @** Mergely **@ |
|
96 |
- <div id="compare" class="modal hide compare-wrap" tabindex="-1" role="dialog"> |
|
97 |
- <h4 class="path"> |
|
98 |
- <span></span> |
|
99 |
- <button type="button" class="ybtn pull-right" data-dismiss="modal" style="margin-right:20px;">@Messages("button.confirm")</button> |
|
100 |
- </h4> |
|
101 |
- <div class="row-fluid"> |
|
102 |
- <div class="span6 commitA"></div> |
|
103 |
- <div class="span6 commitB"></div> |
|
46 |
+ </ul> |
|
104 | 47 |
</div> |
105 |
- <div id="mergely" class="mergely-wrap"></div> |
|
106 |
- </div> |
|
107 |
- @** // **@ |
|
108 | 48 |
|
109 |
- @** Comment **@ |
|
110 |
- <div class="board-comment-wrap"> |
|
111 |
- @if(comments.size > 0) { |
|
112 |
- <ul class="comments"> |
|
113 |
- @for(comment <- comments){ |
|
114 |
- <li id="comment-@comment.id" data-path="@comment.path" data-side="@comment.side" data-line="@comment.line" class="comment"> |
|
115 |
- <div class="comment-avatar"> |
|
116 |
- <a href="@routes.UserApp.userInfo(comment.authorLoginId)" class="avatar-wrap" data-toggle="tooltip" data-placement="top" title="@comment.authorName"> |
|
117 |
- <img src="@User.findByLoginId(comment.authorLoginId).avatarUrl" width="32" height="32" alt="@comment.authorLoginId"> |
|
118 |
- </a> |
|
119 |
- </div> |
|
120 |
- <div class="media-body"> |
|
121 |
- <div class="meta-info"> |
|
122 |
- <span class="comment_author pull-left"> |
|
123 |
- <a href="@routes.UserApp.userInfo(comment.authorLoginId)" data-toggle="tooltip" data-placement="top" title="@comment.authorName"> |
|
124 |
- <strong>@comment.authorLoginId </strong> |
|
125 |
- </a> |
|
126 |
- </span> |
|
127 |
- <span class="ago"> |
|
128 |
- <a href="#comment-@comment.id" title="@JodaDateUtil.getDateString(commit.getAuthorDate)"> |
|
129 |
- @agoString(JodaDateUtil.ago(comment.createdDate)) |
|
130 |
- </a> |
|
131 |
- </span> |
|
132 |
- @if(isAllowed(UserApp.currentUser(), comment.asResource(), Operation.DELETE)){ |
|
133 |
- <span class="edit pull-right"> |
|
134 |
- <button class="btn-transparent pull-right close" data-request-method="delete" data-request-uri="@routes.CodeHistoryApp.deleteComment(project.owner, project.name, commit.getId, comment.id)"><i class="yobicon-trash"></i></button> |
|
135 |
- </span> |
|
136 |
- } |
|
137 |
- </div> |
|
138 |
- |
|
139 |
- <div class="comment-body markdown-wrap markdown-before" markdown="true">@comment.contents</div> |
|
140 |
- |
|
141 |
- <div class="attachments" data-resourceType="@ResourceType.COMMIT_COMMENT" data-resourceId="@comment.id"></div> |
|
142 |
- </div> |
|
49 |
+ <ul class="nav nav-tabs" style="margin-bottom:20px;"> |
|
50 |
+ <li> |
|
51 |
+ <a href="@routes.CodeApp.codeBrowser(project.owner, project.name)">@Messages("code.files")</a> |
|
143 | 52 |
</li> |
144 |
- } |
|
53 |
+ <li class="active"> |
|
54 |
+ <a href="@routes.CodeHistoryApp.historyUntilHead(project.owner, project.name)">@Messages("code.commits")</a> |
|
55 |
+ </li> |
|
145 | 56 |
</ul> |
146 |
- } |
|
147 | 57 |
|
148 |
- @common.commentForm(project, ResourceType.COMMIT_COMMENT, routes.CodeHistoryApp.newComment(project.owner, project.name, commit.getId).toString()) |
|
58 |
+ <p class="commitInfo"> |
|
59 |
+ @(commit.getAuthor, commit.getAuthorEmail, commit.getAuthorName) match { |
|
60 |
+ case (user: User, _, _) if !user.isAnonymous => { |
|
61 |
+ <a href="@routes.UserApp.userInfo(commit.getAuthor.loginId)" class="avatar-wrap"> |
|
62 |
+ <img src="@commit.getAuthor.avatarUrl" alt="@commit.getAuthor.name" width="32" height="32"/> |
|
63 |
+ </a> |
|
64 |
+ <strong>@commit.getAuthor.name</strong> |
|
65 |
+ } |
|
66 |
+ case (_, email, name) if email != null => { |
|
67 |
+ <span class="avatar-wrap"> |
|
68 |
+ <img src="@urlToPicture(commit.getAuthorEmail, 32)" width="32" height="32"> |
|
69 |
+ </span> |
|
70 |
+ @if(name != null) { |
|
71 |
+ <strong>@name</strong> |
|
72 |
+ } |
|
73 |
+ } |
|
74 |
+ case (_, _, name) if name != null => { |
|
75 |
+ <strong>@name</strong> |
|
76 |
+ } |
|
77 |
+ case (_, _, _) => { |
|
78 |
+ <strong>@User.anonymous.name</strong> |
|
79 |
+ } |
|
80 |
+ } |
|
81 |
+ <span class="ago" title="@JodaDateUtil.getDateString(commit.getAuthorDate)"> |
|
82 |
+ @agoString(JodaDateUtil.ago(commit.getAuthorDate)) |
|
83 |
+ </span> |
|
84 |
+ <strong class="commitId pull-right">@{"@"}@commit.getId</strong> |
|
85 |
+ @if(comments.size > 0) { |
|
86 |
+ <span class="pull-right mt5 mr10"> |
|
87 |
+ <input id="toggle-comments" type="checkbox" checked="checked" class="checkbox"> |
|
88 |
+ <label for="toggle-comments" class="form-label">@Messages("code.showcomments")</label> |
|
89 |
+ </span> |
|
90 |
+ } |
|
91 |
+ </p> |
|
92 |
+ <pre class="commitMsg">@commit.getMessage</pre> |
|
93 |
+ <div class="diff-wrap"> |
|
94 |
+ <div id="commit" data-commit-origin="true" class="diff-body hide">@patch</div> |
|
95 |
+ </div> |
|
96 |
+ @** Mergely **@ |
|
97 |
+ <div id="compare" class="modal hide compare-wrap" tabindex="-1" role="dialog"> |
|
98 |
+ <h4 class="path"> |
|
99 |
+ <span></span> |
|
100 |
+ <button type="button" class="ybtn pull-right" data-dismiss="modal" style="margin-right:20px;">@Messages("button.confirm")</button> |
|
101 |
+ </h4> |
|
102 |
+ <div class="row-fluid"> |
|
103 |
+ <div class="span6 commitA"></div> |
|
104 |
+ <div class="span6 commitB"></div> |
|
105 |
+ </div> |
|
106 |
+ <div id="mergely" class="mergely-wrap"></div> |
|
107 |
+ </div> |
|
108 |
+ @** // **@ |
|
109 |
+ |
|
110 |
+ @** Comment **@ |
|
111 |
+ <div class="board-comment-wrap"> |
|
112 |
+ @if(comments.size > 0) { |
|
113 |
+ <ul class="comments"> |
|
114 |
+ @for(comment <- comments){ |
|
115 |
+ <li id="comment-@comment.id" data-path="@comment.path" data-side="@comment.side" data-line="@comment.line" class="comment"> |
|
116 |
+ <div class="comment-avatar"> |
|
117 |
+ <a href="@routes.UserApp.userInfo(comment.authorLoginId)" class="avatar-wrap" data-toggle="tooltip" data-placement="top" title="@comment.authorName"> |
|
118 |
+ <img src="@User.findByLoginId(comment.authorLoginId).avatarUrl" width="32" height="32" alt="@comment.authorLoginId"> |
|
119 |
+ </a> |
|
120 |
+ </div> |
|
121 |
+ <div class="media-body"> |
|
122 |
+ <div class="meta-info"> |
|
123 |
+ <span class="comment_author pull-left"> |
|
124 |
+ <a href="@routes.UserApp.userInfo(comment.authorLoginId)" data-toggle="tooltip" data-placement="top" title="@comment.authorName"> |
|
125 |
+ <strong>@comment.authorLoginId </strong> |
|
126 |
+ </a> |
|
127 |
+ </span> |
|
128 |
+ <span class="ago"> |
|
129 |
+ <a href="#comment-@comment.id" title="@JodaDateUtil.getDateString(commit.getAuthorDate)"> |
|
130 |
+ @agoString(JodaDateUtil.ago(comment.createdDate)) |
|
131 |
+ </a> |
|
132 |
+ </span> |
|
133 |
+ @if(isAllowed(UserApp.currentUser(), comment.asResource(), Operation.DELETE)){ |
|
134 |
+ <span class="edit pull-right"> |
|
135 |
+ <button class="btn-transparent pull-right close" data-request-method="delete" data-request-uri="@routes.CodeHistoryApp.deleteComment(project.owner, project.name, commit.getId, comment.id)"><i class="yobicon-trash"></i></button> |
|
136 |
+ </span> |
|
137 |
+ } |
|
138 |
+ </div> |
|
139 |
+ |
|
140 |
+ <div class="comment-body markdown-wrap markdown-before" markdown="true">@comment.contents</div> |
|
141 |
+ |
|
142 |
+ <div class="attachments" data-resourceType="@ResourceType.COMMIT_COMMENT" data-resourceId="@comment.id"></div> |
|
143 |
+ </div> |
|
144 |
+ </li> |
|
145 |
+ } |
|
146 |
+ </ul> |
|
147 |
+ } |
|
148 |
+ |
|
149 |
+ @common.commentForm(project, ResourceType.COMMIT_COMMENT, routes.CodeHistoryApp.newComment(project.owner, project.name, commit.getId).toString()) |
|
150 |
+ </div> |
|
151 |
+ @** // Comment **@ |
|
149 | 152 |
</div> |
150 |
- @** // Comment **@ |
|
151 |
- </div> |
|
152 | 153 |
|
153 |
- <button id="watch-button" type="button" class="ybtn @if(commit.getWatchers(project).contains(UserApp.currentUser())) { active }" data-toggle="button">@Messages("notification.watch")</button> |
|
154 |
+ <button id="watch-button" type="button" class="ybtn @if(commit.getWatchers(project).contains(UserApp.currentUser())) { active }" data-toggle="button">@Messages("notification.watch")</button> |
|
154 | 155 |
|
155 |
- <a href="@routes.CodeHistoryApp.history(project.owner, project.name, selectedBranch, path)" class="ybtn pull-right">@Messages("button.list")</a> |
|
156 |
+ <a href="@routes.CodeHistoryApp.history(project.owner, project.name, selectedBranch, path)" class="ybtn pull-right">@Messages("button.list")</a> |
|
156 | 157 |
|
157 |
- <div id="minimap" class="minimap-outer"> |
|
158 |
- <div class="minimap-wrap"> |
|
159 |
- <div class="minimap-curr"></div> |
|
160 |
- <div class="minimap-links"></div> |
|
158 |
+ <div id="minimap" class="minimap-outer"> |
|
159 |
+ <div class="minimap-wrap"> |
|
160 |
+ <div class="minimap-curr"></div> |
|
161 |
+ <div class="minimap-links"></div> |
|
162 |
+ </div> |
|
161 | 163 |
</div> |
162 | 164 |
</div> |
163 | 165 |
</div> |
164 |
- |
|
165 | 166 |
@common.markdown(project) |
166 | 167 |
|
167 | 168 |
<script type="text/x-jquery-tmpl" id="comment-icon-template"> |
--- app/views/code/view.scala.html
+++ app/views/code/view.scala.html
... | ... | @@ -31,54 +31,55 @@ |
31 | 31 |
|
32 | 32 |
@projectLayout(Messages("menu.code"), project, utils.MenuType.CODE){ |
33 | 33 |
@projectMenu(project, utils.MenuType.CODE, "main-menu-only") |
34 |
-<div class="project-page-wrap"> |
|
35 |
- <div class="code-browse-wrap"> |
|
36 |
- @if(fieldText(recursiveData{0}, "type").eq("folder")){ |
|
37 |
- <ul class="nav nav-tabs"> |
|
38 |
- @if(path.lastIndexOf("/") > 0){ |
|
39 |
- <li class="active"><a href="@routes.CodeApp.codeBrowserWithBranch(project.owner, project.name, URLEncoder.encode(branch, "UTF-8"), path.substring(0, path.lastIndexOf("/")))">@Messages("code.files")</a></li> |
|
40 |
- } else { |
|
41 |
- <li class="active"><a href="@routes.CodeApp.codeBrowserWithBranch(project.owner, project.name, URLEncoder.encode(branch, "UTF-8"), path)">@Messages("code.files")</a></li> |
|
42 |
- } |
|
43 |
- @if(branch.eq("HEAD")){ |
|
44 |
- <li><a href="@routes.CodeHistoryApp.historyUntilHead(project.owner, project.name)">@Messages("code.commits")</a></li> |
|
45 |
- } else { |
|
46 |
- <li><a href="@routes.CodeHistoryApp.history(project.owner, project.name, URLEncoder.encode(branch, "UTF-8"), null)">@Messages("code.commits")</a></li> |
|
47 |
- } |
|
48 |
- @if(project.isGit()) { |
|
49 |
- <li> |
|
50 |
- <a href="@routes.BranchApp.branches(project.owner, project.name)">@Messages("title.branches")</a> |
|
51 |
- </li> |
|
52 |
- } |
|
53 |
- </ul> |
|
54 |
- } |
|
55 |
- |
|
56 |
- <div class="code-browse-header"> |
|
57 |
- <div id="branches" class="btn-group branches pull-left @if(fieldText(recursiveData{0}, "type").eq("file")){mb10}" data-name="branch" data-activate="manual"> |
|
58 |
- <button class="btn dropdown-toggle large" data-toggle="dropdown"> |
|
59 |
- <span class="d-label">@branch</span> |
|
60 |
- <span class="d-caret"><span class="caret"></span></span> |
|
61 |
- </button> |
|
62 |
- <ul class="dropdown-menu"> |
|
63 |
- @for(branch <- branches){ |
|
64 |
- @partial_branchitem(project, branch, "code", path) |
|
34 |
+<div class="page-wrap-outer"> |
|
35 |
+ <div class="project-page-wrap"> |
|
36 |
+ <div class="code-browse-wrap"> |
|
37 |
+ @if(fieldText(recursiveData{0}, "type").eq("folder")){ |
|
38 |
+ <ul class="nav nav-tabs"> |
|
39 |
+ @if(path.lastIndexOf("/") > 0){ |
|
40 |
+ <li class="active"><a href="@routes.CodeApp.codeBrowserWithBranch(project.owner, project.name, URLEncoder.encode(branch, "UTF-8"), path.substring(0, path.lastIndexOf("/")))">@Messages("code.files")</a></li> |
|
41 |
+ } else { |
|
42 |
+ <li class="active"><a href="@routes.CodeApp.codeBrowserWithBranch(project.owner, project.name, URLEncoder.encode(branch, "UTF-8"), path)">@Messages("code.files")</a></li> |
|
65 | 43 |
} |
66 |
- </ul> |
|
67 |
- </div> |
|
68 |
- <div id="breadcrumbs" class="code-breadcrumb-wrap ml10 pull-left"> |
|
69 |
- <a href="@routes.CodeApp.codeBrowserWithBranch(project.owner, project.name, URLEncoder.encode(branch, "UTF-8"), "")">@project.name</a> |
|
70 |
- @makeBreadCrumbs(path) |
|
71 |
- </div> |
|
72 |
- </div> |
|
73 |
- |
|
74 |
- <div class="code-viewer-wrap"> |
|
75 |
- <div id="spin" style="position:fixed; top:50%; left:50%"></div> |
|
76 |
- @for(fileInfo <- recursiveData){ |
|
77 |
- @parseFileInfo(fileInfo) |
|
44 |
+ @if(branch.eq("HEAD")){ |
|
45 |
+ <li><a href="@routes.CodeHistoryApp.historyUntilHead(project.owner, project.name)">@Messages("code.commits")</a></li> |
|
46 |
+ } else { |
|
47 |
+ <li><a href="@routes.CodeHistoryApp.history(project.owner, project.name, URLEncoder.encode(branch, "UTF-8"), null)">@Messages("code.commits")</a></li> |
|
48 |
+ } |
|
49 |
+ @if(project.isGit()) { |
|
50 |
+ <li> |
|
51 |
+ <a href="@routes.BranchApp.branches(project.owner, project.name)">@Messages("title.branches")</a> |
|
52 |
+ </li> |
|
53 |
+ } |
|
54 |
+ </ul> |
|
78 | 55 |
} |
79 |
- </div> |
|
80 |
- </div> |
|
81 | 56 |
|
57 |
+ <div class="code-browse-header"> |
|
58 |
+ <div id="branches" class="btn-group branches pull-left @if(fieldText(recursiveData{0}, "type").eq("file")){mb10}" data-name="branch" data-activate="manual"> |
|
59 |
+ <button class="btn dropdown-toggle large" data-toggle="dropdown"> |
|
60 |
+ <span class="d-label">@branch</span> |
|
61 |
+ <span class="d-caret"><span class="caret"></span></span> |
|
62 |
+ </button> |
|
63 |
+ <ul class="dropdown-menu"> |
|
64 |
+ @for(branch <- branches){ |
|
65 |
+ @partial_branchitem(project, branch, "code", path) |
|
66 |
+ } |
|
67 |
+ </ul> |
|
68 |
+ </div> |
|
69 |
+ <div id="breadcrumbs" class="code-breadcrumb-wrap ml10 pull-left"> |
|
70 |
+ <a href="@routes.CodeApp.codeBrowserWithBranch(project.owner, project.name, URLEncoder.encode(branch, "UTF-8"), "")">@project.name</a> |
|
71 |
+ @makeBreadCrumbs(path) |
|
72 |
+ </div> |
|
73 |
+ </div> |
|
74 |
+ |
|
75 |
+ <div class="code-viewer-wrap"> |
|
76 |
+ <div id="spin" style="position:fixed; top:50%; left:50%"></div> |
|
77 |
+ @for(fileInfo <- recursiveData){ |
|
78 |
+ @parseFileInfo(fileInfo) |
|
79 |
+ } |
|
80 |
+ </div> |
|
81 |
+ </div> |
|
82 |
+ </div> |
|
82 | 83 |
</div> |
83 | 84 |
|
84 | 85 |
<link rel="stylesheet" type="text/css" href="@routes.Assets.at("stylesheets/dynatree/skin/ui.dynatree.css")" /> |
--- app/views/error/badrequest.scala.html
+++ app/views/error/badrequest.scala.html
... | ... | @@ -2,10 +2,12 @@ |
2 | 2 |
|
3 | 3 |
@projectLayout(Messages(messageKey), project, utils.MenuType.NONE) { |
4 | 4 |
@projectMenu(project, utils.MenuType.PROJECT_HOME, "") |
5 |
-<div class="project-page-wrap"> |
|
6 |
- <div class="error-wrap"> |
|
7 |
- <i class="ico ico-err2"></i> |
|
8 |
- <p>@Messages(messageKey)</p> |
|
9 |
- </div> |
|
5 |
+<div class="page-wrap-outer"> |
|
6 |
+ <div class="project-page-wrap"> |
|
7 |
+ <div class="error-wrap"> |
|
8 |
+ <i class="ico ico-err2"></i> |
|
9 |
+ <p>@Messages(messageKey)</p> |
|
10 |
+ </div> |
|
11 |
+ </div> |
|
10 | 12 |
</div> |
11 | 13 |
} |
--- app/views/error/badrequest_default.scala.html
+++ app/views/error/badrequest_default.scala.html
... | ... | @@ -1,11 +1,13 @@ |
1 | 1 |
@(messageKey:String = "error.badrequest") |
2 | 2 |
|
3 | 3 |
@siteLayout(Messages(messageKey), utils.MenuType.SITE_HOME) { |
4 |
-<div class="project-page-wrap"> |
|
5 |
- <div class="error-wrap"> |
|
6 |
- <i class="ico-404"></i> |
|
7 |
- <p>@Messages(messageKey)</p> |
|
8 |
- <a href="@routes.Application.index()" class="ybtn ybtn-info">@Messages("menu.home")</a> |
|
4 |
+<div class="page-wrap-outer"> |
|
5 |
+ <div class="project-page-wrap"> |
|
6 |
+ <div class="error-wrap"> |
|
7 |
+ <i class="ico-404"></i> |
|
8 |
+ <p>@Messages(messageKey)</p> |
|
9 |
+ <a href="@routes.Application.index()" class="ybtn ybtn-info">@Messages("menu.home")</a> |
|
10 |
+ </div> |
|
9 | 11 |
</div> |
10 | 12 |
</div> |
11 | 13 |
} |
--- app/views/error/forbidden.scala.html
+++ app/views/error/forbidden.scala.html
... | ... | @@ -2,10 +2,12 @@ |
2 | 2 |
|
3 | 3 |
@projectLayout(Messages(messageKey), project, utils.MenuType.NONE) { |
4 | 4 |
@projectMenu(project, utils.MenuType.PROJECT_HOME, "") |
5 |
-<div class="project-page-wrap"> |
|
6 |
- <div class="error-wrap"> |
|
7 |
- <i class="ico ico-err2"></i> |
|
8 |
- <p>@Messages(messageKey)</p> |
|
5 |
+<div class="page-wrap-outer"> |
|
6 |
+ <div class="project-page-wrap"> |
|
7 |
+ <div class="error-wrap"> |
|
8 |
+ <i class="ico ico-err2"></i> |
|
9 |
+ <p>@Messages(messageKey)</p> |
|
10 |
+ </div> |
|
9 | 11 |
</div> |
10 | 12 |
</div> |
11 | 13 |
} |
--- app/views/error/forbidden_default.scala.html
+++ app/views/error/forbidden_default.scala.html
... | ... | @@ -1,11 +1,13 @@ |
1 | 1 |
@(messageKey:String = "error.forbidden") |
2 | 2 |
|
3 | 3 |
@siteLayout(Messages(messageKey), utils.MenuType.SITE_HOME) { |
4 |
-<div class="project-page-wrap"> |
|
5 |
- <div class="error-wrap"> |
|
6 |
- <i class="ico ico-err2"></i> |
|
7 |
- <p>@Messages(messageKey)</p> |
|
8 |
- <a href="@routes.Application.index()" class="ybtn ybtn-primary">@Messages("menu.home")</a> |
|
4 |
+<div class="page-wrap-outer"> |
|
5 |
+ <div class="project-page-wrap"> |
|
6 |
+ <div class="error-wrap"> |
|
7 |
+ <i class="ico ico-err2"></i> |
|
8 |
+ <p>@Messages(messageKey)</p> |
|
9 |
+ <a href="@routes.Application.index()" class="ybtn ybtn-primary">@Messages("menu.home")</a> |
|
10 |
+ </div> |
|
9 | 11 |
</div> |
10 | 12 |
</div> |
11 | 13 |
} |
--- app/views/error/internalServerError_default.scala.html
+++ app/views/error/internalServerError_default.scala.html
... | ... | @@ -1,11 +1,13 @@ |
1 | 1 |
@(messageKey:String = "error.internalServerError") |
2 | 2 |
|
3 | 3 |
@siteLayout(Messages(messageKey), utils.MenuType.SITE_HOME) { |
4 |
-<div class="project-page-wrap"> |
|
5 |
- <div class="error-wrap"> |
|
6 |
- <i class="ico-404"></i> |
|
7 |
- <p>@Messages(messageKey)</p> |
|
8 |
- <a href="@routes.Application.index()" class="ybtn ybtn-primary">@Messages("menu.home")</a> |
|
4 |
+<div class="page-wrap-outer"> |
|
5 |
+ <div class="project-page-wrap"> |
|
6 |
+ <div class="error-wrap"> |
|
7 |
+ <i class="ico-404"></i> |
|
8 |
+ <p>@Messages(messageKey)</p> |
|
9 |
+ <a href="@routes.Application.index()" class="ybtn ybtn-primary">@Messages("menu.home")</a> |
|
10 |
+ </div> |
|
9 | 11 |
</div> |
10 | 12 |
</div> |
11 | 13 |
} |
--- app/views/error/notfound.scala.html
+++ app/views/error/notfound.scala.html
... | ... | @@ -28,11 +28,13 @@ |
28 | 28 |
|
29 | 29 |
@projectLayout(title, project, utils.MenuType.NONE) { |
30 | 30 |
@projectMenu(project, getMenuType(targetType), "") |
31 |
-<div class="project-page-wrap"> |
|
32 |
- <div class="error-wrap"> |
|
33 |
- <i class="ico ico-err2"></i> |
|
34 |
- <p>@getMessage(targetType)</p> |
|
35 |
- <a href="@getReturnURL(targetType)" class="ybtn ybtn-primary">@Messages("button.list")</a> |
|
31 |
+<div class="page-wrap-outer"> |
|
32 |
+ <div class="project-page-wrap"> |
|
33 |
+ <div class="error-wrap"> |
|
34 |
+ <i class="ico ico-err2"></i> |
|
35 |
+ <p>@getMessage(targetType)</p> |
|
36 |
+ <a href="@getReturnURL(targetType)" class="ybtn ybtn-primary">@Messages("button.list")</a> |
|
37 |
+ </div> |
|
36 | 38 |
</div> |
37 | 39 |
</div> |
38 | 40 |
} |
--- app/views/error/notfound_default.scala.html
+++ app/views/error/notfound_default.scala.html
... | ... | @@ -18,15 +18,15 @@ |
18 | 18 |
@common.usermenu(null) |
19 | 19 |
</div> |
20 | 20 |
</header> |
21 |
- |
|
22 |
- <div class="project-page-wrap"> |
|
23 |
- <div class="error-wrap"> |
|
24 |
- <i class="ico-404"></i> |
|
25 |
- <p>@Messages(messageKey)</p> |
|
26 |
- <a href="@routes.Application.index()" class="ybtn ybtn-info">@Messages("menu.home")</a> |
|
21 |
+ <div class="page-wrap-outer"> |
|
22 |
+ <div class="project-page-wrap"> |
|
23 |
+ <div class="error-wrap"> |
|
24 |
+ <i class="ico-404"></i> |
|
25 |
+ <p>@Messages(messageKey)</p> |
|
26 |
+ <a href="@routes.Application.index()" class="ybtn ybtn-info">@Messages("menu.home")</a> |
|
27 |
+ </div> |
|
27 | 28 |
</div> |
28 | 29 |
</div> |
29 |
- |
|
30 | 30 |
<footer class="page-footer-outer"> |
31 | 31 |
<div class="page-footer"> |
32 | 32 |
<span class="provider">Copyright © <a href="http://navercorp.com/" target="_blank">NAVER Corp.</a> Supported by <a href="http://developer.naver.com/wiki/pages/techSupport" target="_blank" class="d2-program"><span class="d2">D2</span><span class="program"> Program</span></a></span> |
--- app/views/error/requestTextEntityTooLarge.scala.html
+++ app/views/error/requestTextEntityTooLarge.scala.html
... | ... | @@ -1,12 +1,14 @@ |
1 | 1 |
@siteLayout(Messages("error.tooLargeText.title"), utils.MenuType.SITE_HOME) { |
2 |
-<div class="project-page-wrap"> |
|
3 |
- <div class="error-wrap"> |
|
4 |
- <i class="ico ico-err2"></i> |
|
5 |
- <p>@Messages("error.tooLargeText.title")</p> |
|
6 |
- <p>@Messages("error.tooLargeText.limit", play.api.mvc.BodyParsers.parse.DEFAULT_MAX_TEXT_LENGTH)</p> |
|
7 |
- @if(UserApp.currentUser.isSiteManager) { |
|
8 |
- <p>@Messages("error.tooLargeText.admin")</p> |
|
9 |
- } |
|
10 |
- </div> |
|
2 |
+<div class="page-wrap-outer"> |
|
3 |
+ <div class="project-page-wrap"> |
|
4 |
+ <div class="error-wrap"> |
|
5 |
+ <i class="ico ico-err2"></i> |
|
6 |
+ <p>@Messages("error.tooLargeText.title")</p> |
|
7 |
+ <p>@Messages("error.tooLargeText.limit", play.api.mvc.BodyParsers.parse.DEFAULT_MAX_TEXT_LENGTH)</p> |
|
8 |
+ @if(UserApp.currentUser.isSiteManager) { |
|
9 |
+ <p>@Messages("error.tooLargeText.admin")</p> |
|
10 |
+ } |
|
11 |
+ </div> |
|
12 |
+ </div> |
|
11 | 13 |
</div> |
12 | 14 |
} |
--- app/views/git/clone.scala.html
+++ app/views/git/clone.scala.html
... | ... | @@ -5,18 +5,20 @@ |
5 | 5 |
|
6 | 6 |
@projectLayout(title, project.originalProject, utils.MenuType.PULL_REQUEST) { |
7 | 7 |
@projectMenu(project.originalProject, utils.MenuType.PULL_REQUEST, "main-menu-only") |
8 |
-<div class="project-page-wrap"> |
|
9 |
- <div class="content-wrap frm-wrap"> |
|
10 |
- <legend> |
|
11 |
- @Messages("fork.forking", project.originalProject.owner, project.originalProject.name, project.owner, project.name) |
|
12 |
- </legend> |
|
13 |
- <p> |
|
14 |
- @Messages("fork.forking.message.1") |
|
15 |
- </p> |
|
16 |
- <p> |
|
17 |
- @Messages("fork.forking.message.2") |
|
18 |
- </p> |
|
19 |
- <div id="spin"></div> |
|
8 |
+<div class="page-wrap-outer"> |
|
9 |
+ <div class="project-page-wrap"> |
|
10 |
+ <div class="content-wrap frm-wrap"> |
|
11 |
+ <legend> |
|
12 |
+ @Messages("fork.forking", project.originalProject.owner, project.originalProject.name, project.owner, project.name) |
|
13 |
+ </legend> |
|
14 |
+ <p> |
|
15 |
+ @Messages("fork.forking.message.1") |
|
16 |
+ </p> |
|
17 |
+ <p> |
|
18 |
+ @Messages("fork.forking.message.2") |
|
19 |
+ </p> |
|
20 |
+ <div id="spin"></div> |
|
21 |
+ </div> |
|
20 | 22 |
</div> |
21 | 23 |
</div> |
22 | 24 |
<script type="text/javascript"> |