Author: diveshdutta
Date: Sat Jun 18 20:29:51 2016 New Revision: 1749091 URL: http://svn.apache.org/viewvc?rev=1749091&view=rev Log: [OFBIZ-7374] Added capability to expire or remove the content for a party. Thanks Ankush Upadhyay for your patch and thanks Swapnil Shah for suggeting this improvement. Modified: ofbiz/trunk/applications/content/servicedef/services_content.xml ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml Modified: ofbiz/trunk/applications/content/servicedef/services_content.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/servicedef/services_content.xml?rev=1749091&r1=1749090&r2=1749091&view=diff ============================================================================== --- ofbiz/trunk/applications/content/servicedef/services_content.xml (original) +++ ofbiz/trunk/applications/content/servicedef/services_content.xml Sat Jun 18 20:29:51 2016 @@ -106,7 +106,7 @@ <group> <invoke name="updateDataResource" parameters="preserve" result-to-context="true"/> <invoke name="attachUploadToDataResource" parameters="preserve" result-to-context="true"/> - <invoke name="updateContent"/> + <invoke name="updatePartyContent"/> </group> </service> Modified: ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml?rev=1749091&r1=1749090&r2=1749091&view=diff ============================================================================== --- ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml (original) +++ ofbiz/trunk/applications/party/widget/partymgr/PartyForms.xml Sat Jun 18 20:29:51 2016 @@ -749,11 +749,18 @@ under the License. <alt-target use-when="content==null" target="createPartyContent"/> <!-- <auto-fields-entity entity-name="Content"/> --> - <field name="partyId" map-name="parameters"><hidden/></field> <field name="dataResourceId" map-name="dataResource" use-when="content!=null"><hidden/></field> <field use-when="content!=null" name="contentId"><display/></field> - <field name="partyContentTypeId"> + <field name="partyContentTypeId" use-when="partyContent!=null"> + <drop-down allow-empty="false"> + <entity-options entity-name="PartyContentType"> + <entity-constraint name="partyContentTypeId" value="${partyContent.partyContentTypeId}"/> + </entity-options> + <entity-options entity-name="PartyContentType"/> + </drop-down> + </field> + <field name="partyContentTypeId" use-when="partyContent==null"> <drop-down allow-empty="false"> <entity-options entity-name="PartyContentType"/> </drop-down> @@ -767,6 +774,9 @@ under the License. <entity-options entity-name="ContentType"/> </drop-down> </field> + <field name="fromDate" use-when="partyContent==null"><date-time/></field> + <field name="fromDate" use-when="partyContent!=null" map-name="partyContent"><display/></field> + <field name="thruDate" map-name="partyContent"><date-time/></field> <field name="statusId" use-when="content==null"> <drop-down allow-empty="false" no-current-selected-key="CTNT_AVAILABLE"> <entity-options entity-name="StatusItem"> @@ -840,11 +850,24 @@ under the License. <field name="dataResourceId" title="${uiLabelMap.FormFieldTitle_dataResourceName}" use-when="dataResourceId!=null"> <display-entity entity-name="DataResource" description="${dataResourceName}"/> </field> + <field name="fromDate"><display type="date-time"></display></field> + <field name="thruDate"><display type="date-time"></display></field> <field name="editLink" title=" " widget-style="smallSubmit"> <hyperlink also-hidden="false" description="${uiLabelMap.CommonEdit}" target="EditPartyContents"> <parameter param-name="contentId"/> <parameter param-name="partyId"/> <parameter param-name="dataResourceId"/> + <parameter param-name="fromDate"/> + <parameter param-name="partyContentTypeId"/> + </hyperlink> + </field> + <field name="remove" title=" " widget-style="smallSubmit"> + <hyperlink also-hidden="false" description="${uiLabelMap.CommonRemove}" target="removePartyContent"> + <parameter param-name="contentId"/> + <parameter param-name="partyId"/> + <parameter param-name="dataResourceId"/> + <parameter param-name="fromDate"/> + <parameter param-name="partyContentTypeId"/> </hyperlink> </field> </form> Modified: ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml?rev=1749091&r1=1749090&r2=1749091&view=diff ============================================================================== --- ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml (original) +++ ofbiz/trunk/applications/party/widget/partymgr/PartyScreens.xml Sat Jun 18 20:29:51 2016 @@ -850,6 +850,12 @@ under the License. <set field="partyId" from-field="parameters.partyId"/> <set field="contentId" from-field="parameters.contentId"/> <entity-one entity-name="Content" value-field="content"/> + <entity-one entity-name="PartyContent" value-field="partyContent"> + <field-map field-name="contentId" from-field="parameters.contentId"/> + <field-map field-name="partyId" from-field="parameters.partyId"/> + <field-map field-name="partyContentTypeId" from-field="parameters.partyContentTypeId"/> + <field-map field-name="fromDate" from-field="parameters.fromDate"/> + </entity-one> </actions> <widgets> <decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}"> |
Free forum by Nabble | Edit this page |