@(issues: List[(model.Issue, List[model.Label], Int)], page: Int, collaborators: List[String], milestones: List[model.Milestone], labels: List[model.Label], 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

@if(issues.isEmpty){
No issues to show. @if(condition.labels.nonEmpty || condition.milestoneId.isDefined){ Clear active filters. } else { Create a new issue. }
} else { @if(hasWritePermission){
@helper.html.dropdown("Label") { @labels.map { label => @label.labelName } } @helper.html.dropdown("Assignee") { Clear assignee @collaborators.map { collaborator => @avatar(collaborator, 20) @collaborator } } @helper.html.dropdown("Milestone") { Clear this milestone @milestones.map { milestone => @milestone.title } }
} } @issues.map { case (issue, labels, commentCount) =>
@if(hasWritePermission){ } @issue.title @labels.map { label => @label.labelName } @issue.assignedUserName.map { userName => @avatar(userName, 20, true) } #@issue.issueId Opened by @issue.openedUserName @datetime(issue.registeredDate) @if(commentCount > 0){ @commentCount @plural(commentCount, "comment") }
}

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