@(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)
@avatar(issue.openedUserName, 48)
@if(hasWritePermission || loginAccount.map(_.userName == issue.openedUserName).getOrElse(false)){ Edit }
@issue.openedUserName opened this issue @datetime(issue.registeredDate)

#### @issue.title

@issue.assignedUserName.map { userName => @avatar(userName, 20) @userName is assigned }.getOrElse("No one is assigned") @if(hasWritePermission){ @helper.html.dropdown() {
- Clear assignee
@collaborators.map { collaborator =>
- @avatar(collaborator, 20) @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)
@comments.map { comment =>
@avatar(comment.commentedUserName, 48)
@comment.commentedUserName commented @datetime(comment.registeredDate) @if(hasWritePermission || loginAccount.map(_.userName == comment.commentedUserName).getOrElse(false)){ }
@markdown(comment.content, repository, false, 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){
@avatar(loginAccount.get.userName, 48)
@helper.html.preview(repository, "", false, true, "width: 680px; 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
} }
}
}