svn commit: r786947 - in /ofbiz/trunk/applications/commonext/widget: SystemInfoForms.xml SystemInfoScreens.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r786947 - in /ofbiz/trunk/applications/commonext/widget: SystemInfoForms.xml SystemInfoScreens.xml

hansbak-2
Author: hansbak
Date: Sun Jun 21 07:23:31 2009
New Revision: 786947

URL: http://svn.apache.org/viewvc?rev=786947&view=rev
Log:
only show system status and notes screenlet when there is something to show

Modified:
    ofbiz/trunk/applications/commonext/widget/SystemInfoForms.xml
    ofbiz/trunk/applications/commonext/widget/SystemInfoScreens.xml

Modified: ofbiz/trunk/applications/commonext/widget/SystemInfoForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/widget/SystemInfoForms.xml?rev=786947&r1=786946&r2=786947&view=diff
==============================================================================
--- ofbiz/trunk/applications/commonext/widget/SystemInfoForms.xml (original)
+++ ofbiz/trunk/applications/commonext/widget/SystemInfoForms.xml Sun Jun 21 07:23:31 2009
@@ -23,18 +23,12 @@
 
     <form name="SystemInfoNotes" type="list" list-name="systemInfoNotes"
         odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
-        <actions>
-            <service service-name="getSystemInfoNotes" result-map-list="systemInfoNotes"/>
-        </actions>
         <field name="noteDateTime" title="Date info created"><display/></field>
         <field name="noteInfo" title="System Info Note"><hyperlink target="/myportal/control/showPortletDecorator?portalPortletId=${moreInfoPortletId}" target-type="inter-app" description="${noteInfo}"></hyperlink></field>
     </form>
 
     <form name="SystemInfoStatus" type="list" list-name="systemInfoStatus"
         odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
-        <actions>
-            <service service-name="getSystemInfoStatus" result-map-list="systemInfoStatus"/>
-        </actions>
         <field name="noteDateTime" title="Date Last Changed"><display/></field>
         <field name="noteInfo" title="System Info Status"><hyperlink target="/myportal/control/showPortletDecorator?portalPortletId=${moreInfoPortletId}" target-type="inter-app" description="${noteInfo}"></hyperlink></field>
     </form>

Modified: ofbiz/trunk/applications/commonext/widget/SystemInfoScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/widget/SystemInfoScreens.xml?rev=786947&r1=786946&r2=786947&view=diff
==============================================================================
--- ofbiz/trunk/applications/commonext/widget/SystemInfoScreens.xml (original)
+++ ofbiz/trunk/applications/commonext/widget/SystemInfoScreens.xml Sun Jun 21 07:23:31 2009
@@ -23,21 +23,43 @@
 
     <screen name="SystemInfoNotes">
         <section>
+            <actions>
+                <service service-name="getSystemInfoNotes" result-map="resultMap"/>
+                <set field="systemInfoNotes" from-field="resultMap.systemInfoNotes"/>
+            </actions>
             <widgets>
-                <screenlet title="System Info notes for user: ${userLogin.partyId}" navigation-menu-name="SystemInfoNotes">
-                    <include-menu name="SystemInfoNotes" location="component://commonext/widget/SystemInfoMenus.xml"/>
-                    <include-form name="SystemInfoNotes" location="component://commonext/widget/SystemInfoForms.xml"/>
-                </screenlet>
+                <section>
+                    <condition>
+                        <not><if-empty field="systemInfoNotes"/></not>
+                    </condition>
+                    <widgets>
+                        <screenlet title="System Info notes for user: ${userLogin.partyId}" navigation-menu-name="SystemInfoNotes">
+                            <include-menu name="SystemInfoNotes" location="component://commonext/widget/SystemInfoMenus.xml"/>
+                            <include-form name="SystemInfoNotes" location="component://commonext/widget/SystemInfoForms.xml"/>
+                        </screenlet>
+                    </widgets>
+                </section>
             </widgets>
         </section>
     </screen>
     
     <screen name="SystemInfoStatus">
         <section>
+            <actions>
+                <service service-name="getSystemInfoStatus" result-map="resultMap"/>
+                <set field="systemInfoStatus" from-field="resultMap.systemInfoStatus"/>
+            </actions>
             <widgets>
-                <screenlet title="System Status Info for user: ${userLogin.partyId}">
-                    <include-form name="SystemInfoStatus" location="component://commonext/widget/SystemInfoForms.xml"/>
-                </screenlet>
+                <section>
+                    <condition>
+                        <not><if-empty field="systemInfoStatus"/></not>
+                    </condition>
+                    <widgets>
+                        <screenlet title="System Status Info for user: ${userLogin.partyId}">
+                            <include-form name="SystemInfoStatus" location="component://commonext/widget/SystemInfoForms.xml"/>
+                        </screenlet>
+                    </widgets>
+                </section>
             </widgets>
         </section>
     </screen>