@(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)], priorities: List[gitbucket.core.model.Priority], defaultPriority: Option[gitbucket.core.model.Priority], labels: List[gitbucket.core.model.Label], isManageable: Boolean, repository: gitbucket.core.service.RepositoryService.RepositoryInfo)(implicit context: gitbucket.core.controller.Context) @import gitbucket.core.view.helpers
Labels @if(isManageable){
@gitbucket.core.helper.html.dropdown("Edit", right = true, filter = ("labels", "Filter Labels")) { @labels.map { label =>
- @gitbucket.core.helper.html.checkicon(issueLabels.exists(_.labelId == label.labelId)) @label.labelName
} } @if(issue.isEmpty){ }
}

Priority @if(isManageable){
@gitbucket.core.helper.html.dropdown("Edit", right = true, filter = ("priority", "Filter Priority")) {
- Clear priority
@priorities.map { priority =>
- @gitbucket.core.helper.html.checkicon(issue.flatMap(_.priorityId).orElse(defaultPriority.map(_.priorityId)).map(id => id == priority.priorityId).getOrElse(false)) @priority.priorityName
} }
}
@issue.flatMap(_.priorityId).orElse(defaultPriority.map(_.priorityId)).map { priorityId => @priorities.collect { case priority if(priority.priorityId == priorityId) => { @priority.priorityName }} }.getOrElse { No priority } @if(issue.isEmpty){ }

Milestone @if(isManageable){
@gitbucket.core.helper.html.dropdown("Edit", right = true, filter = ("milestone", "Filter Milestone")) {
- Clear this milestone
@milestones.filter(_._1.closedDate.isEmpty).map { case (milestone, _, _) =>
- @issue.map { issue => @gitbucket.core.helper.html.checkicon(Some(milestone.milestoneId) == issue.milestoneId) } @milestone.title
  @milestone.dueDate.map { dueDate => @if(helpers.isPast(dueDate)){ Due by @helpers.date(dueDate) } else { Due by @helpers.date(dueDate) } }.getOrElse { No due date }
} }
}
@issue.flatMap(_.milestoneId).map { milestoneId => @milestones.collect { case (milestone, openCount, closeCount) if(milestone.milestoneId == milestoneId) => { @gitbucket.core.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(isManageable){
@gitbucket.core.helper.html.dropdown("Edit", right = true, filter = ("assignee", "Filter Assignee")) {
- Clear assignee
@collaborators.map { collaborator =>
- @gitbucket.core.helper.html.checkicon(issue.exists(_.assignedUserName.exists(_ == collaborator)))@helpers.avatar(collaborator, 20) @collaborator
} }
}
@issue.flatMap(_.assignedUserName).map { userName => @helpers.avatarLink(userName, 20) @helpers.user(userName, styleClass="username strong small") }.getOrElse{ No one } @if(issue.isEmpty){ } @issue.map { issue => @gitbucket.core.plugin.PluginRegistry().getIssueSidebars.map { sidebarComponent => @sidebarComponent(issue, repository, context) }

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