[OFBiz] SVN: r6851 - in trunk/applications/content: entitydef script/org/ofbiz/content/compdoc webapp/content/WEB-INF widget/compdoc

byersa@svn.ofbiz.org byersa at svn.ofbiz.org
Mon Feb 27 00:48:52 CST 2006


Author: byersa
Date: 2006-02-27 00:48:40 -0600 (Mon, 27 Feb 2006)
New Revision: 6851

Modified:
   trunk/applications/content/entitydef/entitymodel.xml
   trunk/applications/content/script/org/ofbiz/content/compdoc/CompDocServices.xml
   trunk/applications/content/webapp/content/WEB-INF/controller.xml
   trunk/applications/content/widget/compdoc/CompDocForms.xml
   trunk/applications/content/widget/compdoc/CompDocScreens.xml
Log:
Fixes to ContentApproval.
In Survey entity, changed contentId, to acroFormContentId.


Modified: trunk/applications/content/entitydef/entitymodel.xml
===================================================================
--- trunk/applications/content/entitydef/entitymodel.xml	2006-02-26 11:35:26 UTC (rev 6850)
+++ trunk/applications/content/entitydef/entitymodel.xml	2006-02-27 06:48:40 UTC (rev 6851)
@@ -1127,7 +1127,7 @@
       <field name="isAnonymous" type="indicator"><description>Allow response to the survey without login?</description></field>
       <field name="allowMultiple" type="indicator"><description>Allow multiple responses to this survey (if Y), or just a single answer (if N)?</description></field>
       <field name="allowUpdate" type="indicator"><description>Allow change to responses?</description></field>
-      <field name="contentId" type="id-ne"><description>Points to PDF with AcroForm</description></field>
+      <field name="acroFormContentId" type="id-ne"><description>Points to PDF with AcroForm</description></field>
       <prim-key field="surveyId"/>
     </entity>
     <entity entity-name="SurveyApplType"

Modified: trunk/applications/content/script/org/ofbiz/content/compdoc/CompDocServices.xml
===================================================================
--- trunk/applications/content/script/org/ofbiz/content/compdoc/CompDocServices.xml	2006-02-26 11:35:26 UTC (rev 6850)
+++ trunk/applications/content/script/org/ofbiz/content/compdoc/CompDocServices.xml	2006-02-27 06:48:40 UTC (rev 6851)
@@ -909,6 +909,7 @@
         </iterate>
         <log level="info" message="roles: ${roles}"/>        
         
+		<!-- find approvals belonging to user -->
         <entity-condition entity-name="MaxContentApprovalView" list-name="compdocApprovalList" use-cache="false">
             <condition-list>
                 <condition-expr field-name="contentRevisionSeqId" env-name="parameters.contentRevisionSeqId" operator="less-equals" ignore-if-empty="true"/>
@@ -916,12 +917,14 @@
                 <condition-expr field-name="roleTypeId" operator="in" env-name="roles"/>
             </condition-list>
             <select-field field-name="contentId"/>
+            <select-field field-name="contentTypeId"/>
             <select-field field-name="partyId"/>
             <select-field field-name="roleTypeId"/>
             <select-field field-name="maxContentRevisionSeqId"/>
         </entity-condition>
         <log level="info" message="compdocApprovalList: ${compdocApprovalList}"/>        
         
+		<!-- above query does not get contentApprovalId. For each row find it -->
         <iterate list-name="compdocApprovalList" entry-name="maxContentApproval">
             <log level="info" message="maxContentApproval: ${maxContentApproval}"/>
             <entity-condition entity-name="ContentApproval" list-name="contentApprovalList2" use-cache="false">
@@ -942,6 +945,7 @@
         </iterate>
         <log level="info" message="contentApprovalIdList: ${contentApprovalIdList}"/>        
         
+		<!-- find the entries that match the user's partyId or associated roleTypes -->
         <entity-condition entity-name="ContentApproval" list-name="contentApprovalList">
             <condition-list combine="and">
                 <condition-expr field-name="contentApprovalId" operator="in" env-name="contentApprovalIdList"/>

Modified: trunk/applications/content/webapp/content/WEB-INF/controller.xml
===================================================================
--- trunk/applications/content/webapp/content/WEB-INF/controller.xml	2006-02-26 11:35:26 UTC (rev 6850)
+++ trunk/applications/content/webapp/content/WEB-INF/controller.xml	2006-02-27 06:48:40 UTC (rev 6851)
@@ -929,6 +929,12 @@
         <response name="success" type="view" value="ListContentApproval"/>
         <response name="error" type="view" value="ListContentApproval"/>
     </request-map>
+    <request-map uri="updateWaitingContentApproval">
+        <security auth="true" https="true"/>
+        <event invoke="updateContentApproval" path="" type="service"/>
+        <response name="success" type="view" value="ListWaitingContentApproval"/>
+        <response name="error" type="view" value="ListWaitingContentApproval"/>
+    </request-map>
     <request-map uri="removeContentApproval">
         <security auth="true" https="true"/>
         <event invoke="removeContentApproval" path="" type="service"/>

Modified: trunk/applications/content/widget/compdoc/CompDocForms.xml
===================================================================
--- trunk/applications/content/widget/compdoc/CompDocForms.xml	2006-02-26 11:35:26 UTC (rev 6850)
+++ trunk/applications/content/widget/compdoc/CompDocForms.xml	2006-02-27 06:48:40 UTC (rev 6851)
@@ -232,7 +232,7 @@
         <field name="roleTypeId">
             <display-entity entity-name="RoleType" key-field-name="roleTypeId" description="${description}"/>
         </field>
