[Notice] Announcing the End of Demo Server [Read me]
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
@**
* Yobi, Project Hosting SW
*
* Copyright 2012 NAVER Corp.
* http://yobi.io
*
* @author Ahn Hyeok Jun
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**@
@(title:String, form: play.data.Form[Posting], posting:Posting, number:Long, project:Project, isAllowedToNotice:Boolean)
@import utils.AccessControl._
@import utils.TemplateHelper._
@import utils.HtmlUtil._
@import models.enumeration.ResourceType
@implicitField = @{ helper.FieldConstructor(simpleForm) }
@projectLayout(title, project, utils.MenuType.BOARD) {
@projectMenu(project, utils.MenuType.BOARD, "main-menu-only")
<div class="page-wrap-outer">
<div class="project-page-wrap">
<form action="@routes.BoardApp.editPost(project.owner, project.name, number)" method="post" enctype="multipart/form-data" class="nm">
<div class="content-wrap frm-wrap">
<dl>
<dt>
<label for="title">@Messages("title")</label>
</dt>
<dd>
@defining(form.errors().get("title")) { errors =>
<input type="text" id="title" name="title" value="@posting.title" class="zen-mode text title @if(errors != null) {error}" maxlength="250" tabindex="1" />
@if(errors != null) {
<div class="message">
@for(error <- errors) {
<div>@Messages(error.message)</div>
}
</div>
}
}
</dd>
<dd style="position: relative;">
@common.editor("body", posting.body, "tabindex=2", "content-body")
</dd>
</dl>
@** fileUploader **@
@if(!UserApp.currentUser.isAnonymous) {
@common.fileUploader(ResourceType.BOARD_POST, posting.id)
}
@** end of fileUploader **@
<div class="right-txt mt10 mb10">
@if(isAllowedToNotice){
@helper.input(form("notice")){(id, name, value, args) =>
<label class="checkbox">
<input type="checkbox" id="notice" name="notice" @toHtmlArgs(args) @(if(value.equals(Some("true"))) "checked" else "")/>
@Messages("post.notice.label")
</label>
}
}
@if(project.isGit && isProjectResourceCreatable(UserApp.currentUser(), project, ResourceType.COMMIT)){
<label class="checkbox">
<input type="checkbox" id="readme" name="readme" @boolToCheckedString(posting.readme)/>
@Messages("post.readmefy")
</label>
}
</div>
<div class="actions">
@if(posting.getAuthor.equals(UserApp.currentUser()) && !posting.readme){
<span class="send-notification-check">
<label class="checkbox inline">
<input type="checkbox" name="notificationMail" id="notificationMail" value="yes" checked>
<strong>@Messages("notification.send.mail")</strong>
</label>
</span>
}
@if(isAllowed(UserApp.currentUser(), posting.asResource(), Operation.UPDATE)) {
<button class="ybtn ybtn-info" tabindex="3">@Messages("button.save")</button>}<!--
--><a href="javascript:history.back();" class="ybtn" tabindex="4">@Messages("button.cancel")</a>
</div>
</div>
</form>
</div>
</div>
@common.markdown(project)
<link rel="stylesheet" type="text/css" media="screen" href="@routes.Assets.at("javascripts/lib/atjs/jquery.atwho.css")">
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/atjs/jquery.caret.min.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/atjs/jquery.atwho.js")"></script>
<script type="text/javascript">
$(function(){
$yobi.loadModule("board.Write", {
"sMode" : "edit",
"elTextarea": 'textarea[data-editor-mode="content-body"]'
});
yobi.Mention({
"target": 'textarea[id^=editor-]',
"url" : "@Html(routes.ProjectApp.mentionList(project.owner, project.name, posting.getNumber, posting.asResource().getType().resource()).toString())"
});
});
</script>
}