[ 
https://issues.apache.org/jira/browse/OFBIZ-1754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Skip Dever updated OFBIZ-1754:
------------------------------

    Description: 
This is an alternative help system to the one offered by Bruno at:
https://issues.apache.org/jira/browse/OFBIZ-1750

This one offers simplicity and requires no changes the Ofbiz core code.  The 
only modifications required are to the GlobalDecorator screen in 
framework/common/widget/CommonScreens.xml and 
framework/common/webcommon/includes/header.ftl

GlogalDecorator is modified to call a bash script to load the help url with 
these two additions in the actions section:

                <set field="layoutSettings.helpImageUrl" 
value="/images/help.gif" global="true"/>
                <script 
location="component://help/webapp/help/WEB-INF/actions/gethelpurl.bsh"/>        
                    

header.ftl is modified by adding these lines 
        <#if helpUrl?exists>
          <p><a target="_blank" href="${helpUrl}"><img 
src="<@ofbizContentUrl>/images/help.gif</@ofbizContentUrl>" alt="Help"/></a>
        </#if>        

right below:
        <p>${timeZone.getDisplayName(timeZone.useDaylightTime(), 
Static["java.util.TimeZone"].LONG, locale)} <a 

Then, all that is required to to define a helpTag in each screen that has help 
available like this in the example application:

    <screen name="main">
        <section>
            <actions>
                <set field="helpTag" value="examplehelp"/>
            </actions>


The enclosed zip file contains a "help" directory that goes in hot-deploy.  In 
addition, I have included the modified test files in the "framework" directory.

Also included are a few example help screens.  These can be found in 
help/helpFiles/html/en

There are only help files for the english language.  You can create help files 
for any language by creating a help/helpFiles/html/<getLanguage()> directory 
and putting them in there.

Also included is some seed data to populate the HelpCrossReference table with 
an entry for the example.

Note that this work was done on a version of Ofbiz from the first of the year 
and there may be some differences in the modified framework files.

Here is a sample entry for the HelpCrossReference entity:

<HelpCrossReference helpTag="examplehelp" helpFileName="examplehelp.html" />

The bash script that loads the pages uses the current local to extract the 
language.  With english, this is "en".  It then creates a url rooted in 
helpFiles/html with the language and the html file obtained from 
HelpCrossReference.

One final note.  The bash script that creates the urls from the help tags 
converts all the tags to lower case.  You can comment that code out or import 
your help cross references with the helpTag in lower case as I did.

 

  was:
This is an alternative help system to the one offered by Bruno at:
https://issues.apache.org/jira/browse/OFBIZ-1750

This one offers simplicity and requires no changes the Ofbiz core code.  The 
only modifications required are to the GlobalDecorator screen in 
framework/common/widget/CommonScreens.xml and 
framework/common/webcommon/includes/header.ftl

GlogalDecorator is modified to call a bash script to load the help url with 
these two additions in the actions section:

                <set field="layoutSettings.helpImageUrl" 
value="/images/help.gif" global="true"/>
                <script 
location="component://help/webapp/help/WEB-INF/actions/gethelpurl.bsh"/>        
                    

header.ftl is modified by adding these lines 
        <#if helpUrl?exists>
          <p><a target="_blank" href="${helpUrl}"><img 
src="<@ofbizContentUrl>/images/help.gif</@ofbizContentUrl>" alt="Help"/></a>
        </#if>        

right below:
        <p>${timeZone.getDisplayName(timeZone.useDaylightTime(), 
Static["java.util.TimeZone"].LONG, locale)} <a 

Then, all that is required to to define a helpTag in each screen that has help 
available like this in the example application:

    <screen name="main">
        <section>
            <actions>
                <set field="helpTag" value="examplehelp"/>
            </actions>


The enclosed zip file contains a "help" directory that goes in hot-deploy.  In 
addition, I have included the modified test files in the "framework" directory.

Also included are a few example help screens.  These can be found in 
help/helpFiles/html/en

There are only help files for the english language.  You can create help files 
for any language by creating a help/helpFiles/html/<getLanguage()> directory 
and putting them in there.

Also included is some seed data to populate the HelpCrossReference table with 
an entry for the example.

Note that this work was done on a version of Ofbiz from the first of the year 
and there may be some differences in the modified framework files.

One final note.  The bash script that creates the urls from the help tags 
converts all the tags to lower case.  You can comment that code our or import 
your help cross references with the helpTag in lower case as I did.

 


> An Alternative Help System
> --------------------------
>
>                 Key: OFBIZ-1754
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1754
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: ALL COMPONENTS
>            Reporter: Skip Dever
>            Priority: Minor
>         Attachments: htmlhelp.ZIP, screenshot-1.jpg, screenshot-2.jpg
>
>
> This is an alternative help system to the one offered by Bruno at:
> https://issues.apache.org/jira/browse/OFBIZ-1750
> This one offers simplicity and requires no changes the Ofbiz core code.  The 
> only modifications required are to the GlobalDecorator screen in 
> framework/common/widget/CommonScreens.xml and 
> framework/common/webcommon/includes/header.ftl
> GlogalDecorator is modified to call a bash script to load the help url with 
> these two additions in the actions section:
>                 <set field="layoutSettings.helpImageUrl" 
> value="/images/help.gif" global="true"/>
>                 <script 
> location="component://help/webapp/help/WEB-INF/actions/gethelpurl.bsh"/>      
>                       
> header.ftl is modified by adding these lines 
>         <#if helpUrl?exists>
>           <p><a target="_blank" href="${helpUrl}"><img 
> src="<@ofbizContentUrl>/images/help.gif</@ofbizContentUrl>" alt="Help"/></a>
>         </#if>        
> right below:
>         <p>${timeZone.getDisplayName(timeZone.useDaylightTime(), 
> Static["java.util.TimeZone"].LONG, locale)} <a 
> Then, all that is required to to define a helpTag in each screen that has 
> help available like this in the example application:
>     <screen name="main">
>         <section>
>             <actions>
>                 <set field="helpTag" value="examplehelp"/>
>             </actions>
> The enclosed zip file contains a "help" directory that goes in hot-deploy.  
> In addition, I have included the modified test files in the "framework" 
> directory.
> Also included are a few example help screens.  These can be found in 
> help/helpFiles/html/en
> There are only help files for the english language.  You can create help 
> files for any language by creating a help/helpFiles/html/<getLanguage()> 
> directory and putting them in there.
> Also included is some seed data to populate the HelpCrossReference table with 
> an entry for the example.
> Note that this work was done on a version of Ofbiz from the first of the year 
> and there may be some differences in the modified framework files.
> Here is a sample entry for the HelpCrossReference entity:
> <HelpCrossReference helpTag="examplehelp" helpFileName="examplehelp.html" />
> The bash script that loads the pages uses the current local to extract the 
> language.  With english, this is "en".  It then creates a url rooted in 
> helpFiles/html with the language and the html file obtained from 
> HelpCrossReference.
> One final note.  The bash script that creates the urls from the help tags 
> converts all the tags to lower case.  You can comment that code out or import 
> your help cross references with the helpTag in lower case as I did.
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to