@(issue: model.Issue, comments: List[model.IssueComment], issueLabels: List[model.Label], collaborators: List[String], milestones: List[model.Milestone], labels: List[model.Label], hasWritePermission: Boolean, repository: service.RepositoryService.RepositoryInfo)(implicit context: app.Context) @import context._ @import view.helpers._ @html.main("%s - Issue #%d - %s/%s".format(issue.title, issue.issueId, repository.owner, repository.name)){ @html.header("issues", repository) @tab("issues", repository)
@if(hasWritePermission || loginAccount.map(_.userName == issue.openedUserName).getOrElse(false)){ Edit }
@issue.openedUserName opened this issue @datetime(issue.registeredDate)

#### @issue.title

@issue.assignedUserName.map { userName => @userName is assigned }.getOrElse("No one is assigned") @if(hasWritePermission){ @helper.html.dropdown {
- Clear assignee
@collaborators.map { collaborator =>
- @collaborator
} } }
@issue.milestoneId.map { milestoneId => @milestones.find(_.milestoneId == milestoneId).map { milestone => Milestone: @milestone.title } }.getOrElse("No milestone") @if(hasWritePermission){ @helper.html.dropdown {
- No milestone
@milestones.map { milestone =>
- @milestone.title
} } }
@markdown(issue.content getOrElse "No description given.", repository, false, true, true)
@comments.map { comment =>
@comment.commentedUserName commented @datetime(comment.registeredDate) @if(hasWritePermission || loginAccount.map(_.userName == comment.commentedUserName).getOrElse(false)){ }
@markdown(comment.content, repository, false, true, true)
@comment.action.map { action =>
@if(action == "close"){ Closed @comment.commentedUserName closed the issue @datetime(comment.registeredDate) } else { Reopened @comment.commentedUserName reopened the issue @datetime(comment.registeredDate) }
} } @if(loginAccount.isDefined){
@helper.html.preview(repository, "", false, true, true, "width: 730px; height: 100px;")
@if(hasWritePermission || issue.openedUserName == loginAccount.get.userName){ } }
@if(issue.closed) { Closed } else { Open }
@comments.size @plural(comments.size, "comment")

Labels @if(hasWritePermission){
@helper.html.dropdown { @labels.map { label =>
- @label.labelName
} }
}
}