Author: hansbak
Date: Sun Sep 6 09:39:20 2009 New Revision: 811787 URL: http://svn.apache.org/viewvc?rev=811787&view=rev Log: helpscreens placeholders now converted to the docbook V5 format inclusive 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 Added: ofbiz/trunk/applications/accounting/data/helpdata/HELP_ACCOUNTING_main.xml - copied, changed from r810801, ofbiz/trunk/applications/accounting/data/helpdata/HELP_ACCOUNTING.xml ofbiz/trunk/applications/content/data/helpdata/HELP_CONTENT_SITE_FindWeb.xml (with props) ofbiz/trunk/applications/content/documents/ ofbiz/trunk/applications/content/documents/Content.xml (with props) ofbiz/trunk/applications/content/template/HelpTemplate.ftl (with props) ofbiz/trunk/applications/party/data/PartyHelpData.xml (with props) ofbiz/trunk/applications/product/data/helpdata/HELP_PRODCATALOG_main.xml - copied, changed from r810759, ofbiz/trunk/applications/product/data/helpdata/HELP_PRODUCT.xml ofbiz/trunk/applications/product/documents/ ofbiz/trunk/applications/product/documents/Product.xml (with props) ofbiz/trunk/applications/workeffort/data/helpdata/ ofbiz/trunk/applications/workeffort/data/helpdata/HELP_PORTLET_CALENDER.xml (with props) Modified: ofbiz/trunk/applications/accounting/data/AccountingHelpData.xml ofbiz/trunk/applications/accounting/data/helpdata/HELP_ACCOUNTING.xml ofbiz/trunk/applications/accounting/documents/Accounting.xml ofbiz/trunk/applications/commonext/data/CommonExtSeedData.xml ofbiz/trunk/applications/commonext/data/SystemInfoPortletData.xml ofbiz/trunk/applications/commonext/documents/ApacheOfbiz.xml ofbiz/trunk/applications/commonext/widget/HelpScreens.xml ofbiz/trunk/applications/component-load.xml ofbiz/trunk/applications/content/data/ContentHelpData.xml ofbiz/trunk/applications/content/data/ContentTypeData.xml ofbiz/trunk/applications/content/data/TemplateData.xml ofbiz/trunk/applications/content/data/helpdata/HELP_CONTENT.xml ofbiz/trunk/applications/content/data/helpdata/HELP_ROOT.xml ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml ofbiz/trunk/applications/party/ofbiz-component.xml ofbiz/trunk/applications/product/data/ProductHelpData.xml ofbiz/trunk/applications/product/data/helpdata/HELP_PRODUCT.xml ofbiz/trunk/applications/workeffort/data/WorkEffortPortletData.xml ofbiz/trunk/framework/common/webcommon/includes/helplink.ftl ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java ofbiz/trunk/specialpurpose/myportal/data/MyPortalTypeData.xml Modified: ofbiz/trunk/applications/accounting/data/AccountingHelpData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/data/AccountingHelpData.xml?rev=811787&r1=811786&r2=811787&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/data/AccountingHelpData.xml (original) +++ ofbiz/trunk/applications/accounting/data/AccountingHelpData.xml Sun Sep 6 09:39:20 2009 @@ -18,7 +18,15 @@ 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> Modified: ofbiz/trunk/applications/accounting/data/helpdata/HELP_ACCOUNTING.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/data/helpdata/HELP_ACCOUNTING.xml?rev=811787&r1=811786&r2=811787&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/data/helpdata/HELP_ACCOUNTING.xml (original) +++ ofbiz/trunk/applications/accounting/data/helpdata/HELP_ACCOUNTING.xml Sun Sep 6 09:39:20 2009 @@ -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> Copied: ofbiz/trunk/applications/accounting/data/helpdata/HELP_ACCOUNTING_main.xml (from r810801, ofbiz/trunk/applications/accounting/data/helpdata/HELP_ACCOUNTING.xml) URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/data/helpdata/HELP_ACCOUNTING_main.xml?p2=ofbiz/trunk/applications/accounting/data/helpdata/HELP_ACCOUNTING_main.xml&p1=ofbiz/trunk/applications/accounting/data/helpdata/HELP_ACCOUNTING.xml&r1=810801&r2=811787&rev=811787&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/data/helpdata/HELP_ACCOUNTING.xml (original) +++ ofbiz/trunk/applications/accounting/data/helpdata/HELP_ACCOUNTING_main.xml Sun Sep 6 09:39:20 2009 @@ -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 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> Modified: ofbiz/trunk/applications/accounting/documents/Accounting.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/documents/Accounting.xml?rev=811787&r1=811786&r2=811787&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/documents/Accounting.xml (original) +++ ofbiz/trunk/applications/accounting/documents/Accounting.xml Sun Sep 6 09:39:20 2009 @@ -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> Modified: ofbiz/trunk/applications/commonext/data/CommonExtSeedData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/data/CommonExtSeedData.xml?rev=811787&r1=811786&r2=811787&view=diff ============================================================================== --- ofbiz/trunk/applications/commonext/data/CommonExtSeedData.xml (original) +++ ofbiz/trunk/applications/commonext/data/CommonExtSeedData.xml Sun Sep 6 09:39:20 2009 @@ -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> \ No newline at end of file +</entity-engine-xml> Modified: ofbiz/trunk/applications/commonext/data/SystemInfoPortletData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/data/SystemInfoPortletData.xml?rev=811787&r1=811786&r2=811787&view=diff ============================================================================== --- ofbiz/trunk/applications/commonext/data/SystemInfoPortletData.xml (original) +++ ofbiz/trunk/applications/commonext/data/SystemInfoPortletData.xml Sun Sep 6 09:39:20 2009 @@ -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> \ No newline at end of file Modified: ofbiz/trunk/applications/commonext/documents/ApacheOfbiz.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/documents/ApacheOfbiz.xml?rev=811787&r1=811786&r2=811787&view=diff ============================================================================== --- ofbiz/trunk/applications/commonext/documents/ApacheOfbiz.xml (original) +++ ofbiz/trunk/applications/commonext/documents/ApacheOfbiz.xml Sun Sep 6 09:39:20 2009 @@ -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> \ No newline at end of file Modified: ofbiz/trunk/applications/commonext/widget/HelpScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/widget/HelpScreens.xml?rev=811787&r1=811786&r2=811787&view=diff ============================================================================== --- ofbiz/trunk/applications/commonext/widget/HelpScreens.xml (original) +++ ofbiz/trunk/applications/commonext/widget/HelpScreens.xml Sun Sep 6 09:39:20 2009 @@ -79,7 +79,7 @@ </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> Modified: ofbiz/trunk/applications/component-load.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/component-load.xml?rev=811787&r1=811786&r2=811787&view=diff ============================================================================== --- ofbiz/trunk/applications/component-load.xml (original) +++ ofbiz/trunk/applications/component-load.xml Sun Sep 6 09:39:20 2009 @@ -20,7 +20,6 @@ <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 @@ <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> Modified: ofbiz/trunk/applications/content/data/ContentHelpData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/data/ContentHelpData.xml?rev=811787&r1=811786&r2=811787&view=diff ============================================================================== --- ofbiz/trunk/applications/content/data/ContentHelpData.xml (original) +++ ofbiz/trunk/applications/content/data/ContentHelpData.xml Sun Sep 6 09:39:20 2009 @@ -33,4 +33,9 @@ <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> Modified: ofbiz/trunk/applications/content/data/ContentTypeData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/data/ContentTypeData.xml?rev=811787&r1=811786&r2=811787&view=diff ============================================================================== --- ofbiz/trunk/applications/content/data/ContentTypeData.xml (original) +++ ofbiz/trunk/applications/content/data/ContentTypeData.xml Sun Sep 6 09:39:20 2009 @@ -261,6 +261,7 @@ <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" /> Modified: ofbiz/trunk/applications/content/data/TemplateData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/data/TemplateData.xml?rev=811787&r1=811786&r2=811787&view=diff ============================================================================== --- ofbiz/trunk/applications/content/data/TemplateData.xml (original) +++ ofbiz/trunk/applications/content/data/TemplateData.xml Sun Sep 6 09:39:20 2009 @@ -465,112 +465,5 @@ <!-- 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> Modified: ofbiz/trunk/applications/content/data/helpdata/HELP_CONTENT.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/data/helpdata/HELP_CONTENT.xml?rev=811787&r1=811786&r2=811787&view=diff ============================================================================== --- ofbiz/trunk/applications/content/data/helpdata/HELP_CONTENT.xml (original) +++ ofbiz/trunk/applications/content/data/helpdata/HELP_CONTENT.xml Sun Sep 6 09:39:20 2009 @@ -17,13 +17,12 @@ specific language governing permissions and limitations under the License. --> -<root> - <generalTitle> - The Content Manager. - </generalTitle> - <general> - <section> - <text>The Content Management System (CMS) is designed to store data once and then allow it to be reused in multiple arrangements.</text> - </section> - </general> -</root> +<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 Content Manager Overview</title> + <para>The Document Content Management System (DMS/CMS) is designed to store data once and then allow it to be reused in multiple arrangements.</para> +</section> + Added: ofbiz/trunk/applications/content/data/helpdata/HELP_CONTENT_SITE_FindWeb.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/data/helpdata/HELP_CONTENT_SITE_FindWeb.xml?rev=811787&view=auto ============================================================================== --- ofbiz/trunk/applications/content/data/helpdata/HELP_CONTENT_SITE_FindWeb.xml (added) +++ ofbiz/trunk/applications/content/data/helpdata/HELP_CONTENT_SITE_FindWeb.xml Sun Sep 6 09:39:20 2009 @@ -0,0 +1,38 @@ +<?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 Content help screen</title> + <para>Introductory text for the content component</para> + <section> + <title>subsection heading</title> + <para>Subsection content</para> + </section> + <section> + <title>Subsection 2 title</title> + <para> + for more info see the <link xl:href="http://docs.ofbiz.org">OFBiz documentation site</link> for more info. + </para> + </section> +</section> + Propchange: ofbiz/trunk/applications/content/data/helpdata/HELP_CONTENT_SITE_FindWeb.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/content/data/helpdata/HELP_CONTENT_SITE_FindWeb.xml ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/applications/content/data/helpdata/HELP_CONTENT_SITE_FindWeb.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Modified: ofbiz/trunk/applications/content/data/helpdata/HELP_ROOT.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/data/helpdata/HELP_ROOT.xml?rev=811787&r1=811786&r2=811787&view=diff ============================================================================== --- ofbiz/trunk/applications/content/data/helpdata/HELP_ROOT.xml (original) +++ ofbiz/trunk/applications/content/data/helpdata/HELP_ROOT.xml Sun Sep 6 09:39:20 2009 @@ -17,17 +17,20 @@ specific language governing permissions and limitations under the License. --> -<root> - <generalTitle> - Welcome to the Apache OFBiz help system - </generalTitle> - <general> - <section> - <text>If you arrived at this page </text><b>without</b><text> selecting the index, then a specific help page was </text><b>not</b><text> yet available</text> - </section> - <section> - <text>This system will provide you context sensitive help throughout the system.</text> - </section> - </general> -</root> +<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>Welcome to the Apache OFBiz help system</title> + <section> + <para>If you arrived at this page without selecting the index, + then a specific help page was yet available</para> + </section> + <section> + <para> + This system will provide you context sensitive help throughout the + system. + </para> + </section> +</section> Added: ofbiz/trunk/applications/content/documents/Content.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/documents/Content.xml?rev=811787&view=auto ============================================================================== --- ofbiz/trunk/applications/content/documents/Content.xml (added) +++ ofbiz/trunk/applications/content/documents/Content.xml Sun Sep 6 09:39:20 2009 @@ -0,0 +1,31 @@ +<?xml version="1.0"?> +<!-- + 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. +--> +<chapter 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 Content Component</title> + <section> + <title>Introduction</title> + <para> + and a introduction paragraph for he content component + </para> + </section> +</chapter> Propchange: ofbiz/trunk/applications/content/documents/Content.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/content/documents/Content.xml ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/applications/content/documents/Content.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java?rev=811787&r1=811786&r2=811787&view=diff ============================================================================== --- ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java (original) +++ ofbiz/trunk/applications/content/src/org/ofbiz/content/content/ContentWorker.java Sun Sep 6 09:39:20 2009 @@ -274,7 +274,7 @@ throw new GeneralException(e.getMessage()); } - // This part is using an xml file as the input data and an ftl file to present it. + // This part is using an xml file as the input data and an ftl or xsl file to present it. if (UtilValidate.isNotEmpty(mimeType)) { if (mimeType.toLowerCase().indexOf("xml") >= 0) { GenericValue dataResource = delegator.findByPrimaryKey("DataResource", UtilMisc.toMap("dataResourceId", dataResourceId)); Added: ofbiz/trunk/applications/content/template/HelpTemplate.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/template/HelpTemplate.ftl?rev=811787&view=auto ============================================================================== --- ofbiz/trunk/applications/content/template/HelpTemplate.ftl (added) +++ ofbiz/trunk/applications/content/template/HelpTemplate.ftl Sun Sep 6 09:39:20 2009 @@ -0,0 +1,105 @@ +<#ftl ns_prefixes={ + "D":"http://docbook.org/ns/docbook", + "xl":"http://www.w3.org/1999/xlink" + }> +<#--^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ must be at the top of the file........--> +<#-- +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. +--> + +<#if layoutSettings.VT_NAME[0] == "FLAT_GREY"> +<#-------------------------------------------> +<#macro para para> +<p> + <#list para?children as child> + <#if child?node_type = "text"> + ${child} + <#elseif child?node_type = 'element' && child?node_name = "link"> + <a href="${child["@xl:href"]}">${child}</a> + </#if> + </#list> + <br/> +</p> +</#macro> + +<#macro section inSection first="no"> + <#list inSection.* as subSection> + <#if subSection?node_name = "title"> + <#if first = "yes"> + <h1>${subSection}</h1> + <#else> + <h2>${subSection}</h2> + </#if> + <#elseif subSection?node_name = "para"> + <@para para=subSection/> + <#elseif subSection?node_name = "section"> + <@section inSection=subSection/> + </#if> + </#list> + <br/><br/> +</#macro> + +<div class="contentarea"> + <div id="column-container"> + <div id="content-main-section"> + <@section inSection=doc.section first="yes"/> + </div> + </div> +</div> + +<#else><#-- other templates --> +<#-----------------------------> +<#macro para para> +<p> + <#list para?children as child> + <#if child?node_type = "text"> + ${child} + <#elseif child?node_type = 'element' && child?node_name = "link"> + <a href="${child["@xl:href"]}">${child}</a> + </#if> + </#list> + <br/> +</p> +</#macro> + +<#macro section inSection first="no"> + <#list inSection.* as subSection> + <#if subSection?node_name = "title"> + <#if first = "yes"> + <h1>${subSection}</h1> + <#else> + <h2>${subSection}</h2> + </#if> + <#elseif subSection?node_name = "para"> + <@para para=subSection/> + <#elseif subSection?node_name = "section"> + <@section inSection=subSection/> + </#if> + </#list> + <br/><br/> +</#macro> + +<div class="contentarea"> + <div id="column-container"> + <div id="content-main-section"> + <@section inSection=doc.section first="yes"/> + </div> + </div> +</div> + +</#if> \ No newline at end of file Propchange: ofbiz/trunk/applications/content/template/HelpTemplate.ftl ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/content/template/HelpTemplate.ftl ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/applications/content/template/HelpTemplate.ftl ------------------------------------------------------------------------------ svn:mime-type = text/plain Modified: ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml?rev=811787&r1=811786&r2=811787&view=diff ============================================================================== --- ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml (original) +++ ofbiz/trunk/applications/content/webapp/content/WEB-INF/controller.xml Sun Sep 6 09:39:20 2009 @@ -1966,7 +1966,7 @@ <view-map name="EditDocument" type="screen" page="component://content/widget/content/ContentScreens.xml#EditDocument"/> <view-map name="ListDocument" type="screen" page="component://content/widget/content/ContentScreens.xml#ListDocument"/> <view-map name="showContent" type="screen" page="component://content/widget/content/ContentScreens.xml#ShowContent"/> - <view-map name="showContentPdf" type="screen" page="component://content/widget/content/ContentScreens.xml#ShowContent" content-type="application/pdf"/> + <view-map name="showContentPdf" type="screen" page="component://content/widget/content/ContentScreens.xml#ShowContent" content-type="application/pdf" encoding="none"/> <!-- end of view mappings --> </site-conf> Added: ofbiz/trunk/applications/party/data/PartyHelpData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/data/PartyHelpData.xml?rev=811787&view=auto ============================================================================== --- ofbiz/trunk/applications/party/data/PartyHelpData.xml (added) +++ ofbiz/trunk/applications/party/data/PartyHelpData.xml Sun Sep 6 09:39:20 2009 @@ -0,0 +1,29 @@ +<?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. +--> +<entity-engine-xml> + <!-- party is first component loaded so need these files --> + <Content contentId="HELP_MYPORTAL"/><!-- portlets are in most components --> + <Content contentId="HELP_ROOT"/><!-- should be in the first component loaded --> + <PortletCategory portletCategoryId="REPORT" description="Reports"/> + <DataResource dataResourceId="HELP_TEMPL"/><!-- further defined in the content component --> + + <!-- other files --> + +</entity-engine-xml> Propchange: ofbiz/trunk/applications/party/data/PartyHelpData.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/party/data/PartyHelpData.xml ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/applications/party/data/PartyHelpData.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Modified: ofbiz/trunk/applications/party/ofbiz-component.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/ofbiz-component.xml?rev=811787&r1=811786&r2=811787&view=diff ============================================================================== --- ofbiz/trunk/applications/party/ofbiz-component.xml (original) +++ ofbiz/trunk/applications/party/ofbiz-component.xml Sun Sep 6 09:39:20 2009 @@ -26,6 +26,7 @@ <classpath type="dir" location="config"/> <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel.xml"/> + <entity-resource type="data" reader-name="seed" loader="main" location="data/PartyHelpData.xml"/> <entity-resource type="data" reader-name="seed" loader="main" location="data/PartyTypeData.xml"/> <entity-resource type="data" reader-name="seed" loader="main" location="data/PartySecurityData.xml"/> <entity-resource type="data" reader-name="seed" loader="main" location="data/PartyGeoPointData.xml"/> Modified: ofbiz/trunk/applications/product/data/ProductHelpData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/data/ProductHelpData.xml?rev=811787&r1=811786&r2=811787&view=diff ============================================================================== --- ofbiz/trunk/applications/product/data/ProductHelpData.xml (original) +++ ofbiz/trunk/applications/product/data/ProductHelpData.xml Sun Sep 6 09:39:20 2009 @@ -21,4 +21,9 @@ <DataResource dataResourceId="HELP_PRODUCT" localeString="en" dataResourceTypeId="OFBIZ_FILE" objectInfo="applications/product/data/helpdata/HELP_PRODUCT.xml" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Help system Product" mimeTypeId="text/xml" isPublic="Y" /> <Content contentId="HELP_PRODUCT" contentTypeId="DOCUMENT" localeString="en" contentName="Catalog Manager Help" templateDataResourceId="HELP_TEMPL" dataResourceId="HELP_PRODUCT" statusId="CTNT_IN_PROGRESS" mimeTypeId="text/html"/>/> <ContentAssoc contentId="HELP_ROOT" contentIdTo="HELP_PRODUCT" contentAssocTypeId="TREE_CHILD" fromDate="2006-01-12 01:01:01" sequenceNum="020"/> + + <DataResource dataResourceId="PRODCATALOG_main" localeString="en" dataResourceTypeId="OFBIZ_FILE" objectInfo="applications/product/data/helpdata/HELP_PRODCATALOG_main.xml" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Accounting Help" mimeTypeId="text/xml" isPublic="Y" /> + <Content contentId="PRODCATALOG_main" contentTypeId="DOCUMENT" contentName="Main Catalog Help" templateDataResourceId="HELP_TEMPL" dataResourceId="PRODCATALOG_main" statusId="CTNT_IN_PROGRESS" mimeTypeId="text/html"/>/> + <ContentAssoc contentId="HELP_PRODUCT" contentIdTo="PRODCATALOG_main" contentAssocTypeId="TREE_CHILD" fromDate="2006-01-12 01:01:01" sequenceNum="000"/> + </entity-engine-xml> Copied: ofbiz/trunk/applications/product/data/helpdata/HELP_PRODCATALOG_main.xml (from r810759, ofbiz/trunk/applications/product/data/helpdata/HELP_PRODUCT.xml) URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/data/helpdata/HELP_PRODCATALOG_main.xml?p2=ofbiz/trunk/applications/product/data/helpdata/HELP_PRODCATALOG_main.xml&p1=ofbiz/trunk/applications/product/data/helpdata/HELP_PRODUCT.xml&r1=810759&r2=811787&rev=811787&view=diff ============================================================================== --- ofbiz/trunk/applications/product/data/helpdata/HELP_PRODUCT.xml (original) +++ ofbiz/trunk/applications/product/data/helpdata/HELP_PRODCATALOG_main.xml Sun Sep 6 09:39:20 2009 @@ -17,15 +17,23 @@ specific language governing permissions and limitations under the License. --> -<root> - <generalTitle> - The Catalog Manager. - </generalTitle> - <general> - <section> - <text> - The Catalog Manager creates and provides access to a variety of information related to Products, Catalogs, or Categories. - </text> - </section> - </general> -</root> +<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 Product Catalog overview</title> + <para>Introduction</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> + Modified: ofbiz/trunk/applications/product/data/helpdata/HELP_PRODUCT.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/data/helpdata/HELP_PRODUCT.xml?rev=811787&r1=811786&r2=811787&view=diff ============================================================================== --- ofbiz/trunk/applications/product/data/helpdata/HELP_PRODUCT.xml (original) +++ ofbiz/trunk/applications/product/data/helpdata/HELP_PRODUCT.xml Sun Sep 6 09:39:20 2009 @@ -17,15 +17,23 @@ specific language governing permissions and limitations under the License. --> -<root> - <generalTitle> - The Catalog Manager. - </generalTitle> - <general> - <section> - <text> - The Catalog Manager creates and provides access to a variety of information related to Products, Catalogs, or Categories. - </text> - </section> - </general> -</root> +<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 Catalog overview screen help screen</title> + <para>Introduction</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> + Added: ofbiz/trunk/applications/product/documents/Product.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/documents/Product.xml?rev=811787&view=auto ============================================================================== --- ofbiz/trunk/applications/product/documents/Product.xml (added) +++ ofbiz/trunk/applications/product/documents/Product.xml Sun Sep 6 09:39:20 2009 @@ -0,0 +1,32 @@ +<?xml version="1.0"?> +<!-- + 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. +--> +<chapter 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 Product Catalog Component</title> + <section> + <title>Introduction Paragraph</title> + <para> + and a introduction paragraph + </para> + </section> + <xi:include href="../data/helpdata/HELP_PRODCATALOG_main.xml" /> +</chapter> Propchange: ofbiz/trunk/applications/product/documents/Product.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/product/documents/Product.xml ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/applications/product/documents/Product.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Modified: ofbiz/trunk/applications/workeffort/data/WorkEffortPortletData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/data/WorkEffortPortletData.xml?rev=811787&r1=811786&r2=811787&view=diff ============================================================================== --- ofbiz/trunk/applications/workeffort/data/WorkEffortPortletData.xml (original) +++ ofbiz/trunk/applications/workeffort/data/WorkEffortPortletData.xml Sun Sep 6 09:39:20 2009 @@ -29,23 +29,10 @@ editFormLocation="component://workeffort/widget/CalendarForms.xml" screenshot="/images/portlets/Calendar.png"/> <PortletPortletCategory portalPortletId="Calendar" portletCategoryId="EVENTSTASKS"/> - <DataResource dataResourceId="HELP_Calendar" localeString="en" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Calendar help file" mimeTypeId="text/xml" isPublic="Y" /> - <ElectronicText dataResourceId="HELP_Calendar"> - <textData><![CDATA[ - <root> - <definition> - This Calendar portler will show events for a certain person, facility or fixed asset - </definition> - <usedFor> - It provides an overview on a dayly/weekly/or month period. - </usedFor> - <onScreen> - You will see the particular view with the ability to add an event. - </onScreen> - </root> - ]]></textData> - </ElectronicText> - <Content contentId="HELP_Calendar" contentTypeId="DOCUMENT" templateDataResourceId="HELP_TEMPL" dataResourceId="HELP_Calendar" statusId="CTNT_IN_PROGRESS" contentName="Help portlet Celendar" mimeTypeId="text/html"/> + <DataResource dataResourceId="HELP_Calendar" localeString="en" dataResourceTypeId="OFBIZ_FILE" + objectInfo="applications/workeffort/data/helpdata/HELP_PORTLET_CALENDER.xml" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Calendar help file" mimeTypeId="text/xml" isPublic="Y" /> + <Content contentId="HELP_Calendar" contentTypeId="DOCUMENT" templateDataResourceId="HELP_TEMPL" dataResourceId="HELP_Calendar" statusId="CTNT_IN_PROGRESS" + contentName="Help portlet Calendar" mimeTypeId="text/html"/> <ContentAssoc contentId="HELP_MYPORTAL" contentIdTo="HELP_Calendar" contentAssocTypeId="TREE_CHILD" fromDate="2006-01-12 01:01:01"/> Added: ofbiz/trunk/applications/workeffort/data/helpdata/HELP_PORTLET_CALENDER.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/data/helpdata/HELP_PORTLET_CALENDER.xml?rev=811787&view=auto ============================================================================== --- ofbiz/trunk/applications/workeffort/data/helpdata/HELP_PORTLET_CALENDER.xml (added) +++ ofbiz/trunk/applications/workeffort/data/helpdata/HELP_PORTLET_CALENDER.xml Sun Sep 6 09:39:20 2009 @@ -0,0 +1,30 @@ +<?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 Calendar Portlet</title> + <para> + It provides an overview on a dayly/weekly/or month period. + You will see the particular view with the ability to add an event. + </para> +</section> Propchange: ofbiz/trunk/applications/workeffort/data/helpdata/HELP_PORTLET_CALENDER.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/applications/workeffort/data/helpdata/HELP_PORTLET_CALENDER.xml ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/applications/workeffort/data/helpdata/HELP_PORTLET_CALENDER.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Modified: ofbiz/trunk/framework/common/webcommon/includes/helplink.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/webcommon/includes/helplink.ftl?rev=811787&r1=811786&r2=811787&view=diff ============================================================================== --- ofbiz/trunk/framework/common/webcommon/includes/helplink.ftl (original) +++ ofbiz/trunk/framework/common/webcommon/includes/helplink.ftl Sun Sep 6 09:39:20 2009 @@ -29,8 +29,10 @@ <#if !helpContent?has_content> <#assign helpContent = delegator.findByAnd("Content", {"contentId" : webSiteId})> </#if> + <#if !helpContent?has_content> + <#assign helpTopic = "navigateHelp"/> + </#if> </#if> - <#-- uncomment this to show the current screen help topic key (this is usefull to cut and paste in the help link resources files ${helpTopic} --> @@ -42,6 +44,4 @@ </#if> <#if helpUrlsMap[helpTopic] != helpTopic > <#assign helpUrlTopic = helpUrlsMap[helpTopic] /> - <#else> - <#assign helpTopic = "navigateHelp"/> </#if> Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java?rev=811787&r1=811786&r2=811787&view=diff ============================================================================== --- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java (original) +++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java Sun Sep 6 09:39:20 2009 @@ -768,7 +768,7 @@ long viewStartTime = System.currentTimeMillis(); - // setup chararcter encoding and content type + // setup character encoding and content type String charset = UtilFormatOut.checkEmpty(getServletContext().getInitParameter("charset"), req.getCharacterEncoding(), "UTF-8"); String viewCharset = viewMap.encoding; @@ -805,6 +805,7 @@ try { if (Debug.verboseOn()) Debug.logVerbose("Rendering view [" + nextPage + "] of type [" + viewMap.type + "]", module); ViewHandler vh = viewFactory.getViewHandler(viewMap.type); +Debug.log("===================rendering view: " + view + " contentType: " + contentType + " viewHandler:" + vh.getName()); vh.render(view, nextPage, viewMap.info, contentType, charset, req, resp); } catch (ViewHandlerException e) { Throwable throwable = e.getNested() != null ? e.getNested() : e; Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java?rev=811787&r1=811786&r2=811787&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java (original) +++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java Sun Sep 6 09:39:20 2009 @@ -18,19 +18,32 @@ *******************************************************************************/ package org.ofbiz.widget.screen; +import java.io.BufferedOutputStream; +import java.io.BufferedReader; import java.io.ByteArrayOutputStream; +import java.io.FileInputStream; +import java.io.FileReader; import java.io.IOException; +import java.io.InputStream; import java.io.Serializable; import java.io.StringWriter; +import java.io.Writer; +import java.io.FileOutputStream; +import java.io.ByteArrayInputStream; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.io.OutputStream; +import java.nio.ByteBuffer; + import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.SAXParserFactory; +import javax.xml.transform.Result; +import javax.xml.transform.Source; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; @@ -50,6 +63,7 @@ import org.ofbiz.base.util.StringUtil; import org.ofbiz.base.util.UtilFormatOut; import org.ofbiz.base.util.UtilGenerics; +import org.ofbiz.base.util.UtilHttp; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.base.util.UtilXml; @@ -77,11 +91,20 @@ import org.ofbiz.webapp.control.RequestHandler; import org.ofbiz.webapp.control.RequestHandlerException; import org.ofbiz.webapp.view.ApacheFopWorker; +import org.ofbiz.webapp.view.FopRenderer; import org.w3c.dom.Element; import org.xml.sax.InputSource; import org.xml.sax.SAXException; import org.xml.sax.XMLReader; +import org.apache.fop.apps.FOUserAgent; +import org.apache.fop.apps.Fop; +import org.apache.fop.apps.FopFactory; +import org.apache.fop.apps.FormattingResults; +import org.apache.fop.apps.MimeConstants; +import org.apache.fop.apps.PageSequenceResults; + + /** * Widget Library - Screen model class */ @@ -1117,7 +1140,7 @@ && ((mimeTypeId.indexOf("application") >= 0) || (mimeTypeId.indexOf("image")) >= 0)) { if (mimeTypeId.equals("application/pdf")) { TransformerFactory tfactory = TransformerFactory.newInstance(); - try{ + try { // // this part is not working. If somebody can help to make it work? @@ -1138,7 +1161,8 @@ } // do the actual preprocessing fr includes - SAXSource source = new SAXSource(reader, new InputSource("/home/hans/ofbiz/svn/applications/commonext/documents/ApacheOfbiz.xml")); + String fileName = "/home/hans/ofbiz/svn/applications/commonext/documents/ApacheOfbiz.xml"; + SAXSource source = new SAXSource(reader, new InputSource(fileName)); // compile the xsl template Transformer transformer1 = tfactory.newTransformer(new StreamSource("/home/hans/ofbiz/svn/applications/content/template/docbook/fo/docbook.xsl")); // and apply the xsl template to the source document and save in a result string @@ -1146,36 +1170,50 @@ StreamResult sr = new StreamResult(sw); transformer1.transform(source, sr); // store into a file for debugging - java.io.FileWriter fw = new java.io.FileWriter(new java.io.File("/tmp/file1.fo")); - fw.write(sw.toString()); - fw.close(); +// java.io.FileWriter fw = new java.io.FileWriter(new java.io.File("/tmp/file1.fo")); +// fw.write(sw.toString()); +// fw.close(); - Debug.log("================start fo processor============================="); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - StreamSource src = new StreamSource("/tmp/file1.fo"); - FopFactory fopFactory = FopFactory.newInstance(); - FOUserAgent foUserAgent = fopFactory.newFOUserAgent(); - Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, baos); - TransformerFactory factory = TransformerFactory.newInstance(); - Transformer transformer = factory.newTransformer(); - transformer.transform(src, new SAXResult(fop.getDefaultHandler())); - baos.flush(); - baos.close(); - // write to browser - writer.append(baos.toString()); - // store into a file for debugging - java.io.FileWriter fend = new java.io.FileWriter(new java.io.File("/tmp/file1.pdf")); - fend.write(baos.toString()); - fend.close(); - - + FopFactory fopFactory = FopFactory.newInstance(); + FOUserAgent foUserAgent = fopFactory.newFOUserAgent(); + // configure foUserAgent as desired + + // Setup output stream. Note: Using BufferedOutputStream + // for performance reasons (helpful with FileOutputStreams). +// OutputStream out = new FileOutputStream("/tmp/file.pdf"); +// out = new BufferedOutputStream(out); +// OutputStream outWriter = (OutputStream) writer; + ByteArrayOutputStream out = new ByteArrayOutputStream(); + Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, out); + + // Setup JAXP using identity transformer + TransformerFactory factory = TransformerFactory.newInstance(); + Transformer transformer = factory.newTransformer(); // identity transformer + + // Setup input stream + Source src = new StreamSource(new ByteArrayInputStream(sw.toString().getBytes())); + + // Resulting SAX events (the generated FO) must be piped through to FOP + Result result = new SAXResult(fop.getDefaultHandler()); + + // Start XSLT transformation and FOP processing + transformer.transform(src, result); + + out.flush(); + out.close(); + // to a file for debugging + FileOutputStream fw = new FileOutputStream("/tmp/file.pdf"); + fw.write(out.toByteArray()); + fw.close(); + HttpServletResponse response = (HttpServletResponse) context.get("response"); + response.setContentType("application/pdf"); + response.setContentLength(out.size()); + response.setHeader("Content-Disposition", "attachment;filename=" + fileName); + writer.append(new String(out.toByteArray())); } catch(Exception e) { - Debug.logError("================================Exception: " + e, module); + Debug.logError("Exception converting from FO to PDF: " + e, module); } - - - } else { screenStringRenderer.renderContentFrame(writer, context, this); } Modified: ofbiz/trunk/specialpurpose/myportal/data/MyPortalTypeData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/myportal/data/MyPortalTypeData.xml?rev=811787&r1=811786&r2=811787&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/myportal/data/MyPortalTypeData.xml (original) +++ ofbiz/trunk/specialpurpose/myportal/data/MyPortalTypeData.xml Sun Sep 6 09:39:20 2009 @@ -160,8 +160,11 @@ <WebSite webSiteId="MYPORTAL" siteName="My Portal" visualThemeSetId="BACKOFFICE"/> <!-- Myportal help pages --> - <DataResource dataResourceId="HELP_MYPORTAL" localeString="en" dataResourceTypeId="OFBIZ_FILE" objectInfo="specialpurpose/myportal/data/helpdata/HELP_MYPORTAL.xml" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Calendar help file" mimeTypeId="text/xml" isPublic="Y" /> - <Content contentId="HELP_MYPORTAL" contentTypeId="DOCUMENT" templateDataResourceId="HELP_TEMPL" dataResourceId="HELP_MYPORTAL" statusId="CTNT_IN_PROGRESS" contentName="My Portal help" mimeTypeId="text/html"/> + <DataResource dataResourceId="HELP_MYPORTAL" localeString="en" dataResourceTypeId="OFBIZ_FILE" + objectInfo="specialpurpose/myportal/data/helpdata/HELP_MYPORTAL.xml" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" + dataResourceName="Calendar help file" mimeTypeId="text/xml" isPublic="Y" /> + <Content contentId="HELP_MYPORTAL" contentTypeId="DOCUMENT" templateDataResourceId="HELP_TEMPL" dataResourceId="HELP_MYPORTAL" statusId="CTNT_IN_PROGRESS" + contentName="My Portal help" mimeTypeId="text/html"/> <ContentAssoc contentId="HELP_ROOT" contentIdTo="HELP_MYPORTAL" contentAssocTypeId="TREE_CHILD" fromDate="2006-01-12 01:01:01"/> -</entity-engine-xml> \ No newline at end of file +</entity-engine-xml> |
Free forum by Nabble | Edit this page |