@(issues: List[service.IssuesService.IssueInfo], page: Int, openCount: Int, closedCount: Int, condition: service.IssuesService.IssueSearchCondition, collaborators: List[String] = Nil, milestones: List[model.Milestone] = Nil, labels: List[model.Label] = Nil, repository: Option[service.RepositoryService.RepositoryInfo], hasWritePermission: Boolean)(implicit context: app.Context) @import context._ @import view.helpers._ @import service.IssuesService.IssueInfo @*
@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
} *@

@openCount Open @closedCount Closed @helper.html.dropdown("Author", flat = true) { @collaborators.map { collaborator => @helper.html.checkicon(condition.author == Some(collaborator)) @avatar(collaborator, 20) @collaborator } } @helper.html.dropdown("Label", flat = true) { @labels.map { label => @helper.html.checkicon(condition.labels.contains(label.labelName)) @label.labelName } } @helper.html.dropdown("Milestone", flat = true) { @helper.html.checkicon(condition.milestoneId == Some(None)) Issues with no milestone @milestones.filter(_.closedDate.isEmpty).map { milestone => @helper.html.checkicon(condition.milestoneId == Some(Some(milestone.milestoneId))) @milestone.title } } @helper.html.dropdown("Assignee", flat = true) { @collaborators.map { collaborator => @helper.html.checkicon(condition.assigned == Some(collaborator)) @avatar(collaborator, 20) @collaborator } } @helper.html.dropdown("Sort", flat = true){ @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 IssueInfo(issue, labels, milestone, commentCount) =>
@if(hasWritePermission){ } @issue.title @labels.map { label => @label.labelName } @issue.assignedUserName.map { userName => @avatar(userName, 20, tooltip = true) } @commentCount #@issue.issueId opened by @user(issue.openedUserName, styleClass="username") @datetime(issue.registeredDate) @milestone @if(hasWritePermission){ }
}

@helper.html.paginator(page, (if(condition.state == "open") openCount else closedCount), service.PullRequestService.PullRequestLimit, 10, condition.toURL)