diff options
author | James Moger <james.moger@gitblit.com> | 2014-05-07 14:32:09 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-05-07 14:32:09 -0400 |
commit | 3b23dcdde4ef55927e45e56596e7023ce2cf9424 (patch) | |
tree | 0980f079007bc9c7966dda92644d606ef9bf12f6 /src/main/java/com/gitblit/wicket/WicketUtils.java | |
parent | 0fbf8052cc0c6272baf64d8de2d07d2cdbf3a287 (diff) | |
download | gitblit-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.java | 14 |
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", "");
}
|