Permalink
Browse files

helpscreens placeholders now converted to the docbook V5 format inclu…

…sive of namespace support, updated the apache ofbiz document to explain how to create helpscreens, created an ftl template to display the docbook help screens, docbook pdf generation now almost working: it can create a local pdf file, but streaming to the browser does not work..if anybody interested to help me check modelscreenwidget.java line 1206

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@811787 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent d5b97a9 commit 48002ac0654f0fce9eec2a7b45163119e0b4652c @hansbak hansbak committed Sep 6, 2009
Showing with 601 additions and 231 deletions.
  1. +10 −2 applications/accounting/data/AccountingHelpData.xml
  2. +15 −7 applications/accounting/data/helpdata/HELP_ACCOUNTING.xml
  3. +39 −0 applications/accounting/data/helpdata/HELP_ACCOUNTING_main.xml
  4. +1 −1 applications/accounting/documents/Accounting.xml
  5. +1 −6 applications/commonext/data/CommonExtSeedData.xml
  6. +0 −1 applications/commonext/data/SystemInfoPortletData.xml
  7. +87 −15 applications/commonext/documents/ApacheOfbiz.xml
  8. +1 −1 applications/commonext/widget/HelpScreens.xml
  9. +2 −1 applications/component-load.xml
  10. +5 −0 applications/content/data/ContentHelpData.xml
  11. +1 −0 applications/content/data/ContentTypeData.xml
  12. +1 −108 applications/content/data/TemplateData.xml
  13. +9 −10 applications/content/data/helpdata/HELP_CONTENT.xml
  14. +38 −0 applications/content/data/helpdata/HELP_CONTENT_SITE_FindWeb.xml
  15. +16 −13 applications/content/data/helpdata/HELP_ROOT.xml
  16. +31 −0 applications/content/documents/Content.xml
  17. +1 −1 applications/content/src/org/ofbiz/content/content/ContentWorker.java
  18. +105 −0 applications/content/template/HelpTemplate.ftl
  19. +1 −1 applications/content/webapp/content/WEB-INF/controller.xml
  20. +29 −0 applications/party/data/PartyHelpData.xml
  21. +1 −0 applications/party/ofbiz-component.xml
  22. +5 −0 applications/product/data/ProductHelpData.xml
  23. +39 −0 applications/product/data/helpdata/HELP_PRODCATALOG_main.xml
  24. +20 −12 applications/product/data/helpdata/HELP_PRODUCT.xml
  25. +32 −0 applications/product/documents/Product.xml
  26. +4 −17 applications/workeffort/data/WorkEffortPortletData.xml
  27. +30 −0 applications/workeffort/data/helpdata/HELP_PORTLET_CALENDER.xml
  28. +3 −3 framework/common/webcommon/includes/helplink.ftl
  29. +2 −1 framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
  30. +66 −28 framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java
  31. +6 −3 specialpurpose/myportal/data/MyPortalTypeData.xml
