@(issues: List[(model.Issue, List[model.Label], Int)], page: Int, openCount: Int, closedCount: Int, condition: service.IssuesService.IssueSearchCondition, repository: Option[service.RepositoryService.RepositoryInfo], hasWritePermission: Boolean)(implicit context: app.Context) @import context._ @import view.helpers._
@repository.map { repository => @if(hasWritePermission){
@helper.html.paginator(page, (if(condition.state == "open") openCount else closedCount), service.PullRequestService.PullRequestLimit, 7, condition.toURL) New pull request
} }
@openCount Open @closedCount Closed
@helper.html.dropdown( value = (condition.sort, condition.direction) match { case ("created" , "desc") => "Newest" case ("created" , "asc" ) => "Oldest" case ("comments", "desc") => "Most commented" case ("comments", "asc" ) => "Least commented" case ("updated" , "desc") => "Recently updated" case ("updated" , "asc" ) => "Least recently updated" }, prefix = "Sort", mini = false ){
- @helper.html.checkicon(condition.sort == "created" && condition.direction == "desc") Newest
- @helper.html.checkicon(condition.sort == "created" && condition.direction == "asc") Oldest
- @helper.html.checkicon(condition.sort == "comments" && condition.direction == "desc") Most commented
- @helper.html.checkicon(condition.sort == "comments" && condition.direction == "asc") Least commented
- @helper.html.checkicon(condition.sort == "updated" && condition.direction == "desc") Recently updated
- @helper.html.checkicon(condition.sort == "updated" && condition.direction == "asc") Least recently updated
}

@if(issues.isEmpty){
No pull requests to show.
} @issues.map { case (issue, labels, commentCount) =>
@issue.title #@issue.issueId @issue.content.map { content => @cut(content, 90) }.getOrElse { No description available } @avatar(issue.openedUserName, 20) 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.PullRequestService.PullRequestLimit, 10, condition.toURL)