@** * Yobi, Project Hosting SW * * Copyright 2012 NAVER Corp. * http://yobi.io * * @author park3251 * * 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, issueForm: play.data.Form[Issue], issue:Issue, project:Project) @import helper._ @import scala.collection.mutable.Map @import models.enumeration.ResourceType @import models.enumeration.Operation @import models.enumeration._ @import utils.AccessControl._ @import utils.TemplateHelper._ @projectLayout(Messages(title), project, utils.MenuType.ISSUE) { @projectMenu(project, utils.MenuType.ISSUE, "main-menu-only")
@form(action = routes.IssueApp.editIssue(project.owner, project.name, issue.getNumber), 'id -> "issue-form", 'enctype -> "multipart/form-data") {
@defining(issueForm.errors().get("title")) { errors => @if(errors != null) {
@for(error <- errors) {
@Messages(error.message)
}
} }
@common.editor("body", issue.body, "tabindex=2", "content-body")
@** fileUploader **@ @if(!UserApp.currentUser.isAnonymous) { @common.fileUploader(ResourceType.ISSUE_POST, issue.id) } @** end of fileUploader **@
@Messages("button.cancel")
@if(isAllowed(UserApp.currentUser(), issue.stateAsResource(), Operation.UPDATE)){
@Messages("issue.state")
} @if(isAllowed(UserApp.currentUser(), issue.assigneeAsResource(), Operation.UPDATE)){
@Messages("issue.assignee")
@partial_assignee(project, issue)
} @if(project.menuSetting.milestone && isAllowed(UserApp.currentUser(), issue.milestoneAsResource(), Operation.UPDATE)){
@Messages("milestone")
@defining(issue.milestone != null) { hasMilestone => @if(Milestone.findByProjectId(project.id).isEmpty()) { @Messages("milestone.menu.new") } else { } }
}
@Messages("issue.dueDate")
@partial_select_label(IssueLabel.findByProject(project), issue.getLabelIds, "issue-option", "data-close-on-select=false")
} @** end of form **@
@common.markdown(project) @common.select2() @common.calendar() }