@@ -18,7 +18,15 @@ specific language governing permissions and limitations
under the License.
-->
<entity-engine-xml>
- <DataResource dataResourceId="HELP_ACCOUNTING" localeString="en" dataResourceTypeId="OFBIZ_FILE" objectInfo="applications/accounting/data/helpdata/HELP_ACCOUNTING.xml" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Accounting Help" mimeTypeId="text/xml" isPublic="Y" />
- <Content contentId="HELP_ACCOUNTING" contentTypeId="DOCUMENT" contentName="Accounting Help" templateDataResourceId="HELP_TEMPL" dataResourceId="HELP_ACCOUNTING" statusId="CTNT_IN_PROGRESS" mimeTypeId="text/html"/>/>
+ <DataResource dataResourceId="HELP_ACCOUNTING" localeString="en" dataResourceTypeId="OFBIZ_FILE"
+ objectInfo="applications/accounting/data/helpdata/HELP_ACCOUNTING.xml" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS"
+ dataResourceName="Accounting Overview" mimeTypeId="text/xml" isPublic="Y" />
+ <Content contentId="HELP_ACCOUNTING" contentTypeId="DOCUMENT" contentName="Accounting Overview" templateDataResourceId="HELP_TEMPL"
+ dataResourceId="HELP_ACCOUNTING" statusId="CTNT_IN_PROGRESS" mimeTypeId="text/html"/>/>
<ContentAssoc contentId="HELP_ROOT" contentIdTo="HELP_ACCOUNTING" contentAssocTypeId="TREE_CHILD" fromDate="2006-01-12 01:01:01" sequenceNum="000"/>
+
+ <DataResource dataResourceId="ACCOUNTING_main" localeString="en" dataResourceTypeId="OFBIZ_FILE"
+ objectInfo="applications/accounting/data/helpdata/HELP_ACCOUNTING_main.xml" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Accounting Main Help" mimeTypeId="text/xml" isPublic="Y" />
+ <Content contentId="ACCOUNTING_main" contentTypeId="DOCUMENT" contentName="Accounting Main Help" templateDataResourceId="HELP_TEMPL" dataResourceId="ACCOUNTING_main" statusId="CTNT_IN_PROGRESS" mimeTypeId="text/html"/>/>
+ <ContentAssoc contentId="HELP_ACCOUNTING" contentIdTo="ACCOUNTING_main" contentAssocTypeId="TREE_CHILD" fromDate="2006-01-12 01:01:01" sequenceNum="000"/>
</entity-engine-xml>
@@ -17,15 +17,23 @@
specific language governing permissions and limitations
under the License.
-->
-<section xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- version="5.0"
+<section xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5.0"
xmlns:xl="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
- xsi:schemaLocation="http://docbook.org/ns/docbook ../../content/dtd/docbook.xsd"
+ xsi:schemaLocation="http://docbook.org/ns/docbook ../../../content/dtd/docbook.xsd"
xmlns="http://docbook.org/ns/docbook">
- <title>The help screen paragraph</title>
- <para>
- The help screen text for more information please see the <link xl:href="http://docs.ofbiz.org">OFBiz documentation site</link>
- </para>
+ <title>The Accounting Introduction</title>
+ <para>Introductory text</para>
+ <section>
+ <title>subsection heading</title>
+ <para>Subsection content</para>
+ </section>
+ <section>
+ <title>Subsection 2 title</title>
+ <para>
+ The Main accounting Introduction screen. For more information please
+ see the <link xl:href="http://docs.ofbiz.org">OFBiz documentation site</link> for more info.
+ </para>
+ </section>
</section>
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<section xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5.0"
+ xmlns:xl="http://www.w3.org/1999/xlink"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
+ xsi:schemaLocation="http://docbook.org/ns/docbook ../../../content/dtd/docbook.xsd"
+ xmlns="http://docbook.org/ns/docbook">
+ <title>The Main Accounting help screen</title>
+ <para>Introductory text</para>
+ <section>
+ <title>subsection heading</title>
+ <para>Subsection content</para>
+ </section>
+ <section>
+ <title>Subsection 2 title</title>
+ <para>
+ The Main accounting help screen. For more information please
+ see the <link xl:href="http://docs.ofbiz.org">OFBiz documentation site</link> for more info.
+ </para>
+ </section>
+</section>
+
@@ -28,5 +28,5 @@
and a introduction paragraph in Accounting
</para>
</section>
- <xi:include href="../data/helpdata/HELP_ACCOUNTING.xml" />
+ <xi:include href="../data/helpdata/HELP_ACCOUNTING_main.xml" />
</chapter>
@@ -18,9 +18,4 @@
under the License.
-->
<entity-engine-xml>
- <!-- create some keys to be sure all data will load the firs time -->
- <DataResource dataResourceId="HELP_TEMPL"/>
- <Content contentId="TREE_ROOT"/>
- <Content contentId="HELP_ROOT"/>
- <Content contentId="HELP_MYPORTAL"/>
-</entity-engine-xml>
+</entity-engine-xml>
@@ -35,6 +35,5 @@
screenLocation="component://commonext/widget/SystemInfoScreens.xml" description="List of system notes for this specific party"
screenshot="/images/portlets/SystemInfoStatus.png"/>
<PortletPortletCategory portalPortletId="SystemInfoStatus" portletCategoryId="SYSTEMINFO"/>
- <PortletCategory portletCategoryId="REPORT" description="Reports"/>
</entity-engine-xml>
@@ -64,31 +64,103 @@
</para>
</chapter>
<xi:include href="../../../applications/accounting/documents/Accounting.xml"/>
+ <xi:include href="../../../applications/product/documents/Product.xml"/>
+ <xi:include href="../../../applications/content/documents/Content.xml"/>
<xi:include href="../../../specialpurpose/myportal/documents/MyPortal.xml"/>
<anchor/>
<appendix>
<title>The Apache OFBiz documentation system</title>
- <para>
- The OFBiz documentation system consist out of a number of DocBook xml files. In general the files are stored within the subject component either in the 'documents' or data/helpdata directories.
- The 'master' document is stored in the file applications/commonext/documents/ApacheOfbiz.xml. The docbook schemas are stored in the applications/content/dtd directory and the stylesheets are
- stored in the applications/content/templates/docbook directory.
+
+ <section>
+ <title>Overview</title>
+ <para>
+ The OFBiz documentation system consist out of a number of DocBook xml
+ files. In general the files are stored within the subject
+ component either in the 'documents' or data/helpdata
+ directories.
+ The 'master' document is stored in the file
+ applications/commonext/documents/ApacheOfbiz.xml. The
+ docbook schemas are stored in the applications/content/dtd
+ directory and the stylesheets are
+ stored in the applications/content/templates/docbook directory.
</para>
- <para>
- the definition of the content and dataresource records can be found in the application/content/data/ContentType.xml file at the bottom. The are in this file because the documentation and helpfile
- are considered 'seed' data: essential for the operation of OFBiz.
+ <para>
+ the definition of the content and dataresource records can be found in
+ the application/content/data/ContentType.xml file at the
+ bottom. They are in this file because the documentation and
+ helpfile
+ are considered 'seed' data: essential for the operation of OFBiz.
</para>
- <para>
- If you are looking for docbook files format examples, please look at the following files:
+ <para>
+ If you are looking for docbook files format examples, please
+ look at the following files:
<orderedlist>
- <listitem><para>The master document at: applications/commonext/documents/ApacheOfbiz.xml</para></listitem>
- <listitem><para>An example for a chapter of a component at: applications/accounting/documents/Accounting.xml</para></listitem>
- <listitem><para>An example of a help screen: applications/accounting/data/helpdata/HELP_ACCOUNTING.xml</para>
- <note><para>Please note that we are currently creating the ftl files to show these help file properly</para></note>
+ <listitem>
+ <para>The master document at:
+ applications/commonext/documents/ApacheOfbiz.xml
+ </para>
+ </listitem>
+ <listitem>
+ <para>An example for a chapter of a component at:
+ applications/accounting/documents/Accounting.xml
+ </para>
+ </listitem>
+ <listitem>
+ <para>An example of a help screen:
+ applications/accounting/data/helpdata/HELP_ACCOUNTING_main.xml
+ </para>
+ </listitem>
+ <listitem>
+ <para>An example of content creation:
+ applications/accounting/data/AccountingHelpData.xml
+ </para>
</listitem>
</orderedlist>
-
- </para>
+ </para>
+ </section>
+
+ <section>
+ <title>Contributing a new help screen, a few steps</title>
+ <para>
+ So if you would like to create a new help menu for a certain
+ screen, you need to do the following:
+ <orderedlist>
+ <listitem>
+ <para>In the helplink.ftl un-comment the
+ ${helpTopic} variable so it will appear at the
+ top right hand of your screen</para>
+ </listitem>
+ <listitem>
+ <para>in the specific component data/helpData create
+ the HELP_${helpTopic}.xml file. you can find an
+ example in the HELP_ACCOUNTING_main.xml file.</para>
+ </listitem>
+ <listitem>
+ <para>Update/create the
+ data/${componentName}HelpData.xml, an example
+ can be found in the AccountingHelpData.xml. If
+ new make also an entry in the
+ ofbiz-component.xml</para>
+ </listitem>
+ <listitem>
+ <para>Load the HelpDataFile and the file should
+ show up when you click on the help button.
+ </para>
+ </listitem>
+ <listitem>
+ <para>Submit the change to the svn repository or
+ create a diff file and attach it to a jira
+ issue.</para>
+ </listitem>
+ <listitem>
+ <para>
+ If the help text is usefull in the ofbiz document include it in the files in the document directory.
+ </para>
+ </listitem>
+ </orderedlist>
+ </para>
+ </section>
</appendix>
</book>
@@ -79,7 +79,7 @@ under the License.
</condition>
<actions>
<set field="title" value="${uiLabelMap.CommonExtHelpTitle}"/>
- <set field="contentId" value="${parameters.contentId}" default-value="HELP_ROOT"/>
+ <set field="contentId" value="${parameters.helpTopic}" default-value="HELP_ROOT"/>
<entity-one entity-name="Content" value-field="content"/>
</actions>
<widgets>
@@ -20,7 +20,6 @@ under the License.
<component-loader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/component-loader.xsd">
- <load-component component-location="commonext"/><!-- common component used by most other components -->
<load-component component-location="party"/>
<load-component component-location="securityext"/>
<load-component component-location="content"/>
@@ -31,4 +30,6 @@ under the License.
<load-component component-location="humanres"/>
<load-component component-location="order"/>
<load-component component-location="marketing"/>
+<!-- common component used by most other components last because it uses info from most components-->
+ <load-component component-location="commonext"/>
</component-loader>
@@ -33,4 +33,9 @@ under the License.
<DataResource dataResourceId="HELP_CONTENT" localeString="en" dataResourceTypeId="OFBIZ_FILE" objectInfo="applications/content/data/helpdata/HELP_CONTENT.xml" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Content Manager Help" mimeTypeId="text/xml" isPublic="Y" />
<Content contentId="HELP_CONTENT" contentTypeId="DOCUMENT" contentName="Content Manager Help" templateDataResourceId="HELP_TEMPL" dataResourceId="HELP_CONTENT" statusId="CTNT_IN_PROGRESS" mimeTypeId="text/html"/>/>
<ContentAssoc contentId="HELP_ROOT" contentIdTo="HELP_CONTENT" contentAssocTypeId="TREE_CHILD" fromDate="2006-01-12 01:01:01" sequenceNum="050"/>
+
+ <DataResource dataResourceId="CONTENT_SITE_FindWeb" localeString="en" dataResourceTypeId="OFBIZ_FILE" objectInfo="applications/content/data/helpdata/HELP_CONTENT_SITE_FindWeb.xml" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Accounting Help" mimeTypeId="text/xml" isPublic="Y" />
+ <Content contentId="CONTENT_SITE_FindWeb" contentTypeId="DOCUMENT" contentName="Content Main Help" templateDataResourceId="HELP_TEMPL" dataResourceId="CONTENT_SITE_FindWeb" statusId="CTNT_IN_PROGRESS" mimeTypeId="text/html"/>/>
+ <ContentAssoc contentId="HELP_CONTENT" contentIdTo="CONTENT_SITE_FindWeb" contentAssocTypeId="TREE_CHILD" fromDate="2006-01-12 01:01:01" sequenceNum="000"/>
+
</entity-engine-xml>
@@ -261,6 +261,7 @@ under the License.
<WebSite webSiteId="CONTENT_SITE" siteName="Content Manager" visualThemeSetId="BACKOFFICE"/>
+ <Content contentId="TREE_ROOT"/>
<DataResource dataResourceId="DOCBOOK_HTML_TEMPL" dataResourceTypeId="OFBIZ_FILE" objectInfo="applications/content/template/docbook/html/docbook.xsl" dataTemplateTypeId="XSLT" statusId="CTNT_IN_PROGRESS" dataResourceName="Help template file" mimeTypeId="text/html" isPublic="Y"/>
<DataResource dataResourceId="DOCBOOK_PDF_TEMPL" dataResourceTypeId="OFBIZ_FILE" objectInfo="applications/content/template/docbook/fo/docbook.xsl" dataTemplateTypeId="XSLT" statusId="CTNT_IN_PROGRESS" dataResourceName="Help template file" mimeTypeId="text/html" isPublic="Y"/>
<DataResource dataResourceId="APACHE_OFBIZ" localeString="en" dataResourceTypeId="OFBIZ_FILE" objectInfo="applications/commonext/documents/ApacheOfbiz.xml" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Apache OFBiz document" mimeTypeId="text/xml" isPublic="Y" />
@@ -465,112 +465,5 @@ ${txt}
<!-- help template -->
-<DataResource dataResourceId="HELP_TEMPL" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="FTL" statusId="CTNT_IN_PROGRESS" dataResourceName="Help template file" mimeTypeId="text/html" isPublic="Y"/>
-<ElectronicText dataResourceId="HELP_TEMPL">
- <textData><![CDATA[
-<#if layoutSettings.VT_NAME[0] == "FLAT_GREY">
-<#--import applications/content/template/documentLib.ftl as doc/-->
-<#macro link text url>
- <a href="${url}">${text}</a>
-</#macro>
-
-<#macro text section>
- <#list section.* as t>
- <#if t?node_name == "text">
- ${t}
- <#elseif t?node_name == "link">
- <a href="${t.@url}">${t}</a>
- <#elseif t?node_name == "b">
- <b>${t}</b>
- <#elseif t?node_name == "ol">
- <ol>
- <#list t.* as i>
- <li class=h2>${i}</li>
- </#list>
- </ol><br/>
- </#if>
- </#list>
- <br/>
-</#macro>
-
-
-<div class="contentarea">
- <div id="column-container">
- <div id="content-main-section">
- <#if doc.root.definition?has_content>
- <h1>${uiLabelMap.CommonExtHelpDefinition}</h1>
- <p class=h2>${doc.root.definition}</p></br>
- </#if>
-
- <#if doc.root.usedFor?has_content>
- <h1>${uiLabelMap.CommonExtHelpUsedFor}</h1>
- <p class=h2>${doc.root.usedFor}</p></br>
- </#if>
-
- <#if doc.root.onScreen?has_content>
- <h1>${uiLabelMap.CommonExtHelpOnScreen}</h1>
- <p class=h2>${doc.root.onScreen}</p>
- </#if>
-
- <#if doc.root.general?has_content>
- <h1>${doc.root.generalTitle?if_exists}</h1>
- <#list doc.root.general.section as section>
- <p class=h2><@text section/></p>
- </#list>
- </#if>
-
- </div>
- </div>
-</div>
-
-<#elseif layoutSettings.VT_NAME[0] == "BIZZNESS_TIME">
- <#if doc.root.definition?has_content>
- <h1>${uiLabelMap.CommonExtHelpDefinition}</h1>
- <p class=h2>${doc.root.definition}</p></br>
- </#if>
-
- <#if doc.root.usedFor?has_content>
- <h1>${uiLabelMap.CommonExtHelpUsedFor}</h1>
- <p class=h2>${doc.root.usedFor}</p></br>
- </#if>
-
- <#if doc.root.onScreen?has_content>
- <h1>${uiLabelMap.CommonExtHelpOnScreen}</h1>
- <p class=h2>${doc.root.onScreen}</p>
- </#if>
-
- <#if doc.root.general?has_content>
- <h1>${doc.root.generalTitle?if_exists}</h1>
- <#list doc.root.general.section as section>
- <p class=h2>${section.text}</p>
- </#list>
- </#if>
-<#else>
- <#if doc.root.definition?has_content>
- <h1>${uiLabelMap.CommonExtHelpDefinition}</h1>
- <p class=h2>${doc.root.definition}</p></br>
- </#if>
-
- <#if doc.root.usedFor?has_content>
- <h1>${uiLabelMap.CommonExtHelpUsedFor}</h1>
- <p class=h2>${doc.root.usedFor}</p></br>
- </#if>
-
- <#if doc.root.onScreen?has_content>
- <h1>${uiLabelMap.CommonExtHelpOnScreen}</h1>
- <p class=h2>${doc.root.onScreen}</p>
- </#if>
-
- <#if doc.root.general?has_content>
- <h1>${doc.root.generalTitle?if_exists}</h1>
- <#list doc.root.general.section as section>
- <p class=h2>${section.text}</p>
- </#list>
- </#if>
-</#if>
-
-
- ]]></textData>
-</ElectronicText>
-
+<DataResource dataResourceId="HELP_TEMPL" dataResourceTypeId="OFBIZ_FILE" objectInfo="applications/content/template/HelpTemplate.ftl" dataTemplateTypeId="FTL" statusId="CTNT_IN_PROGRESS" dataResourceName="Help template file" mimeTypeId="text/html" isPublic="Y"/>
</entity-engine-xml>
Oops, something went wrong.

0 comments on commit 48002ac

Please sign in to comment.