From f76fee63ed9cb3a30d3c0c092d860b1cb93a481b Mon Sep 17 00:00:00 2001
From: Gerard Smyth <gerard.smyth@gmail.com>
Date: Thu, 08 May 2014 13:09:30 -0400
Subject: [PATCH] Updated the SyndicationServlet to provide an additional option to return details of the tags in the repository instead of the commits. This uses a new 'ot' request parameter to indicate the object type of the content to return, which can be ither TAG or COMMIT. If this is not provided, then COMMIT is assumed to maintain backwards compatability. If tags are returned, then the paging parameters, 'l' and 'pg' are still supported, but searching options are currently ignored.
---
src/main/java/com/gitblit/wicket/ng/NgController.java | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/main/java/com/gitblit/wicket/ng/NgController.java b/src/main/java/com/gitblit/wicket/ng/NgController.java
index fb88cf3..19e419a 100644
--- a/src/main/java/com/gitblit/wicket/ng/NgController.java
+++ b/src/main/java/com/gitblit/wicket/ng/NgController.java
@@ -13,13 +13,13 @@
See the License for the specific language governing permissions and
limitations under the License.
*/
-
package com.gitblit.wicket.ng;
import java.text.MessageFormat;
import java.util.HashMap;
import java.util.Map;
+import org.apache.wicket.ResourceReference;
import org.apache.wicket.markup.html.IHeaderContributor;
import org.apache.wicket.markup.html.IHeaderResponse;
@@ -30,23 +30,23 @@
* Simple AngularJS data controller which injects scoped objects as static,
* embedded JSON within the generated page. This allows use of AngularJS
* client-side databinding (magic) with server-generated pages.
- *
+ *
* @author James Moger
- *
+ *
*/
public class NgController implements IHeaderContributor {
private static final long serialVersionUID = 1L;
-
+
final String name;
-
+
final Map<String, Object> variables;
-
+
public NgController(String name) {
this.name = name;
this.variables = new HashMap<String, Object>();
}
-
+
public void addVariable(String name, Object o) {
variables.put(name, o);
}
@@ -54,7 +54,7 @@
@Override
public void renderHead(IHeaderResponse response) {
// add Google AngularJS reference
- response.renderJavascriptReference("bootstrap/js/angular.js");
+ response.renderJavascriptReference(new ResourceReference(NgController.class, "angular.js"));
Gson gson = new GsonBuilder().create();
@@ -68,7 +68,7 @@
line(sb, MessageFormat.format("\t$scope.{0} = {1};", var, json));
}
line(sb, "}");
-
+
response.renderJavascript(sb.toString(), null);
}
--
Gitblit v1.9.1