Author: jleroux
Date: Wed Dec  2 14:32:48 2009
New Revision: 886157

URL: http://svn.apache.org/viewvc?rev=886157&view=rev
Log:
A patch from Erwan de FERRIERES "Add the images in docbook help" 
(https://issues.apache.org/jira/browse/OFBIZ-3280) - OFBIZ-3280
In this new version, I :
    * removed the graphic tag
    * added the mediaobject tag
    * updated the selenium help page

Modified:
    ofbiz/trunk/applications/content/template/HelpTemplate.ftl
    ofbiz/trunk/framework/testtools/data/helpdata/HELP_WEBTOOLS_selenium.xml

Modified: ofbiz/trunk/applications/content/template/HelpTemplate.ftl
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/template/HelpTemplate.ftl?rev=886157&r1=886156&r2=886157&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/template/HelpTemplate.ftl (original)
+++ ofbiz/trunk/applications/content/template/HelpTemplate.ftl Wed Dec  2 
14:32:48 2009
@@ -32,8 +32,8 @@
      <@orderedlist node=child/>
     <#elseif child?node_type = 'element' && child?node_name = "itemizedlist">
      <@itemizedlist node=child/>
-    <#elseif child?node_type = 'element' && child?node_name = "graphic">
-      <img src="${child["@fileref"]}" height="${child["@height"]}" 
width="${child["@width"]}"/>
+    <#elseif child?node_type = 'element' && child?node_name = "mediaobject">
+      <@mediaobject node=child/>
     </#if>
   </#list>
 </#macro>
@@ -76,7 +76,21 @@
   <ul class=dots><@listItems node=node/></ul>
 </#macro>
 
-
+<#macro mediaobject node>
+  <#list node?children as item>
+    <#if item?node_type = "element" && item?node_name = "imageobject">
+        <#assign fileref = item.imagedata["@fileref"]/>
+        <#assign depth = item.imagedata["@depth"]/>
+        <#assign width = item.imagedata["@width"]/>
+    <#elseif item?node_type = "element" && item?node_name = "textobject">
+        <#assign alt = item.phrase/>
+    <#elseif item?node_type = "element" && item?node_name = "caption">
+        <#assign caption = item/>
+    </#if>
+  </#list>
+  <img src="${fileref}" <#if depth?has_content> height="${depth}"</#if> <#if 
width?has_content> width="${width}"</#if> <#if alt?has_content> 
alt="${alt}"</#if>/>
+  <#if caption?has_content><div>${caption}</div></#if>
+</#macro>
 
 <#macro para para>
   <@text text=para/>

Modified: 
ofbiz/trunk/framework/testtools/data/helpdata/HELP_WEBTOOLS_selenium.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/testtools/data/helpdata/HELP_WEBTOOLS_selenium.xml?rev=886157&r1=886156&r2=886157&view=diff
==============================================================================
--- ofbiz/trunk/framework/testtools/data/helpdata/HELP_WEBTOOLS_selenium.xml 
(original)
+++ ofbiz/trunk/framework/testtools/data/helpdata/HELP_WEBTOOLS_selenium.xml 
Wed Dec  2 14:32:48 2009
@@ -78,7 +78,13 @@
                     remove this at the start of the test if you don't want the 
delay</para>
                 <para>- Here are some screen shots of what you should be 
seeing.</para>
                 <para>
-                    <graphic fileref="/images/help/ofbizSeleniumSetup1.png" 
height="478" width="638"/>
+                    <mediaobject>
+                        <imageobject>
+                            <imagedata 
fileref="/images/help/ofbizSeleniumSetup1.png" width="638" depth="478"/>
+                        </imageobject>
+                        <textobject><phrase>Selenium server in 
action</phrase></textobject>
+                        <caption>This is a screen capture when Selenium server 
is launched</caption>
+                    </mediaobject>
                 </para>
             </section>
             <section>


Reply via email to