organization: Complement pull request group view
This commit complements f8ed345f which support listing whole pull request list in the group menu. Now, "Closed" tab works. See: Yona Github issue #320
@ea2e3ab42bd991cd4d9306fe917338fd88b2e29b
--- app/controllers/OrganizationApp.java
+++ app/controllers/OrganizationApp.java
... | ... | @@ -1,8 +1,9 @@ |
1 | 1 |
/** |
2 |
- * Yona, Project Hosting SW |
|
3 |
- * |
|
4 |
- * Copyright 2017 the original author or authors. |
|
5 |
- */ |
|
2 |
+ * Yona, 21st Century Project Hosting SW |
|
3 |
+ * <p> |
|
4 |
+ * Copyright Yona & Yobi Authors & NAVER Corp. & NAVER LABS Corp. |
|
5 |
+ * https://yona.io |
|
6 |
+ **/ |
|
6 | 7 |
package controllers; |
7 | 8 |
|
8 | 9 |
import com.avaje.ebean.ExpressionList; |
... | ... | @@ -68,6 +69,10 @@ |
68 | 69 |
return ok(group_pullrequest_list.render("title.pullrequest", organization, page, condition, category)); |
69 | 70 |
} |
70 | 71 |
|
72 |
+ @AnonymousCheck(requiresLogin = false, displaysFlashMessage = true) |
|
73 |
+ public static Result organizationClosedPullRequests(String organizationName) { |
|
74 |
+ return organizationPullRequests(organizationName, "closed"); |
|
75 |
+ } |
|
71 | 76 |
|
72 | 77 |
/** |
73 | 78 |
* show New Group page |
--- app/views/organization/group_pullrequest_list.scala.html
+++ app/views/organization/group_pullrequest_list.scala.html
... | ... | @@ -17,7 +17,7 @@ |
17 | 17 |
@searchFormAction(category: Category) = @{ |
18 | 18 |
category match { |
19 | 19 |
case Category.CLOSED => { |
20 |
- routes.OrganizationApp.organizationPullRequests(organization.name, "closed") |
|
20 |
+ routes.OrganizationApp.organizationClosedPullRequests(organization.name) |
|
21 | 21 |
} |
22 | 22 |
case Category.OPEN => { |
23 | 23 |
routes.OrganizationApp.organizationPullRequests(organization.name, "open") |
--- conf/routes
+++ conf/routes
... | ... | @@ -80,6 +80,7 @@ |
80 | 80 |
GET /organizations/:organizationName/issues controllers.IssueApp.organizationIssues(organizationName: String, state:String ?= "", format:String ?= "html", pageNum: Int ?= 1) |
81 | 81 |
GET /organizations/:organizationName/boards controllers.BoardApp.organizationBoards(organizationName: String, pageNum: Int ?= 1) |
82 | 82 |
GET /organizations/:organizationName/pullrequests controllers.OrganizationApp.organizationPullRequests(organizationName: String, category: String ?= "open") |
83 |
+GET /organizations/:organizationName/closedPullrequests controllers.OrganizationApp.organizationClosedPullRequests(organizationName: String) |
|
83 | 84 |
GET /organizations/:organizationName/settingform controllers.OrganizationApp.settingForm(organizationName: String) |
84 | 85 |
GET /organizations/:organizationName/deleteForm controllers.OrganizationApp.deleteForm(organizationName: String) |
85 | 86 |
DELETE /organizations/:organizationName controllers.OrganizationApp.deleteOrganization(organizationName: String) |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?