@(target: String, issues: List[(gitbucket.core.service.IssuesService.IssueInfo, Option[(gitbucket.core.model.CommitState, List[gitbucket.core.model.CommitStatus])])], page: Int, openCount: Int, closedCount: Int, condition: gitbucket.core.service.IssuesService.IssueSearchCondition, collaborators: List[String] = Nil, milestones: List[gitbucket.core.model.Milestone] = Nil, priorities: List[gitbucket.core.model.Priority] = Nil, labels: List[gitbucket.core.model.Label] = Nil, repository: Option[gitbucket.core.service.RepositoryService.RepositoryInfo] = None, isManageable: Boolean = false)(implicit context: gitbucket.core.controller.Context) @import gitbucket.core.view.helpers @import gitbucket.core.service.IssuesService.IssueInfo @* @if(condition.nonEmpty){
Clear current search query, filters, and sorts
} *@

@gitbucket.core.helper.html.dropdown("Author", filter = ("author", "Find Author...")) { @collaborators.map { collaborator =>
- @gitbucket.core.helper.html.checkicon(condition.author == Some(collaborator)) @helpers.avatar(collaborator, 20) @collaborator
} } @gitbucket.core.helper.html.dropdown("Label", filter = ("label", "Find Label...")) { @labels.map { label =>
- @gitbucket.core.helper.html.checkicon(condition.labels.contains(label.labelName)) @label.labelName
} } @gitbucket.core.helper.html.dropdown("Priority", filter = ("priority", "Find Priority...")) {
- @gitbucket.core.helper.html.checkicon(condition.priority == Some(None)) Issues with no priority
@priorities.map { priority =>
- @gitbucket.core.helper.html.checkicon(condition.priority == Some(Some(priority.priorityName))) @priority.priorityName
} } @gitbucket.core.helper.html.dropdown("Milestone", filter = ("milestone", "Find Milestone...")) {
- @gitbucket.core.helper.html.checkicon(condition.milestone == Some(None)) Issues with no milestone
@milestones.filter(_.closedDate.isEmpty).map { milestone =>
- @gitbucket.core.helper.html.checkicon(condition.milestone == Some(Some(milestone.title))) @milestone.title
} } @gitbucket.core.helper.html.dropdown("Assignee", filter = ("assignee", "Find Assignee...")) {
- @gitbucket.core.helper.html.checkicon(condition.assigned == Some(None)) Assigned to nobody
@collaborators.map { collaborator =>
- @gitbucket.core.helper.html.checkicon(condition.assigned == Some(Some(collaborator))) @helpers.avatar(collaborator, 20) @collaborator
} } @gitbucket.core.helper.html.dropdown("Sort"){
- @gitbucket.core.helper.html.checkicon(condition.sort == "created" && condition.direction == "desc") Newest
- @gitbucket.core.helper.html.checkicon(condition.sort == "created" && condition.direction == "asc") Oldest
- @gitbucket.core.helper.html.checkicon(condition.sort == "priority" && condition.direction == "asc") Highest priority
- @gitbucket.core.helper.html.checkicon(condition.sort == "priority" && condition.direction == "desc") Lowest priority
- @gitbucket.core.helper.html.checkicon(condition.sort == "comments" && condition.direction == "desc") Most commented
- @gitbucket.core.helper.html.checkicon(condition.sort == "comments" && condition.direction == "asc") Least commented
- @gitbucket.core.helper.html.checkicon(condition.sort == "updated" && condition.direction == "desc") Recently updated
- @gitbucket.core.helper.html.checkicon(condition.sort == "updated" && condition.direction == "asc") Least recently updated
} @if(isManageable){ @gitbucket.core.helper.html.dropdown("Mark as") {
- Open
- Close
} @gitbucket.core.helper.html.dropdown("Label", filter = ("label", "Find Label...")) { @labels.map { label =>
- @label.labelName
} } @gitbucket.core.helper.html.dropdown("Priority", filter = ("priority", "Find Priority...")) {
- No priority
@priorities.map { priority =>
- @priority.priorityName
} } @gitbucket.core.helper.html.dropdown("Milestone", filter = ("milestone", "Find Milestone...")) {
- No milestone
@milestones.filter(_.closedDate.isEmpty).map { milestone =>
- @milestone.title
} } @gitbucket.core.helper.html.dropdown("Assignee", filter = ("assignee", "Find Assignee...")) {
- Clear assignee
@collaborators.map { collaborator =>
- @helpers.avatar(collaborator, 20) @collaborator
} } }

@if(issues.isEmpty){
@if(target == "issues"){ No issues to show. } else { No pull requests to show. } @* @if(condition.labels.nonEmpty || condition.milestone.isDefined){ Clear active filters. } else { *@ @if(repository.isDefined){ @if(target == "issues"){ Create a new issue. } else { Create a new pull request. } } @* } *@
} @issues.map { case (IssueInfo(issue, labels, milestone, priority, commentCount, commitId), status) =>

@if(isManageable){ } @* *@ @if(repository.isEmpty){ @issue.repositoryName ･ } @if(target == "issues"){ @issue.title } else { @issue.title } @status.map { case (summary, statuses) => @gitbucket.core.helper.html.commitstatus(commitId.get, summary, statuses) } @labels.map { label => @label.labelName } @issue.assignedUserName.map { userName => @helpers.avatar(userName, 20, tooltip = true) } @if(commentCount > 0){ @commentCount } else { @commentCount }
#@issue.issueId opened @gitbucket.core.helper.html.datetimeago(issue.registeredDate) by @helpers.user(issue.openedUserName, styleClass="username") @priority.map(priority => priorities.filter(p => p.priorityName == priority).head).map { priority => @priority.priorityName } @milestone.map { milestone => @milestone }

}

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