This commit is contained in:
ryounes 2011-04-22 21:18:06 +00:00
parent eb236275a3
commit 686d994b32
12 changed files with 12 additions and 318 deletions

View file

@ -1,37 +0,0 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Template for dumping a template variable -->
<div class="var">
<#if var??> <#-- not defined for a nested template model object -->
<p><strong>Variable name:</strong> ${var}</p>
</#if>
<#if value??>
<p><strong>Type:</strong> ${type}</p>
<p><strong>Value:</strong> ${value}</p>
<#-- Template model objects -->
<#if properties?has_content>
<p><strong>Properties:</strong></p>
<ul>
<#list properties?keys as property>
<li>${property}: ${properties[property]}</li>
</#list>
</ul>
</#if>
<#if methods?has_content>
<p><strong>Methods:</strong></p>
<ul>
<#list methods as method>
<li>${method}</li>
</#list>
</ul>
</#if>
<#else>
<p><strong>Value:</strong> null</p>
</#if>
</div>

View file

@ -1,12 +0,0 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Template for dump directive -->
<div class="dump">
<h3>Template variable dump</h3>
${var}
</div>
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/dump.css" />')}

View file

@ -5,8 +5,13 @@
<#-- Styles here are temporary; use stylesheets.add() once that's working (see below) -->
<style>
div.dump {
margin-top: 1em;
border-top: 2px solid #ccc;
padding-top: .75em;
}
.dump ul li.variable {
margin-bottom: .5em;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
padding-top: .75em;
padding-bottom: .75em;
@ -47,7 +52,7 @@ div.dump {
<#if dump?keys?has_content>
<ul>
<#list dump?keys as key>
<li>
<li class="variable">
<p><strong>Variable name:</strong> ${key}</p>
<#local type = dump[key].type>
@ -153,7 +158,7 @@ div.dump {
<#macro doMethod method>
<p><strong>Type:</strong> ${method.type}</p>
<#local help = method.help>
<#local help = method.help!>
<#if help?has_content>
<p><strong>Help:</strong><p>
<ul class="help">

View file

@ -1,36 +0,0 @@
<#-- $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>
<#if directives?has_content>
<h4>DIRECTIVES</h4>
<ul>
<#list directives as directive>
<li>${directive}</li>
</#list>
</ul>
</#if>
<#if methods?has_content>
<h4>METHODS</h4>
<ul>
<#list methods as method>
<li>${method}</li>
</#list>
</ul>
</#if>
</div>
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/dump.css" />')}

View file

@ -1,29 +0,0 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Styles here are temporary; move to css file once stylesheets.add() works -->
<style>
div.dump.var {
padding-top: .75em;
padding-bottom: .75em;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
margin-bottom: .5em;
}
div.dump.var p {
margin-bottom: .5em;
}
</style>
<div class="dump var">
<p><strong>Variable name:</strong> ${var.name}</p>
<p><strong>Type:</strong> ${var.type}</p>
<#-- What to do here depends on time. Test either ${var.type} or ${var.value} -->
<#-- <p><strong>Value:</strong> ${var.value}</p> -->
</div>
<#-- This will work after we move stylesheets to Configuration sharedVariables
${stylesheets.add('<link rel="stylesheet" href="/css/fmdump.css">')}
-->

View file

@ -1,40 +0,0 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Template for displaying directive help -->
<div class="directive">
<p><strong>Directive name:</strong> ${name}</p>
<#if effect??>
<p><strong>Effect:</strong> ${effect}</p>
<#if comments??>
<p><strong>Comments:</strong> ${comments}</p>
</#if>
<p><strong>Parameters: </strong>
<#if params??>
</p>
<ul>
<#list params?keys as param>
<li><strong>${param}:</strong> ${params[param]}</li>
</#list>
</ul>
<#else>
none</p>
</#if>
<br />
<p><strong>Examples:</strong></p>
<#if examples??>
<ul>
<#list examples as example>
<li>${example}</li>
</#list>
</ul>
</#if>
<#else>
<p>No help available for this directive.</p>
</#if>
</div>

View file

@ -1,40 +0,0 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Template for displaying directive help -->
<div class="directive">
<p><strong>Method name:</strong> ${name}</p>
<#if returnValue??>
<p><strong>Return value:</strong> ${returnValue}</p>
<#if comments??>
<p><strong>Comments:</strong> ${comments}</p>
</#if>
<p><strong>Parameters:</strong>
<#if params??>
</p>
<ol>
<#list params as param>
<li>${param}</li>
</#list>
</ol>
<#else>
none</p>
</#if>
<br />
<p><strong>Examples:</strong></p>
<#if examples??>
<ul>
<#list examples as example>
<li>${example}</li>
</#list>
</ul>
</#if>
<#else>
<p>No help available for this method.</p>
</#if>
</div>

View file

@ -1,11 +0,0 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- Template for displaying help for a template directive or method -->
<div class="dump help">
<h3>Template ${type} help</h3>
${help}
</div>
${stylesheets.add('<link rel="stylesheet" href="${urls.base}/css/dump.css" />')}

View file

@ -127,7 +127,6 @@ ${s2} => ${str.unCamelCase(s2)}<br />
<@dump var="fruit" />
<@dump var="trueStatement" />
<@dump var="zoo1" />
<@dump var="pojo" />
${scripts.add('<script type="text/javascript" src="${urls.base}/js/script1.js"></script>',
'<script type="text/javascript" src="${urls.base}/js/script2.js"></script>',
@ -139,6 +138,6 @@ ${scripts.add('<script type="text/javascript" src="${urls.base}/js/script1.js"><
<@help for="profileUrl" />
<@describe var="stylesheets" />