svn commit: r1643384 - in /ofbiz/trunk/specialpurpose/projectmgr/widget: ProjectScreens.xml forms/ProjectForms.xml

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

svn commit: r1643384 - in /ofbiz/trunk/specialpurpose/projectmgr/widget: ProjectScreens.xml forms/ProjectForms.xml

nmalin
Author: nmalin
Date: Fri Dec  5 18:36:33 2014
New Revision: 1643384

URL: http://svn.apache.org/r1643384
Log:
Improve screen projectmgr/control/EditProjectContents, to display the creation form instead of the update content (that doesn't works) when a workEffortContent is deleted. Raise by Dhiraj Gupta on issue OFBIZ-5730.Review the form to display only modification's field that can be modified.
Clean attribut's links by auto-attribut-entity

Modified:
    ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml?rev=1643384&r1=1643383&r2=1643384&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml Fri Dec  5 18:36:33 2014
@@ -915,12 +915,13 @@ under the License.
                 <entity-one entity-name="Content" value-field="content"/>
                 <set field="projectId" from-field="parameters.projectId" default-value="${parameters.workEffortId}"/>
                 <set field="workEffortId" from-field="parameters.projectId" default-value="${parameters.workEffortId}"/>
+                <entity-one entity-name="WorkEffortContent" value-field="workEffortContent"/>
                 <entity-and entity-name="WorkEffortAndContentDataResource" list="workEffortAndContentDataResources">
                     <field-map field-name="workEffortId" from-field="projectId"/>
                 </entity-and>
             </actions>
             <widgets>
-                <decorator-screen name="CommonProjectDecorator"  location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="CommonProjectDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                             <section>
                                 <condition>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml?rev=1643384&r1=1643383&r2=1643384&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml Fri Dec  5 18:36:33 2014
@@ -848,22 +848,18 @@
            </field>
         <field name="submitButton" title="${uiLabelMap.PageTitleAddProjectTimeToNewInvoice}" widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>
-    <form name="ListContents" extends="ListWorkEffortContents" extends-resource="component://workeffort/widget/WorkEffortForms.xml">
+    <form name="ListContents" extends="ListWorkEffortContents" extends-resource="component://workeffort/widget/WorkEffortForms.xml" default-entity-name="WorkEffortContent">
         <field name="contentId" use-when="headerItem.equals(&quot;EditProjectContents&quot;)">
             <display-entity entity-name="Content" key-field-name="contentId" description="${contentName}" also-hidden="true">
                 <sub-hyperlink target="EditProjectContents" description="${contentId}" link-style="buttontext" target-type="inter-app">
-                    <parameter param-name="contentId"/>
-                    <parameter param-name="projectId"/>
-                    <parameter param-name="workEffortContentTypeId"/>
+                    <auto-parameters-entity/>
                 </sub-hyperlink>
             </display-entity>
         </field>
         <field name="contentId" use-when="headerItem.equals(&quot;EditTaskContents&quot;)">
             <display-entity entity-name="Content" key-field-name="contentId" description="${contentName}" also-hidden="true">
                 <sub-hyperlink target="EditTaskContents" description="${contentId}" link-style="buttontext" target-type="inter-app">
-                    <parameter param-name="contentId"/>
-                    <parameter param-name="workEffortId"/>
-                    <parameter param-name="workEffortContentTypeId"/>
+                    <auto-parameters-entity/>
                 </sub-hyperlink>
             </display-entity>
         </field>
@@ -871,10 +867,7 @@
         <field name="submitButton"><ignored/></field>
         <field name="deleteLink" title=" " widget-style="buttontext" use-when="headerItem.equals(&quot;EditProjectContents&quot;)">
             <hyperlink also-hidden="false" description="${uiLabelMap.CommonDelete}" target="deleteProjectContent">
-                <parameter param-name="contentId"/>
-                <parameter param-name="workEffortId"/>
-                <parameter param-name="workEffortContentTypeId"/>
-                <parameter param-name="fromDate"/>
+                <auto-parameters-entity/>
             </hyperlink>
         </field>
         <field name="downloadLink" title=" " widget-style="buttontext">
@@ -882,10 +875,7 @@
         </field>
         <field name="deleteLink" title=" " widget-style="buttontext" use-when="headerItem.equals(&quot;EditTaskContents&quot;)">
             <hyperlink also-hidden="false" description="${uiLabelMap.CommonDelete}" target="deleteTaskContent">
-                <parameter param-name="contentId"/>
-                <parameter param-name="workEffortId"/>
-                <parameter param-name="workEffortContentTypeId"/>
-                <parameter param-name="fromDate"/>
+                <auto-parameters-entity/>
             </hyperlink>
         </field>
     </form>
@@ -902,27 +892,29 @@
             </entity-one>
         </actions>
 
-        <alt-target use-when="content!=null&amp;&amp;headerItem.equals(&quot;EditTaskContents&quot;)" target="updateTaskContent"/>
-        <alt-target use-when="content==null&amp;&amp;headerItem.equals(&quot;EditProjectContents&quot;)" target="createProjectContent"/>
-        <alt-target use-when="content==null&amp;&amp;headerItem.equals(&quot;EditTaskContents&quot;)" target="createTaskContent"/>
+        <alt-target use-when="workEffortContent!=null&amp;&amp;headerItem.equals(&quot;EditTaskContents&quot;)" target="updateTaskContent"/>
+        <alt-target use-when="workEffortContent==null&amp;&amp;headerItem.equals(&quot;EditProjectContents&quot;)" target="createProjectContent"/>
+        <alt-target use-when="workEffortContent==null&amp;&amp;headerItem.equals(&quot;EditTaskContents&quot;)" target="createTaskContent"/>
 
         <field name="workEffortId" map-name="parameters"><hidden/></field>
         <field name="projectId" map-name="parameters"><hidden/></field>
-        <field use-when="content!=null" name="contentId" tooltip="${uiLabelMap.CommonNotModifRecreat}"><display/></field>
-        <field use-when="content==null" name="contentIdTo" title="${uiLabelMap.FormFieldTitle_existContentId}">
+        <field name="contentId" use-when="workEffortContent!=null" tooltip="${uiLabelMap.CommonNotModifRecreat}"><display-entity entity-name="Content" description="[${contentId}] ${contentName}"/></field>
+        <field name="contentIdTo" use-when="workEffortContent==null" title="${uiLabelMap.FormFieldTitle_existContentId}">
             <lookup target-form-name="LookupTreeContent"/>
         </field>
-        
-        <field name="workEffortContentTypeId">
+        <field name="workEffortContentTypeId" use-when="workEffortContent!=null" map-name="workEffortContent">
+            <display-entity entity-name="WorkEffortContentType" description="${description}"/>
+        </field>
+        <field name="workEffortContentTypeId" use-when="workEffortContent==null">
             <drop-down allow-empty="false">
-                <entity-options description="${description}" entity-name="WorkEffortContentType" key-field-name="workEffortContentTypeId"/>
+                <entity-options description="${description}" entity-name="WorkEffortContentType"/>
             </drop-down>
         </field>
         <!-- note sure if these two are necessray, but they are kind of confusing in this context:
             <field name="ownerContentId"><lookup target-form-name="LookupContent"/></field>
             <field name="dataResourceId"><lookup target-form-name="LookupDataResource"/></field>
         -->
-        <field name="contentTypeId">
+        <field name="contentTypeId" use-when="workEffortContent!=null">
             <drop-down allow-empty="false" no-current-selected-key="DOCUMENT">
                 <entity-options description="${description}" entity-name="ContentType"/>
             </drop-down>
@@ -948,7 +940,7 @@
                 <entity-options description="${description}" entity-name="MimeType" key-field-name="mimeTypeId"/>
             </drop-down>
         </field>
-        <field name="dataResourceName" title="${uiLabelMap.CommonUpload}"><file/></field>
+        <field name="dataResourceName" use-when="workEffortContent==null" title="${uiLabelMap.CommonUpload}"><file/></field>
         <field name="contentIdFrom" title="${uiLabelMap.ContentCompDocParentContentId}"><lookup target-form-name="LookupDetailContentTree"/></field>
         <!--field name="dataCategoryId" use-when="dataResource==null">
             <drop-down allow-empty="false">
@@ -964,8 +956,8 @@
                 <entity-options description="${categoryName}" entity-name="DataCategory" key-field-name="dataCategoryId"/>
             </drop-down>
         </field-->
-        <field name="createButton" use-when="content==null"><submit button-type="button"/></field>
-        <field name="updateButton" use-when="content!=null"><submit button-type="button"/></field>
+        <field name="createButton" use-when="workEffortContent==null"><submit button-type="button"/></field>
+        <field name="updateButton" use-when="workEffortContent!=null"><submit button-type="button"/></field>
     </form>
     <form name="ListPhaseInfo" extends="ListPhaseInfo" extends-resource="component://projectmgr/widget/forms/ProjectForms.xml">
         <field name="phase"><display description="${phaseName}"/></field>