diff --git a/app/views/board/create.scala.html b/app/views/board/create.scala.html index a378a6114..d64c93a08 100644 --- a/app/views/board/create.scala.html +++ b/app/views/board/create.scala.html @@ -20,71 +20,76 @@ **@ @(title:String, form:Form[Posting], project:Project, isAllowedToNotice:Boolean, preparedPostBody:String = "") +@import utils.AccessControl._ @import utils.TemplateHelper._ @import utils.HtmlUtil._ @import models.enumeration._ @implicitField = @{ helper.FieldConstructor(simpleForm) } @readmeUpdateMessage = @{ - if( request().getQueryString("readme") != null ) { - "Update README.md" - } + if( request().getQueryString("readme") != null ) { + "Update README.md" + } } @projectLayout(title, project, utils.MenuType.BOARD) { @projectMenu(project, utils.MenuType.BOARD, "main-menu-only")
-
-
-
-
-
- -
-
- @defining(form.errors().get("title")) { errors => - - @if(errors != null) { -
- @for(error <- errors) { -
@Messages(error.message)
- } -
- } - } -
+
+ +
+
+
+ +
+
+ @defining(form.errors().get("title")) { errors => + + @if(errors != null) { +
+ @for(error <- errors) { +
@Messages(error.message)
+ } +
+ } + } +
+
+ @common.editor("body", preparedPostBody, "tabindex=2") +
+
-
- @common.editor("body", preparedPostBody, "tabindex=2") -
+ @** fileUploader **@ + @if(!UserApp.currentUser.isAnonymous) { + @common.fileUploader(ResourceType.BOARD_POST, null) + } + @** end of fileUploader **@ - @if(isAllowedToNotice){ -
- - @if(project.isGit && request().getQueryString("readme") != null ) { - - } -
- } -
+
+ @if(isAllowedToNotice && !stringToBoolean(request().getQueryString("readme"))){ + + } - @** fileUploader **@ - @if(!UserApp.currentUser.isAnonymous) { - @common.fileUploader(ResourceType.BOARD_POST, null) + @if(isProjectResourceCreatable(UserApp.currentUser(), project, ResourceType.COMMIT)){ + @if(project.isGit && stringToBoolean(request().getQueryString("readme"))){ + } - @** end of fileUploader **@ - -
- @Messages("button.cancel") -
+ } +
-
-
-
+
+ @Messages("button.cancel") +
+
+ + @common.markdown(project) @@ -93,16 +98,15 @@ diff --git a/app/views/board/edit.scala.html b/app/views/board/edit.scala.html index 61f069179..059d203b6 100644 --- a/app/views/board/edit.scala.html +++ b/app/views/board/edit.scala.html @@ -20,84 +20,87 @@ **@ @(title:String, form:Form[Posting], posting:Posting, number:Long, project:Project, isAllowedToNotice:Boolean) -@import scala.collection.Map +@import utils.AccessControl._ @import utils.TemplateHelper._ +@import utils.HtmlUtil._ @import models.enumeration.ResourceType @implicitField = @{ helper.FieldConstructor(simpleForm) } -@import utils.HtmlUtil._ @projectLayout(title, project, utils.MenuType.BOARD) { @projectMenu(project, utils.MenuType.BOARD, "main-menu-only")
-
-
-
-
-
- -
-
- @defining(form.errors().get("title")) { errors => - - @if(errors != null) { -
- @for(error <- errors) { -
@Messages(error.message)
- } -
- } - } -
- -
- @common.editor("body", posting.body, "tabindex=2", "content-body") -
- - @if(isAllowedToNotice){ - @helper.input(form("notice")){(id, name, value, args) => -
- - @if(project.isGit){ - - +
+ +
+
+
+ +
+
+ @defining(form.errors().get("title")) { errors => + + @if(errors != null) { +
+ @for(error <- errors) { +
@Messages(error.message)
} -
- } - } -
+
+ } + } +
+
+ @common.editor("body", posting.body, "tabindex=2", "content-body") +
+
+ + @** fileUploader **@ + @if(!UserApp.currentUser.isAnonymous) { + @common.fileUploader(ResourceType.BOARD_POST, posting.id) + } + @** end of fileUploader **@ - @** fileUploader **@ - @if(!UserApp.currentUser.isAnonymous) { - @common.fileUploader(ResourceType.BOARD_POST, posting.id) +
+ @if(isAllowedToNotice && !stringToBoolean(request().getQueryString("readme"))){ + @helper.input(form("notice")){(id, name, value, args) => + } - @** end of fileUploader **@ + } -
- @Messages("button.cancel") -
+ @if(project.isGit && isProjectResourceCreatable(UserApp.currentUser(), project, ResourceType.COMMIT)){ + + } +
-
-
-
+
+ @Messages("button.cancel") +
+
+ + + @common.markdown(project) diff --git a/app/views/project/partial_readme.scala.html b/app/views/project/partial_readme.scala.html index b3a54211e..63f8c1957 100644 --- a/app/views/project/partial_readme.scala.html +++ b/app/views/project/partial_readme.scala.html @@ -24,25 +24,28 @@
@if(project.readme == null){ -

- @if(project.vcs.equals("GIT")) { - @Messages("project.readme")

- @if(isProjectResourceCreatable(UserApp.currentUser(), project, ResourceType.COMMIT)) { - @Messages("project.readme.create") - } - } else { - @Messages("project.svn.readme") - } -

+

+ @if(project.isGit){ + @Messages("project.readme") +

+ @if(isProjectResourceCreatable(UserApp.currentUser(), project, ResourceType.COMMIT)){ + @Messages("project.readme.create") + } + } else { + @Messages("project.svn.readme") + } +

} else { -
-
@project.getReadmeFileName - @if(isProjectResourceCreatable(UserApp.currentUser(), project, ResourceType.COMMIT)) { - edit - } -
-
@project.readme
-
+
+
+ + @project.getReadmeFileName + @if(project.isGit && isProjectResourceCreatable(UserApp.currentUser(), project, ResourceType.COMMIT)){ + @Messages("button.edit") + } +
+
@project.readme
+
} @common.markdown(project)
diff --git a/conf/messages.ko b/conf/messages.ko index c218813dc..196cca614 100644 --- a/conf/messages.ko +++ b/conf/messages.ko @@ -446,7 +446,7 @@ post.popup.fileAttach.contents = 첨부할 파일을 선택해주세요. post.popup.fileAttach.hasMissing = 첨부되지 못한 파일이 {0}개 있습니다. post.popup.fileAttach.hasMissing.description = 업로드 후 {1}분이 지나도록 글 작성을 완료하지 않은 경우 이 문제가 발생할 수 있습니다. 파일을 다시 첨부해 주세요. post.popup.fileAttach.title = 첨부파일 선택 -post.readmefy= 프로젝트 README 파일로 만듭니다 +post.readmefy= 이 글을 프로젝트 README 파일로 만듭니다 post.unwatch.start = 이제 이 글에 관한 알림을 받지 않습니다 post.update.error = 입력값 오류 post.watch.start = 이제 이 글에 관한 알림을 받습니다 diff --git a/public/javascripts/service/yobi.board.Write.js b/public/javascripts/service/yobi.board.Write.js index 9448c08d2..a9201badf 100644 --- a/public/javascripts/service/yobi.board.Write.js +++ b/public/javascripts/service/yobi.board.Write.js @@ -43,7 +43,6 @@ */ function _initVar(htOptions){ htVar.sMode = htOptions.sMode || "new"; - htVar.sUploaderAction = htOptions.sUploaderAction; htVar.sTplFileItem = htOptions.sTplFileItem || (htElement.welTplFileItem ? htElement.welTplFileItem.text() : ""); }