Author: erwan
Date: Sun Feb 27 19:49:39 2011
New Revision: 1075125
URL: http://svn.apache.org/viewvc?rev=1075125&view=rev
Log:
Using the right syntax for caution, important, note, tip and warning in docbook documentation
Modified:
ofbiz/trunk/applications/content/template/HelpTemplate.ftl
ofbiz/trunk/framework/example/data/helpdata/HELP_EXAMPLE_docbook.xml
Modified: ofbiz/trunk/applications/content/template/HelpTemplate.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/template/HelpTemplate.ftl?rev=1075125&r1=1075124&r2=1075125&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/template/HelpTemplate.ftl (original)
+++ ofbiz/trunk/applications/content/template/HelpTemplate.ftl Sun Feb 27 19:49:39 2011
@@ -34,16 +34,6 @@ under the License.
<@itemizedlist node=child/>
<#elseif child?node_type = 'element' && child?node_name = "mediaobject">
<@mediaobject node=child/>
- <#elseif child?node_type = 'element' && child?node_name = "caution">
- <span class="caution">${child}</span>
- <#elseif child?node_type = 'element' && child?node_name = "important">
- <span class="important">${child}</span>
- <#elseif child?node_type = 'element' && child?node_name = "note">
- <span class="note">${child}</span>
- <#elseif child?node_type = 'element' && child?node_name = "tip">
- <span class="tip">${child}</span>
- <#elseif child?node_type = 'element' && child?node_name = "warning">
- <span class="warning">${child}</span>
</#if>
</#list>
</#macro>
@@ -51,7 +41,7 @@ under the License.
<#macro section inSection level first="no">
<#list inSection.* as subSection>
<#if subSection?node_name = "title">
- <#if first = "yes">
+ <#if first = "yes">
<h1>${subSection}</h1>
<#else>
<br /><h${level}>${subSection}</h${level}>
@@ -65,6 +55,16 @@ under the License.
<@orderedlist node=subSection/>
<#elseif subSection?node_name = "itemizedlist">
<@itemizedlist node=subSection/>
+ <#elseif subSection?node_name = "caution">
+ <span class="caution"><@admonition node=subSection/></span>
+ <#elseif subSection?node_name = "important">
+ <span class="important"><@admonition node=subSection/></span>
+ <#elseif subSection?node_name = "note">
+ <span class="note"><@admonition node=subSection/></span>
+ <#elseif subSection?node_name = "tip">
+ <span class="tip"><@admonition node=subSection/></span>
+ <#elseif subSection?node_name = "warning">
+ <span class="warning"><@admonition node=subSection/></span>
</#if>
</#list>
</#macro>
@@ -107,6 +107,16 @@ under the License.
<@text text=para/>
</#macro>
+<#macro admonition node>
+ <#list node.* as subSection>
+ <#if subSection?node_name = "title">
+ <h3>${subSection}</h3>
+ <#elseif subSection?node_name = "para">
+ <p><@para para=subSection/></p>
+ </#if>
+ </#list>
+</#macro>
+
<div class="contentarea">
<div id="column-container">
<div id="content-main-section">
Modified: ofbiz/trunk/framework/example/data/helpdata/HELP_EXAMPLE_docbook.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/data/helpdata/HELP_EXAMPLE_docbook.xml?rev=1075125&r1=1075124&r2=1075125&view=diff
==============================================================================
--- ofbiz/trunk/framework/example/data/helpdata/HELP_EXAMPLE_docbook.xml (original)
+++ ofbiz/trunk/framework/example/data/helpdata/HELP_EXAMPLE_docbook.xml Sun Feb 27 19:49:39
2011
@@ -49,10 +49,24 @@ under the License.
<section>
<title>Examples of text formatting</title>
- <para><caution>Here is a caution text</caution></para>
- <para><important>Here is an important text</important></para>
- <para><note>Here is a note</note></para>
- <para><tip>Here is a tip</tip></para>
- <para><warning>Here is a warning</warning></para>
+ <caution>
+ <title>Caution title</title>
+ <para>Here is a caution text</para>
+ </caution>
+ <important>
+ <title>Important title</title>
+ <para>Here is an important text</para>
+ </important>
+ <note>
+ <title>Note title</title>
+ <para>Here is a note</para>
+ </note>
+ <tip>
+ <title>Tip title</title>
+ <para>Here is a tip</para>
+ </tip>
+ <warning>
+ <para>Here is a warning</para>
+ </warning>
</section>
</section>
|