diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/FreemarkerHttpServlet.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/FreemarkerHttpServlet.java index 9be84278f..debf20130 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/FreemarkerHttpServlet.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/FreemarkerHttpServlet.java @@ -283,7 +283,7 @@ public class FreemarkerHttpServlet extends VitroHttpServlet { // Add any Java directives the templates should have access to private void addDirectives(Map map) { map.put("dump", new edu.cornell.mannlib.vitro.webapp.web.directives.DumpDirective()); - map.put("dumpDataModel", new edu.cornell.mannlib.vitro.webapp.web.directives.DumpDataModelDirective()); + map.put("dumpAll", new edu.cornell.mannlib.vitro.webapp.web.directives.DumpAllDirective()); } // Add variables that should be available only to the page's root map, not to the body. diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/web/directives/DumpDataModelDirective.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/web/directives/DumpAllDirective.java similarity index 88% rename from webapp/src/edu/cornell/mannlib/vitro/webapp/web/directives/DumpDataModelDirective.java rename to webapp/src/edu/cornell/mannlib/vitro/webapp/web/directives/DumpAllDirective.java index 5b97767c1..04d8653ec 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/web/directives/DumpDataModelDirective.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/web/directives/DumpAllDirective.java @@ -25,9 +25,9 @@ import freemarker.template.TemplateModel; import freemarker.template.TemplateModelException; import freemarker.template.utility.DeepUnwrap; -public class DumpDataModelDirective extends BaseTemplateDirectiveModel { +public class DumpAllDirective extends BaseTemplateDirectiveModel { - private static final Log log = LogFactory.getLog(DumpDataModelDirective.class); + private static final Log log = LogFactory.getLog(DumpAllDirective.class); @SuppressWarnings({ "unchecked" }) @Override @@ -36,15 +36,15 @@ public class DumpDataModelDirective extends BaseTemplateDirectiveModel { if (params.size() != 0) { throw new TemplateModelException( - "The dumpDataModel directive doesn't allow parameters."); + "The dumpAll directive doesn't allow parameters."); } if (loopVars.length != 0) { throw new TemplateModelException( - "The dumpDataModel directive doesn't allow loop variables."); + "The dumpAll directive doesn't allow loop variables."); } if (body != null) { throw new TemplateModelException( - "The dumpDataModel directive doesn't allow nested content."); + "The dumpAll directive doesn't allow nested content."); } Configuration config = env.getConfiguration(); @@ -69,7 +69,7 @@ public class DumpDataModelDirective extends BaseTemplateDirectiveModel { } } - String templateName = "dump-datamodel.ftl"; + String templateName = "dump-all.ftl"; Map map = new HashMap(); map.put("models", models); @@ -96,7 +96,7 @@ public class DumpDataModelDirective extends BaseTemplateDirectiveModel { String name = getDirectiveName(); map.put("name", name); - map.put("usage", "Dump the contents of the template data model."); + map.put("effect", "Dump the contents of the template data model."); map.put("comments", "Sequences (lists and arrays) are enclosed in square brackets. Hashes are enclosed in curly braces."); diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/web/directives/DumpDirective.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/web/directives/DumpDirective.java index df490c66e..c6e5b104e 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/web/directives/DumpDirective.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/web/directives/DumpDirective.java @@ -128,7 +128,7 @@ public class DumpDirective extends BaseTemplateDirectiveModel { String name = getDirectiveName(); map.put("name", name); - map.put("usage", "Dump the contents of a template variable."); + map.put("effect", "Dump the contents of a template variable."); map.put("comments", "Sequences (lists and arrays) are enclosed in square brackets. Hashes are enclosed in curly braces."); diff --git a/webapp/web/templates/freemarker/body/partials/dump/directive-help.ftl b/webapp/web/templates/freemarker/body/partials/dump/directive-help.ftl index 1599a7798..b4d917dae 100644 --- a/webapp/web/templates/freemarker/body/partials/dump/directive-help.ftl +++ b/webapp/web/templates/freemarker/body/partials/dump/directive-help.ftl @@ -5,8 +5,8 @@

Directive name: ${name}

- <#if usage??> -

Usage: ${usage}

+ <#if effect??> +

Effect: ${effect}

<#if comments??>

Comments: ${comments}

diff --git a/webapp/web/templates/freemarker/body/partials/dump/dump-datamodel.ftl b/webapp/web/templates/freemarker/body/partials/dump/dump-all.ftl similarity index 100% rename from webapp/web/templates/freemarker/body/partials/dump/dump-datamodel.ftl rename to webapp/web/templates/freemarker/body/partials/dump/dump-all.ftl diff --git a/webapp/web/templates/freemarker/body/test.ftl b/webapp/web/templates/freemarker/body/test.ftl index 52ff132f8..0f43eb3f3 100644 --- a/webapp/web/templates/freemarker/body/test.ftl +++ b/webapp/web/templates/freemarker/body/test.ftl @@ -52,11 +52,11 @@ <@dump var="fruit" /> <@dump var="trueStatement" /> <@dump var="falseStatement" /> -<@dump var="zoo1" /> --> - +<@dump var="zoo1" /> +--> ${stylesheets.addFromTheme("/sstest.css", "/sstest2.css")} ${scripts.addFromTheme("/jstest.js")} ${scripts.add("/js/script1.js", "/js/script2.js", "/js/script3.js")} -<@dumpDataModel /> +<@dumpAll />