@(issue: model.Issue, comments: List[model.IssueComment], collaborators: List[String], milestones: List[(model.Milestone, Int, Int)], hasWritePermission: Boolean, repository: service.RepositoryService.RepositoryInfo)(implicit context: app.Context) @import context._ @import view.helpers._
@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.collect { case (milestone, _, _) if(milestone.milestoneId == milestoneId) => Milestone: @milestone.title } }.getOrElse("No milestone")
@issue.milestoneId.map { milestoneId => @milestones.collect { case (milestone, openCount, closeCount) if(milestone.milestoneId == milestoneId) => @issues.milestones.html.progress(openCount + closeCount, closeCount, false) } }
@if(hasWritePermission){ @helper.html.dropdown() {
- No milestone
@milestones.map { case (milestone, _, _) =>
- @milestone.title
  @milestone.dueDate.map { dueDate => @if(isPast(dueDate)){ Due in @date(dueDate) } else { Due in @date(dueDate) } }.getOrElse { No due date }
} } }
@markdown(issue.content getOrElse "No description given.", repository, false, true)
@defining((issue.openedUserName :: comments.map(_.commentedUserName)).distinct){ participants => @participants.size @plural(participants.size, "participant") @participants.map { participant => @avatar(participant, 20, tooltip = true) } }