THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

test
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

101 lines
4.6 KiB

@**
* Yobi, Project Hosting SW
*
* Copyright 2012 NAVER Corp.
* http://yobi.io
*
* @Author Yoon
*
* 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[Milestone], milestoneId: Long, project: Project)
@import utils.TemplateHelper._
@import models.enumeration._
@import scala.collection.Map
@implicitField = @{ helper.FieldConstructor(simpleForm) }
@projectLayout(title, project, utils.MenuType.MILESTONE) {
@projectMenu(project, utils.MenuType.MILESTONE, "")
<div class="page-wrap-outer">
<div class="project-page-wrap">
<div class="form-wrap milestone frm-wrap">
<form class="nm" action="@routes.MilestoneApp.editMilestone(project.owner, project.name, milestoneId)" method="post">
<div class="inner left">
<div class="title-wrap">
<label for="title">@Messages("milestone.form.title")</label>
@helper.input(form("title")){(id, name, value, args) =>
<input type="text" name="@name" id="@id" placeholder="" value="@value">
}
</div>
<div class="content-wrap">
<label for="contents">@Messages("milestone.form.content")</label>
@helper.input(form("contents")){(id, name, value, args) =>
<div style="position: relative;">
@common.editor("contents", value.getOrElse(""))
</div>
}
</div>
@common.fileUploader(ResourceType.MILESTONE, milestoneId)
<div class="actions mt20">
<button type="submit" class="ybtn ybtn-info">@Messages("button.save")</button>
<a href="@routes.MilestoneApp.milestones(project.owner, project.name)" class="ybtn">@Messages("button.cancel")</a>
</div>
</div>
<div class="inner right bubble-wrap gray">
<p>@Messages("milestone.form.state")</p>
<div>
<input type="radio" name="state" value="@State.OPEN" id="milestone-open" class="radio-btn" @if(form("state").value.equals(State.OPEN.name)) { checked="checked" }><label for="milestone-open" class="bold">@Messages("milestone.state.open")</label>&nbsp;
<input type="radio" name="state" value="@State.CLOSED" id="milestone-close" class="radio-btn" @if(form("state").value.equals(State.CLOSED.name)) { checked="checked" }><label for="milestone-close" class="bold">@Messages("milestone.state.closed")</label>
</div>
<hr/>
<p>@Messages("milestone.form.dueDate")</p>
<label for="dueDate">
@helper.input(form("dueDate")){(id, name, value, args) =>
<input type="text" name="@name" id="@id" class="validate due-date" value="@value">
}
</label>
<div id="datepicker" class="date-picker"></div>
</div>
</form>
</div>
</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>
<link rel="stylesheet" type="text/css" href="@routes.Assets.at("javascripts/lib/pikaday/pikaday.css")" />
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/moment-with-langs.min.js")"></script>
<script type="text/javascript" src="@routes.Assets.at("javascripts/lib/pikaday/pikaday.js")"></script>
<script type="text/javascript">
$(document).ready(function(){
// yobi.milestone.Write
$yobi.loadModule("milestone.Write", {
"elDueDate" : $("#dueDate"),
"elDatePicker": $("#datepicker")
});
// yobi.Mention
yobi.Mention({
"target": "textarea[id^=editor-]",
"url" : "@routes.ProjectApp.mentionList(project.owner, project.name)"
});
});
</script>
}