@(issue: gitbucket.core.model.Issue, comments: List[gitbucket.core.model.Comment], issueLabels: List[gitbucket.core.model.Label], collaborators: List[String], milestones: List[(gitbucket.core.model.Milestone, Int, Int)], labels: List[gitbucket.core.model.Label], hasWritePermission: Boolean, repository: gitbucket.core.service.RepositoryService.RepositoryInfo)(implicit context: gitbucket.core.controller.Context) @import gitbucket.core.view.helpers._
Labels @if(hasWritePermission){
@helper.html.dropdown(right = true) { @labels.map { label =>
- @helper.html.checkicon(issueLabels.exists(_.labelId == label.labelId)) @label.labelName
} }
}

Milestone @if(hasWritePermission){
@helper.html.dropdown(right = true) {
- Clear this milestone
@milestones.filter(_._1.closedDate.isEmpty).map { case (milestone, _, _) =>
- @helper.html.checkicon(Some(milestone.milestoneId) == issue.milestoneId) @milestone.title
  @milestone.dueDate.map { dueDate => @if(isPast(dueDate)){ Due by @date(dueDate) } else { Due by @date(dueDate) } }.getOrElse { No due date }
} }
}
@issue.milestoneId.map { milestoneId => @milestones.collect { case (milestone, openCount, closeCount) if(milestone.milestoneId == milestoneId) => @issues.milestones.html.progress(openCount + closeCount, closeCount) } }
@issue.milestoneId.map { milestoneId => @milestones.collect { case (milestone, _, _) if(milestone.milestoneId == milestoneId) => @milestone.title } }.getOrElse { No milestone }

Assignee @if(hasWritePermission){
@helper.html.dropdown(right = true) {
- Clear assignee
@collaborators.map { collaborator =>
- @helper.html.checkicon(Some(collaborator) == issue.assignedUserName)@avatar(collaborator, 20) @collaborator
} }
}
@issue.assignedUserName.map { userName => @avatar(userName, 20) @user(userName, styleClass="username strong small") }.getOrElse{ No one }

@defining((issue.openedUserName :: comments.map(_.commentedUserName)).distinct){ participants =>
@participants.size @plural(participants.size, "participant")
@participants.map { participant => @avatarLink(participant, 20, tooltip = true) } }