diff --git a/src/main/twirl/helper/dropdown.scala.html b/src/main/twirl/helper/dropdown.scala.html index 158cf4e..f7479a8 100644 --- a/src/main/twirl/helper/dropdown.scala.html +++ b/src/main/twirl/helper/dropdown.scala.html @@ -1,13 +1,13 @@ -@(buttonValue: String = "", prefix: String = "")(body: Html) -
- diff --git a/src/main/twirl/issues/listparts.scala.html b/src/main/twirl/issues/listparts.scala.html index e035b9d..c5b4ebb 100644 --- a/src/main/twirl/issues/listparts.scala.html +++ b/src/main/twirl/issues/listparts.scala.html @@ -29,52 +29,49 @@ @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){ diff --git a/src/main/twirl/pulls/listparts.scala.html b/src/main/twirl/pulls/listparts.scala.html index cb8a158..7bc3874 100644 --- a/src/main/twirl/pulls/listparts.scala.html +++ b/src/main/twirl/pulls/listparts.scala.html @@ -20,52 +20,49 @@ @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){ diff --git a/src/main/twirl/repo/tab.scala.html b/src/main/twirl/repo/tab.scala.html index 8a5a9eb..6363d5c 100644 --- a/src/main/twirl/repo/tab.scala.html +++ b/src/main/twirl/repo/tab.scala.html @@ -5,25 +5,16 @@