NIHVIVO-564 Enable adding stylesheets in dump ftls
This commit is contained in:
parent
067f896a1f
commit
3317419fcf
3 changed files with 8 additions and 6 deletions
|
@ -8,6 +8,7 @@ import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHelper;
|
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreemarkerHelper;
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.web.templatemodels.filelist.StylesheetList;
|
||||||
import freemarker.core.Environment;
|
import freemarker.core.Environment;
|
||||||
import freemarker.template.Configuration;
|
import freemarker.template.Configuration;
|
||||||
import freemarker.template.SimpleDate;
|
import freemarker.template.SimpleDate;
|
||||||
|
@ -81,6 +82,8 @@ public class DumpDirective implements TemplateDirectiveModel {
|
||||||
map.put("includeTemplate", includeTemplate);
|
map.put("includeTemplate", includeTemplate);
|
||||||
map.put("type", type);
|
map.put("type", type);
|
||||||
|
|
||||||
|
map.put("stylesheets", dataModel.get("stylesheets"));
|
||||||
|
|
||||||
FreemarkerHelper helper = new FreemarkerHelper();
|
FreemarkerHelper helper = new FreemarkerHelper();
|
||||||
String output = helper.mergeMapToTemplate(templateName, map, config);
|
String output = helper.mergeMapToTemplate(templateName, map, config);
|
||||||
|
|
||||||
|
|
|
@ -5,5 +5,6 @@
|
||||||
.dump {
|
.dump {
|
||||||
border-top: 1px solid #ccc;
|
border-top: 1px solid #ccc;
|
||||||
border-bottom: 1px solid #ccc;
|
border-bottom: 1px solid #ccc;
|
||||||
padding: 5em 0;
|
padding: 1em 0;
|
||||||
|
margin: 1em 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,14 +2,12 @@
|
||||||
|
|
||||||
<#-- Template for dumping a template variable -->
|
<#-- Template for dumping a template variable -->
|
||||||
|
|
||||||
<hr /> <#-- turn these into borders once css is working -->
|
|
||||||
<div class="dump">
|
<div class="dump">
|
||||||
|
|
||||||
<h6>Freemarker template variable dump</h6>
|
<h6>Dump of template variable <em>${var}</em>:</h6>
|
||||||
|
|
||||||
<strong>Variable <em>${var}</em>:</strong><br/ >
|
|
||||||
<#include includeTemplate />
|
<#include includeTemplate />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr /> <#-- turn these into borders once css is working -->
|
${stylesheets.add("/css/dump.css")}
|
Loading…
Add table
Add a link
Reference in a new issue