Skip to content

Commit

Permalink
several adjustments to the help system, now using contentId to select…
Browse files Browse the repository at this point in the history
… and use underscore in contentId

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@804881 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
hansbak committed Aug 17, 2009
1 parent 145125b commit 7dee784
Show file tree
Hide file tree
Showing 15 changed files with 130 additions and 78 deletions.
12 changes: 8 additions & 4 deletions applications/accounting/data/AccountingHelpData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,24 @@ under the License.
-->
<entity-engine-xml>
<!-- =======Help=========== -->
<DataResource dataResourceId="HELP-ACCOUNTING" localeString="en" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Accounting Manager Help" mimeTypeId="text/xml" isPublic="Y" />
<ElectronicText dataResourceId="HELP-ACCOUNTING">
<DataResource dataResourceId="HELP_ACCOUNTING" localeString="en" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Accounting Manager Help" mimeTypeId="text/xml" isPublic="Y" />
<ElectronicText dataResourceId="HELP_ACCOUNTING">
<textData><![CDATA[
<root>
<generalTitle>
The Accounting Manager.
</generalTitle>
<general>
<section>
<text>
The Accounting Manager keeps track of financial charges, credit card processes, and receipts of payment.
The link from the Order Manager to the Accounting Manager is the Invoice Number, generated when the Order is processed.
</text>
</section>
</general>
</root>
]]></textData>
</ElectronicText>
<Content contentId="HELP-ACCOUNTING" contentTypeId="DOCUMENT" contentName="Accounting Help" 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"/>
<Content contentId="HELP_ACCOUNTING" contentTypeId="DOCUMENT" contentName="Accounting Help" 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"/>
</entity-engine-xml>
3 changes: 3 additions & 0 deletions applications/commonext/config/CommonExtUiLabels.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
<property key="CommonExtHelpUsedFor">
<value xml:lang="en">What is it used for?</value>
</property>
<property key="CommonExtHelpOnScreen">
<value xml:lang="en">What's on the screen?</value>
</property>
<property key="CommonExtIndex">
<value xml:lang="en">Index</value>
</property>
Expand Down
8 changes: 5 additions & 3 deletions applications/commonext/data/CommonExtHelpData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@
-->
<entity-engine-xml>
<!-- create some keys to be sure all data will load the firs time -->
<DataResource dataResourceId="HELP-TEMPL"/>
<Content contentId="HELP-ROOT"/>
<Content contentId="HELP-MYPORTAL"/>
<DataResource dataResourceId="HELP_TEMPL"/>
<Content contentId="HELP_ROOT"/>
<Content contentId="TREE_ROOT" contentTypeId="DOCUMENT" contentName="ROOT" dataResourceId=""/>
<ContentAssoc contentId="TREE_ROOT" contentIdTo="HELP_ROOT" contentAssocTypeId="TREE_CHILD" fromDate="2006-01-12 01:01:01"/>
<Content contentId="HELP_MYPORTAL"/>

