NIHVIVO-564 Rearchitected dump directives to use shared helper methods rather than having dumpAll template call dump directive.
This commit is contained in:
parent
d3b8b89de4
commit
91468db876
10 changed files with 194 additions and 125 deletions
|
@ -1,25 +0,0 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- Template for dumping the template data model -->
|
||||
|
||||
<div class="dump datamodel">
|
||||
|
||||
<h3>Data Model Dump for Template <em>${containingTemplate}</em></h3>
|
||||
|
||||
<h4>VARIABLES</h4>
|
||||
|
||||
<ul>
|
||||
<#list models?keys as key>
|
||||
<li><@dump var="${key}" dataModelDump=true /></li>
|
||||
</#list>
|
||||
</ul>
|
||||
|
||||
<h4>DIRECTIVES</h4>
|
||||
|
||||
<ul>
|
||||
<#list directives?keys as directive>
|
||||
<li>${directives[directive]}</li>
|
||||
</#list>
|
||||
</ul>
|
||||
|
||||
</div>
|
|
@ -1,14 +1,12 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- Template for dumping a template variable -->
|
||||
|
||||
<div class="dump">
|
||||
|
||||
<div class="dump">
|
||||
|
||||
<h6>Dump of template variable <em>${var}</em>:</h6>
|
||||
|
||||
<h6>Variable name: <em>${var}</em></h6>
|
||||
<strong>Type:</strong> ${type}<br />
|
||||
<strong>Value:</strong> ${value}<br />
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
${stylesheets.add("/css/dump.css")}
|
|
@ -0,0 +1,9 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- Template for dump directive -->
|
||||
|
||||
<h3>Template variable dump</h3>
|
||||
|
||||
${var}
|
||||
|
||||
${stylesheets.add("/css/dump.css")}
|
|
@ -0,0 +1,27 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- Template for dumpAll directive (dumping template data model) -->
|
||||
|
||||
<div class="dump datamodel">
|
||||
|
||||
<h3>Data model dump for template <em>${containingTemplate}</em></h3>
|
||||
|
||||
<h4>VARIABLES</h4>
|
||||
|
||||
<ul>
|
||||
<#list models as model>
|
||||
<li>${model}</li>
|
||||
</#list>
|
||||
</ul>
|
||||
|
||||
<h4>DIRECTIVES</h4>
|
||||
|
||||
<ul>
|
||||
<#list directives as directive>
|
||||
<li>${directive}</li>
|
||||
</#list>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
${stylesheets.add("/css/dump.css")}
|
|
@ -46,17 +46,18 @@
|
|||
|
||||
<p><strong>Berries: </strong>${berries}</p>
|
||||
|
||||
<#--
|
||||
|
||||
<@dump var="now" />
|
||||
<@dump var="urls" />
|
||||
<@dump var="fruit" />
|
||||
<@dump var="trueStatement" />
|
||||
<@dump var="falseStatement" />
|
||||
<@dump var="zoo1" />
|
||||
-->
|
||||
|
||||
|
||||
${stylesheets.addFromTheme("/sstest.css", "/sstest2.css")}
|
||||
${scripts.addFromTheme("/jstest.js")}
|
||||
${scripts.add("/js/script1.js", "/js/script2.js", "/js/script3.js")}
|
||||
|
||||
|
||||
<@dumpAll />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue