summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/wicket/WicketUtils.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-05-07 14:32:09 -0400
committerJames Moger <james.moger@gitblit.com>2014-05-07 14:32:09 -0400
commit3b23dcdde4ef55927e45e56596e7023ce2cf9424 (patch)
tree0980f079007bc9c7966dda92644d606ef9bf12f6 /src/main/java/com/gitblit/wicket/WicketUtils.java
parent0fbf8052cc0c6272baf64d8de2d07d2cdbf3a287 (diff)
downloadgitblit-3b23dcdde4ef55927e45e56596e7023ce2cf9424.tar.gz
gitblit-3b23dcdde4ef55927e45e56596e7023ce2cf9424.zip
Consolidate open tickets page parameters
Diffstat (limited to 'src/main/java/com/gitblit/wicket/WicketUtils.java')
-rw-r--r--src/main/java/com/gitblit/wicket/WicketUtils.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main/java/com/gitblit/wicket/WicketUtils.java b/src/main/java/com/gitblit/wicket/WicketUtils.java
index 10b21468..687f0105 100644
--- a/src/main/java/com/gitblit/wicket/WicketUtils.java
+++ b/src/main/java/com/gitblit/wicket/WicketUtils.java
@@ -445,6 +445,20 @@ public class WicketUtils {
return new PageParameters(parameterMap);
}
+ public static PageParameters newTicketsParameters(String repositoryName, String... states) {
+ PageParameters tParams = newRepositoryParameter(repositoryName);
+ if (states != null) {
+ for (String state : states) {
+ tParams.add("status", state);
+ }
+ }
+ return tParams;
+ }
+
+ public static PageParameters newOpenTicketsParameter(String repositoryName) {
+ return newTicketsParameters(repositoryName, TicketsUI.openStatii);
+ }
+
public static String getProjectName(PageParameters params) {
return params.getString("p", "");
}