Fix pull request's view on dashboard

This commit is contained in:
Rodrigo Lazoti
2014-11-04 18:15:07 -02:00
parent 2a60f607ff
commit 29baf1223c
3 changed files with 13 additions and 8 deletions

View File

@@ -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")))
})

View File

@@ -10,6 +10,6 @@
@html.main("Pull Requests"){
@dashboard.html.tab("pulls")
<div class="container">
@issueslist(issues, page, openCount, closedCount, condition, filter, groups)
@pullslist(issues, page, openCount, closedCount, condition, filter, groups)
</div>
}

View File

@@ -9,7 +9,8 @@
@import view.helpers._
@import service.IssuesService.IssueInfo
<ul class="nav nav-pills-group pull-left fill-width">
<li class="@if(filter == "created_by"){active} first"><a href="@path/dashboard/pulls/created_by@condition.toURL">Created</a></li>
<li class="@if(filter == "all"){active} first"><a href="@path/dashboard/pulls/all@condition.toURL">All</a></li>
<li class="@if(filter == "created_by"){active}"><a href="@path/dashboard/pulls/created_by@condition.toURL">Created</a></li>
<li class="@if(filter == "assigned"){active}"><a href="@path/dashboard/pulls/assigned@condition.toURL">Assigned</a></li>
<li class="@if(filter == "mentioned"){active} last"><a href="@path/dashboard/pulls/mentioned@condition.toURL">Mentioned</a></li>
</ul>