From 29baf1223ce01aa0cbec44a1c3a78766568cf558 Mon Sep 17 00:00:00 2001 From: Rodrigo Lazoti Date: Tue, 4 Nov 2014 18:15:07 -0200 Subject: [PATCH 1/2] Fix pull request's view on dashboard --- src/main/scala/app/DashboardController.scala | 16 ++++++++++------ src/main/twirl/dashboard/pulls.scala.html | 2 +- src/main/twirl/dashboard/pullslist.scala.html | 3 ++- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/main/scala/app/DashboardController.scala b/src/main/scala/app/DashboardController.scala index 7bf30c1d5..466c33760 100644 --- a/src/main/scala/app/DashboardController.scala +++ b/src/main/scala/app/DashboardController.scala @@ -29,21 +29,25 @@ trait DashboardControllerBase extends ControllerBase { }) get("/dashboard/pulls")(usersOnly { + searchPullRequests("all", None) + }) + + get("/dashboard/pulls/all")(usersOnly { + searchPullRequests("all", None) + }) + + get("/dashboard/pulls/created_by")(usersOnly { searchPullRequests("created_by", None) }) - get("/dashboard/pulls/owned")(usersOnly { - searchPullRequests("created_by", None) + get("/dashboard/pulls/assigned")(usersOnly { + searchPullRequests("assigned", None) }) get("/dashboard/pulls/mentioned")(usersOnly { searchPullRequests("mentioned", None) }) - get("/dashboard/pulls/public")(usersOnly { - searchPullRequests("not_created_by", None) - }) - get("/dashboard/pulls/for/:owner/:repository")(usersOnly { searchPullRequests("all", Some(params("owner") + "/" + params("repository"))) }) diff --git a/src/main/twirl/dashboard/pulls.scala.html b/src/main/twirl/dashboard/pulls.scala.html index 614dc9a0e..1052f8e26 100644 --- a/src/main/twirl/dashboard/pulls.scala.html +++ b/src/main/twirl/dashboard/pulls.scala.html @@ -10,6 +10,6 @@ @html.main("Pull Requests"){ @dashboard.html.tab("pulls")
- @issueslist(issues, page, openCount, closedCount, condition, filter, groups) + @pullslist(issues, page, openCount, closedCount, condition, filter, groups)
} diff --git a/src/main/twirl/dashboard/pullslist.scala.html b/src/main/twirl/dashboard/pullslist.scala.html index fbddac5ee..4f22312ba 100644 --- a/src/main/twirl/dashboard/pullslist.scala.html +++ b/src/main/twirl/dashboard/pullslist.scala.html @@ -9,7 +9,8 @@ @import view.helpers._ @import service.IssuesService.IssueInfo From c83fab611ec553c01b27aa5cacb32b832b07d969 Mon Sep 17 00:00:00 2001 From: Rodrigo Lazoti Date: Thu, 6 Nov 2014 19:01:16 -0200 Subject: [PATCH 2/2] Remove the 'All' tab --- src/main/scala/app/DashboardController.scala | 6 +----- src/main/twirl/dashboard/pullslist.scala.html | 3 +-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/scala/app/DashboardController.scala b/src/main/scala/app/DashboardController.scala index 466c33760..321693fbb 100644 --- a/src/main/scala/app/DashboardController.scala +++ b/src/main/scala/app/DashboardController.scala @@ -29,11 +29,7 @@ trait DashboardControllerBase extends ControllerBase { }) get("/dashboard/pulls")(usersOnly { - searchPullRequests("all", None) - }) - - get("/dashboard/pulls/all")(usersOnly { - searchPullRequests("all", None) + searchPullRequests("created_by", None) }) get("/dashboard/pulls/created_by")(usersOnly { diff --git a/src/main/twirl/dashboard/pullslist.scala.html b/src/main/twirl/dashboard/pullslist.scala.html index 4f22312ba..fbddac5ee 100644 --- a/src/main/twirl/dashboard/pullslist.scala.html +++ b/src/main/twirl/dashboard/pullslist.scala.html @@ -9,8 +9,7 @@ @import view.helpers._ @import service.IssuesService.IssueInfo