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

    Milestone @if(hasWritePermission){
    @dropdown("Edit", right = true) {
  • Clear this milestone
  • @milestones.filter(_._1.closedDate.isEmpty).map { case (milestone, _, _) =>
  • @issue.map { issue => @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(hasWritePermission){
    @dropdown("Edit", right = true) {
  • Clear assignee
  • @collaborators.map { collaborator =>
  • @checkicon(issue.exists(_.assignedUserName.exists(_ == collaborator)))@helpers.avatar(collaborator, 20) @collaborator
  • } }
    }
    @issue.flatMap(_.assignedUserName).map { userName => @helpers.avatar(userName, 20) @helpers.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 @helpers.plural(participants.size, "participant")
    }
    @defining((issue.openedUserName :: comments.map(_.commentedUserName)).distinct){ participants => @participants.map { participant => @helpers.avatarLink(participant, 20, tooltip = true) } } }