diff --git a/src/main/twirl/gitbucket/core/issues/listparts.scala.html b/src/main/twirl/gitbucket/core/issues/listparts.scala.html index 299c260..6d60c31 100644 --- a/src/main/twirl/gitbucket/core/issues/listparts.scala.html +++ b/src/main/twirl/gitbucket/core/issues/listparts.scala.html @@ -21,196 +21,199 @@ } - - + + - - @if(issues.isEmpty){ - - - - } - @issues.map { case IssueInfo(issue, labels, milestone, commentCount, commitStatus) => - - + - } + + + @if(issues.isEmpty){ + + + + } + @issues.map { case IssueInfo(issue, labels, milestone, commentCount, commitStatus) => + + + + } +
- - - - - @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.milestone == Some(None)) Issues with no milestone - -
  • - @milestones.filter(_.closedDate.isEmpty).map { milestone => -
  • - - @helper.html.checkicon(condition.milestone == Some(Some(milestone.title))) @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(hasWritePermission){ -
    - @helper.html.dropdown("Mark as", flat = true) { -
  • Open
  • -
  • Close
  • +
    + + + + + @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) { -
  • No milestone
  • +
  • + + @helper.html.checkicon(condition.milestone == Some(None)) Issues with no milestone + +
  • @milestones.filter(_.closedDate.isEmpty).map { milestone => -
  • @milestone.title
  • +
  • + + @helper.html.checkicon(condition.milestone == Some(Some(milestone.title))) @milestone.title + +
  • } } @helper.html.dropdown("Assignee", flat = true) { -
  • Clear assignee
  • @collaborators.map { collaborator => -
  • @avatar(collaborator, 20) @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(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. - } - } - } -
    @if(hasWritePermission){ - +
    + @helper.html.dropdown("Mark as", flat = true) { +
  • Open
  • +
  • Close
  • + } + @helper.html.dropdown("Label", flat = true) { + @labels.map { label => +
  • + + +   + @label.labelName + +
  • + } + } + @helper.html.dropdown("Milestone", flat = true) { +
  • No milestone
  • + @milestones.filter(_.closedDate.isEmpty).map { milestone => +
  • @milestone.title
  • + } + } + @helper.html.dropdown("Assignee", flat = true) { +
  • Clear assignee
  • + @collaborators.map { collaborator => +
  • @avatar(collaborator, 20) @collaborator
  • + } + } +
    } - - @if(repository.isEmpty){ - @issue.repositoryName ・ - } - @if(target == "issues"){ - @issue.title - } else { - @issue.title - } - @commitstatus(issue, commitStatus) - @labels.map { label => - @label.labelName - } - - @issue.assignedUserName.map { userName => - @avatar(userName, 20, tooltip = true) - } - @if(commentCount > 0){ - - @commentCount - - } else { - - @commentCount - - } - -
    - #@issue.issueId opened @helper.html.datetimeago(issue.registeredDate) by @user(issue.openedUserName, styleClass="username") - @milestone.map { milestone => - -@milestone - } -
    -
    + @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. + } + } + } +
    + @if(hasWritePermission){ + + } + + @if(repository.isEmpty){ + @issue.repositoryName ・ + } + @if(target == "issues"){ + @issue.title + } else { + @issue.title + } + @commitstatus(issue, commitStatus) + @labels.map { label => + @label.labelName + } + + @issue.assignedUserName.map { userName => + @avatar(userName, 20, tooltip = true) + } + @if(commentCount > 0){ + + @commentCount + + } else { + + @commentCount + + } + +
    + #@issue.issueId opened @helper.html.datetimeago(issue.registeredDate) by @user(issue.openedUserName, styleClass="username") + @milestone.map { milestone => + @milestone + } +
    +
    @helper.html.paginator(page, (if(condition.state == "open") openCount else closedCount), gitbucket.core.service.IssuesService.IssueLimit, 10, condition.toURL) diff --git a/src/main/twirl/gitbucket/core/issues/navigation.scala.html b/src/main/twirl/gitbucket/core/issues/navigation.scala.html index 2da04a7..f8bce35 100644 --- a/src/main/twirl/gitbucket/core/issues/navigation.scala.html +++ b/src/main/twirl/gitbucket/core/issues/navigation.scala.html @@ -4,55 +4,53 @@ condition: Option[gitbucket.core.service.IssuesService.IssueSearchCondition] = None)(implicit context: gitbucket.core.controller.Context) @import context._ @import gitbucket.core.view.helpers._ -