</entity-engine-xml>
24 changes: 10 additions & 14 deletions applications/commonext/widget/HelpScreens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ under the License.
<screen name="ShowHelp">
<section>
<condition>
<if-compare field="parameters.helpTopic" operator="equals" value="navigateHelp"/>
<and>
<if-compare field="parameters.helpTopic" operator="equals" value="navigateHelp"/>
<if-empty field="parameters.portalPageId"/>
</and>
</condition>
<widgets>
<include-screen name="navigateHelp"/>
Expand All @@ -76,23 +79,16 @@ under the License.
</condition>
<actions>
<set field="title" value="${uiLabelMap.CommonExtHelpTitle}"/>
<entity-and entity-name="Content" list="contents">
<field-map field-name="contentName" from-field="parameters.helpTopic"/>
</entity-and>
<set field="content" from-field="contents[0]"/>
<set field="contentId" value="${parameters.contentId}" default-value="${content.contentId}"/>
<set field="contentId" value="${parameters.contentId}" default-value="HELP_ROOT"/>
<entity-one entity-name="Content" value-field="content"/>
</actions>
<widgets>
<section>
<condition>
<if-empty field="content"/>
</condition>
<widgets>
<decorator-screen name="LookupDecorator">
<decorator-section name="body">
<label style="h2" text="Content with content name: ${parameters.helpTopic} or contentId: ${contentId}(${parameters.contentId}} could not be found"></label>
</decorator-section>
</decorator-screen>
<include-screen name="navigateHelp"/>
</widgets>
<fail-widgets>
<decorator-screen name="LookupDecorator">
Expand All @@ -110,7 +106,7 @@ under the License.
<decorator-screen name="LookupDecorator">
<decorator-section name="body">
<screenlet title="${uilabelMap.CommonExtHelpTitle}">
<content content-id="HELP-MYPORTAL"/>
<content content-id="HELP_MYPORTAL"/>
</screenlet>
<screenlet title="Select a portlet you would like to have help on...." navigation-menu-name="lookupMenu">
<include-menu name="lookupMenu" location="component://content/widget/content/ContentMenus.xml"/>
Expand Down Expand Up @@ -153,11 +149,11 @@ under the License.
<set field="layoutSettings.javaScripts[+0]" value="/images/dojo/dojo.js" global="true"/>
<set field="titleProperty" value="PageTitleNavigateContent"/>
<entity-and entity-name="ContentAssoc" list="contentAssoc">
<field-map field-name="contentId" value="HELP-ROOT"/>
<field-map field-name="contentId" value="HELP_ROOT"/>
<field-map field-name="contentAssocTypeId" value="TREE_CHILD"/>
<order-by field-name="sequenceNum"/>
</entity-and>
<set field="contentId" from-field="parameters.contentId" default-value="HELP-ROOT"/>
<set field="contentId" from-field="parameters.contentId" default-value="HELP_ROOT"/>
</actions>
<widgets>
<decorator-screen name="LookupDecorator">
Expand Down
38 changes: 32 additions & 6 deletions applications/content/data/ContentHelpData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,46 @@ specific language governing permissions and limitations
under the License.
-->
<entity-engine-xml>
<!-- =======Help=========== -->
<DataResource dataResourceId="HELP-CONTENT" localeString="en" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Content Manager Help" mimeTypeId="text/xml" isPublic="Y" />
<ElectronicText dataResourceId="HELP-CONTENT">
<!-- =======General Help=========== -->
<DataResource dataResourceId="HELP_ROOT" localeString="en" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Help system root" mimeTypeId="text/xml" isPublic="Y" />
<ElectronicText dataResourceId="HELP_ROOT">
<textData><![CDATA[
<root>
<generalTitle>
Welcome to the Apache OFBiz help system
</generalTitle>
<general>
<section>
<text>If you arrived at this page without selecting the index, then a specific help page was not yet available</text>
</section>
<section>
<text>This system will provide you context sensitive help throughout the system.</text>
</section>
<section>
<text>For more info on the help system itself check the </text>
</section>
</general>
</root>
]]></textData>
</ElectronicText>
<Content contentId="HELP_ROOT" contentTypeId="DOCUMENT" templateDataResourceId="HELP_TEMPL" dataResourceId="HELP_ROOT" statusId="CTNT_IN_PROGRESS" contentName="Help system root" mimeTypeId="text/html"/>

