@** * Yona, 21st Century Project Hosting SW * * Copyright Yona & Yobi Authors & NAVER Corp. * https://yona.io **@ @import play.data.Form @import org.apache.commons.lang3.StringUtils @(title:String, issueForm: 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._ @parentIssueId = @{ if(issue.parent != null) { issue.parent.id } else { null } } @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 =>
@Messages("issue.option")
@if(errors != null) {
@for(error <- errors) {
@Messages(error.message)
}
} @partial_select_subtask(project, parentIssueId, issue.id) }
@common.editor("body", issue.body, "tabindex=2", "content-body")
@** fileUploader **@ @if(!UserApp.currentUser.isAnonymous) { @common.fileUploader(ResourceType.ISSUE_POST, issue.id) } @** end of fileUploader **@
@if(issue.isAuthoredBy(UserApp.currentUser())){ } @if(isAllowed(UserApp.currentUser(), issue.asResource(), Operation.UPDATE)) { }@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", project)
} @** end of form **@
@common.markdown(project) @common.select2() @common.calendar() }