@(issue: Option[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 context._ @import gitbucket.core.view.helpers._
Labels @if(hasWritePermission){
@helper.html.dropdown("Edit", right = true) { @labels.map { label =>
- @helper.html.checkicon(issueLabels.exists(_.labelId == label.labelId)) @label.labelName
} } @if(issue.isEmpty){ }
}

Milestone @if(hasWritePermission){
@helper.html.dropdown("Edit", right = true) {
- Clear this milestone
@milestones.filter(_._1.closedDate.isEmpty).map { case (milestone, _, _) =>
- @issue.map { issue => @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.flatMap(_.milestoneId).map { milestoneId => @milestones.collect { case (milestone, openCount, closeCount) if(milestone.milestoneId == milestoneId) => @issues.milestones.html.progress(openCount + closeCount, closeCount) } }
@issue.flatMap(_.milestoneId).map { milestoneId => @milestones.collect { case (milestone, _, _) if(milestone.milestoneId == milestoneId) => @milestone.title } }.getOrElse { No milestone } @if(issue.isEmpty){ }

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

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