<!-- Content specific -->
<DataResource dataResourceId="HELP_CONTENT" localeString="en" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Content Manager Help" mimeTypeId="text/xml" isPublic="Y" />
<ElectronicText dataResourceId="HELP_CONTENT">
<textData><![CDATA[
<root>
<generalTitle>
The Content Manager.
</generalTitle>
<general>
The Content Management System (CMS) is designed to store data once and then allow it to be reused in multiple arrangements.
<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>
]]></textData>
</ElectronicText>
<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"/>
<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"/>
</entity-engine-xml>
51 changes: 30 additions & 21 deletions applications/content/data/TemplateData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,8 @@ ${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">
<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">
<div class="contentarea">
Expand All @@ -489,15 +489,16 @@ ${txt}
<#if doc.root.general?has_content>
<h1>${doc.root.generalTitle?if_exists}</h1>
<p class=h2>${doc.root.general}</p>
<#list doc.root.general.section as section>
<p class=h2>${section.text}</p>
</#list>
</#if>
</div>
</div>
</div>
</#if>
<#if layoutSettings.VT_NAME[0] == "BIZZNESS_TIME">
<#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>
Expand All @@ -515,28 +516,36 @@ ${txt}
<#if doc.root.general?has_content>
<h1>${doc.root.generalTitle?if_exists}</h1>
<p class=h2>${doc.root.general}</p>
<#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-ROOT" localeString="en" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Help system root" mimeTypeId="text/xml" isPublic="Y" />
<ElectronicText dataResourceId="HELP-ROOT">
<textData><![CDATA[
<root>
<generalTitle>
Welcome to the Apache OFBiz help system
</generalTitle>
<general>
This system will provide you context sensitive help throughout the system.
</general>
</root>
]]></textData>
</ElectronicText>
<Content contentId="HELP-ROOT" contentTypeId="DOCUMENT" templateDataResourceId="HELP-TEMPL" dataResourceId="HELP-ROOT" statusId="CTNT_IN_PROGRESS" contentName="Help system root" mimeTypeId="text/html"/>


</entity-engine-xml>
10 changes: 5 additions & 5 deletions applications/content/ofbiz-component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,21 @@ under the License.
<classpath type="jar" location="build/lib/*"/>
<entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel.xml"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/ContentTypeData.xml"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/ContentHelpData.xml"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/ContentOperationData.xml"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/MimeTypeData.xml"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/MimeTypeTemplate.xml"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/DataCategoryData.xml"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/SeedBlogData.xml"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/HelpTypeData.xml"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/TemplateData.xml"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/ContentSecurityData.xml"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/MiscData.xml"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/ContentHelpData.xml"/>
<entity-resource type="data" reader-name="demo" loader="main" location="data/UsersDemoData.xml"/>
<entity-resource type="data" reader-name="demo" loader="main" location="data/DemoBlogPubPtData.xml"/>
<entity-resource type="data" reader-name="demo" loader="main" location="data/DemoBlogUsersData.xml"/>
<entity-resource type="data" reader-name="demo" loader="main" location="data/DemoBlogMiscData.xml"/>
<entity-resource type="data" reader-name="demo" loader="main" location="data/DemoBlogEntryData.xml"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/TemplateData.xml"/>
<entity-resource type="data" reader-name="demo" loader="main" location="data/UsersDemoData.xml"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/ContentSecurityData.xml"/>
<entity-resource type="data" reader-name="seed" loader="main" location="data/MiscData.xml"/>
<entity-resource type="data" reader-name="demo" loader="main" location="data/WebSitePublishPointData.xml"/>
<entity-resource type="data" reader-name="demo" loader="main" location="data/CompDocData.xml"/>
<entity-resource type="data" reader-name="demo" loader="main" location="data/ForumDemoData.xml"/>
Expand Down
14 changes: 9 additions & 5 deletions applications/product/data/ProductHelpData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,23 @@ under the License.
-->
<entity-engine-xml>
<!-- =======Help=========== -->
<DataResource dataResourceId="HELP-PRODUCT" localeString="en" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Catalog Manager Help" mimeTypeId="text/xml" isPublic="Y" />
<ElectronicText dataResourceId="HELP-PRODUCT">
<DataResource dataResourceId="HELP_PRODUCT" localeString="en" dataResourceTypeId="ELECTRONIC_TEXT" dataTemplateTypeId="NONE" statusId="CTNT_IN_PROGRESS" dataResourceName="Catalog Manager Help" mimeTypeId="text/xml" isPublic="Y" />
<ElectronicText dataResourceId="HELP_PRODUCT">
<textData><![CDATA[
<root>
<generalTitle>
The Catalog Manager.
</generalTitle>
<general>
The Catalog Manager creates and provides access to a variety of information related to Products, Catalogs, or Categories.
<section>
<text>
The Catalog Manager creates and provides access to a variety of information related to Products, Catalogs, or Categories.
</text>
</section>
</general>
</root>
]]></textData>
</ElectronicText>
<Content contentId="HELP-PRODUCT" contentTypeId="DOCUMENT" 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"/>
<Content contentId="HELP_PRODUCT" contentTypeId="DOCUMENT" 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"/>
</entity-engine-xml>
Loading

0 comments on commit 7dee784

Please sign in to comment.