@(issues: List[(model.Issue, List[model.Label], Int)], page: Int, labels: List[model.Label], milestones: List[model.Milestone], openCount: Int, closedCount: Int, allCount: Int, assignedCount: Option[Int], createdByCount: Option[Int], labelCounts: Map[String, Int], condition: service.IssuesService.IssueSearchCondition, filter: String, repository: service.RepositoryService.RepositoryInfo, hasWritePermission: Boolean)(implicit context: app.Context) @import context._ @import view.helpers._ @html.main("Issues - " + repository.owner + "/" + repository.name){ @html.header("issues", repository) @tab("issues", repository)

@if(condition.milestoneId.isEmpty){ No milestone selected } else { @if(condition.milestoneId.get.isEmpty){ Issues with no milestone } else { Milestone: @milestones.find(_.milestoneId == condition.milestoneId.get.get).map(_.title) } } @helper.html.dropdown { @if(condition.milestoneId.isDefined){
- Clear milestone filter
}
- @helper.html.checkicon(condition.milestoneId == Some(None)) Issues with no milestone
@milestones.map { milestone =>
- @helper.html.checkicon(condition.milestoneId == Some(Some(milestone.milestoneId))) @milestone.title
} } @if(condition.milestoneId.isDefined && condition.milestoneId.get.isDefined){
@if(closedCount > 0){ }
@openCount open issues }

Labels
@if(hasWritePermission){

New label @_root_.issues.labels.html.edit(None, repository) }
@if(condition.labels.nonEmpty || condition.milestoneId.isDefined){ Clear milestone and label filters }
@helper.html.paginator(page, (if(condition.state == "open") openCount else closedCount), service.IssuesService.IssueLimit, 7, condition.toURL)
@openCount Open @closedCount Closed

@issues.map { case (issue, labels, commentCount) =>
@issue.title @labels.map { label => @label.labelName } #@issue.issueId Opened by @issue.openedUserName @datetime(issue.registeredDate) @if(commentCount > 0){ @commentCount @plural(commentCount, "comment") }
} @if(issues.isEmpty){
No issues to show. @if(condition.labels.nonEmpty || condition.milestoneId.isDefined){ Clear active filters. } else { Create a new issue. }
}

@helper.html.paginator(page, (if(condition.state == "open") openCount else closedCount), service.IssuesService.IssueLimit, 10, condition.toURL)
} @if(hasWritePermission){
}