-        <field name="approvalStatusId" use-when="contentTypeId.equals(&quot;COMPDOC_INSTANCE&quot;)">
+        <field name="approvalStatusId" use-when="&quot;COMPDOC_INSTANCE&quot;.equals(thisContentTypeId)">
             <drop-down allow-empty="true">
                 <entity-options description="${description}" entity-name="StatusItem" key-field-name="statusId">
                     <entity-constraint name="statusTypeId" value="CNTNTAPPR_STATUS"/>
@@ -246,10 +246,37 @@
         <field name="Edit" title=" " widget-style="buttontext">
             <hyperlink also-hidden="false" description="[Edit]" target="EditContentApproval?contentApprovalId=${contentApprovalId}&amp;contentId=${contentId}&amp;contentRevisionSeqId=${contentRevisionSeqId}&amp;rootTemplateContentId=${rootTemplateContentId}&amp;rootTemplateRevSeqId=${rootTemplateRevSeqId}&amp;rootInstanceContentId=${rootInstanceContentId}&amp;rootInstanceRevSeqId=${rootInstanceRevSeqId}"/>
         </field>
-        <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"  use-when="contentTypeId.equals(&quot;COMPDOC_INSTANCE&quot;)"><submit/></field>
+        <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit"  use-when="&quot;COMPDOC_INSTANCE&quot;.equals(thisContentTypeId)"><submit/></field>
     </form>
 
+    <form name="ListWaitingContentApproval" default-title-style="tableheadtext" default-tooltip-style="tabletext"
+                target="updateWaitingContentApproval"  extends="dummy" 
+               list-name="contentApprovalList" default-widget-style="tabletext" title="" type="list">
+        <field name="contentApprovalId" widget-style="tabletext"><display/></field>
+        <field name="contentId"><hidden/></field>
+        <field name="contentRevisionSeqId"><display/></field>
+        <field name="partyId"><display/></field>
+        <field name="roleTypeId">
+            <display-entity entity-name="RoleType" key-field-name="roleTypeId" description="${description}"/>
+        </field>
+        <field name="approvalStatusId">
+            <drop-down allow-empty="true">
+                <entity-options description="${description}" entity-name="StatusItem" key-field-name="statusId">
+                    <entity-constraint name="statusTypeId" value="CNTNTAPPR_STATUS"/>
+                    <entity-order-by field-name="sequenceId"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="approvalDate"><display/></field>
+        <field name="sequenceNum"><display/></field>
+        <field name="comments"><display/></field>
+        <field name="Edit" title=" " widget-style="buttontext">
+            <hyperlink also-hidden="false" description="[Edit]" target="EditContentApproval?contentApprovalId=${contentApprovalId}&amp;contentId=${contentId}&amp;contentRevisionSeqId=${contentRevisionSeqId}&amp;rootTemplateContentId=${rootTemplateContentId}&amp;rootTemplateRevSeqId=${rootTemplateRevSeqId}&amp;rootInstanceContentId=${rootInstanceContentId}&amp;rootInstanceRevSeqId=${rootInstanceRevSeqId}"/>
+        </field>
+        <field name="submitButton" title="${uiLabelMap.CommonUpdate}" widget-style="smallSubmit" ><submit/></field>
+    </form>
 
+
     <form name="AddRootCompDocInstance" default-map-name="" title="" type="single" target="genCompDocInstance"
         extends="dummy"
         default-title-style="tableheadtext" default-tooltip-style="tabletext" default-widget-style="inputBox">

Modified: trunk/applications/content/widget/compdoc/CompDocScreens.xml
===================================================================
--- trunk/applications/content/widget/compdoc/CompDocScreens.xml	2006-02-26 11:35:26 UTC (rev 6850)
+++ trunk/applications/content/widget/compdoc/CompDocScreens.xml	2006-02-27 06:48:40 UTC (rev 6851)
@@ -31,7 +31,7 @@
                 <set field="currentMenuItemName" value="approval"/>
                 <entity-one entity-name="ContentApproval" value-name="contentApproval" use-cache="true"/>
                 <entity-one entity-name="Content" value-name="content" use-cache="true"/>
-                <set from-field="content.contentTypeId" field="contentTypeId" />
+                <set from-field="content.contentTypeId" field="thisContentTypeId" />
                 <service service-name="getApprovalsWithPermissions" result-map-name="result">
                     <field-map field-name="rootContentId" env-name="parameters.contentId"/>
                     <field-map field-name="contentRevisionSeqId" env-name="parameters.contentRevisionSeqId"/>
@@ -74,7 +74,7 @@
                 <decorator-screen name="commonCompDocDecorator" location="component://content/widget/CommonScreens.xml">
                     <decorator-section name="body">
                         <container><link target="EditContentApproval?contentId=${contentId}&amp;contentRevisionSeqId=${contentRevisionSeqId}&amp;rootTemplateContentId=${rootTemplateContentId}&amp;rootTemplateRevSeqId=${rootTemplateRevSeqId}&amp;rootInstanceContentId=${rootInstanceContentId}&amp;rootInstanceRevSeqId=${rootInstanceRevSeqId}" text="Create New Content Approval" style="buttontext"/></container>
-                        <include-form name="ListContentApproval" location="component://content/widget/compdoc/CompDocForms.xml"/>
+                        <include-form name="ListWaitingContentApproval" location="component://content/widget/compdoc/CompDocForms.xml"/>
                     </decorator-section>
                 </decorator-screen>
             </widgets>



More information about the Svn mailing list