NIHVIVO-564 Modifications to directive help output. Included changing template directive iface to an abstract class that provides a default help() method and some utilities.
This commit is contained in:
parent
677dfb18d0
commit
5e8eb80732
7 changed files with 95 additions and 54 deletions
|
@ -0,0 +1,38 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- Template for displaying directive help -->
|
||||
|
||||
<div class="dump directive">
|
||||
<p><strong>Directive name:</strong> ${name}</p>
|
||||
|
||||
<#if usage??>
|
||||
<p><strong>Usage:</strong> ${usage}</p>
|
||||
|
||||
<#if comments??>
|
||||
<p><strong>Comments:</strong> ${comments}</p>
|
||||
</#if>
|
||||
|
||||
<h6>Parameters:</h6>
|
||||
<#if params?? && params?keys?has_content>
|
||||
<ul>
|
||||
<#list params?keys as param>
|
||||
<li><strong>${param}:</strong> ${params[param]}</li>
|
||||
</#list>
|
||||
</ul>
|
||||
<#else>
|
||||
<p>none</p>
|
||||
</#if>
|
||||
|
||||
<h6>Examples:</h6>
|
||||
<#if examples??>
|
||||
<ul>
|
||||
<#list examples as example>
|
||||
<li>${example}</li>
|
||||
</#list>
|
||||
</ul>
|
||||
</#if>
|
||||
|
||||
<#else>
|
||||
<p>No help available for this directive.</p>
|
||||
</#if>
|
||||
</div>
|
|
@ -15,12 +15,10 @@
|
|||
</ul>
|
||||
|
||||
<h4>DIRECTIVES</h4>
|
||||
|
||||
<ul>
|
||||
<#list directives?keys as directive>
|
||||
<li class="dump directive">
|
||||
<p><strong>Directive name:</strong> ${directive}</p>
|
||||
${directives[directive]!"no help available for this directive"}
|
||||
</li>
|
||||
<li>${directives[directive]}</li>
|
||||
</#list>
|
||||
</ul>
|
||||
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
|
||||
|
||||
<#-- Template for dumping directive help -->
|
||||
|
||||
<p><strong>Usage:</strong> ${usage!}</p>
|
||||
|
||||
<#if comments??>
|
||||
<p><strong>Comments:</strong> ${comments}</p>
|
||||
</#if>
|
||||
|
||||
<h6>Parameters:</h6>
|
||||
<#if params?? && params?keys?has_content>
|
||||
<ul>
|
||||
<#list params?keys as param>
|
||||
<li><strong>${param}:</strong> ${params[param]}</li>
|
||||
</#list>
|
||||
</ul>
|
||||
<#else>
|
||||
<p>none</p>
|
||||
</#if>
|
||||
|
||||
<h6>Examples:</h6>
|
||||
<#if examples??>
|
||||
<ul>
|
||||
<#list examples as example>
|
||||
<li>${example}</li>
|
||||
</#list>
|
||||
</ul>
|
||||
</#if>
|
Loading…
Add table
Add a link
Reference in a new issue