1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <!--
3+ This software is in the public domain under CC0 1.0 Universal plus a
4+ Grant of Patent License.
5+
6+ To the extent possible under law, the author(s) have dedicated all
7+ copyright and related and neighboring rights to this software to the
8+ public domain worldwide. This software is distributed without any
9+ warranty.
10+
11+ You should have received a copy of the CC0 Public Domain Dedication
12+ along with this software (see the LICENSE.md file). If not, see
13+ <http://creativecommons.org/publicdomain/zero/1.0/>.
14+ -->
15+ <screen xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
16+ xsi : noNamespaceSchemaLocation =" http://moqui.org/xsd/xml-screen-2.1.xsd"
17+ default-menu-include =" false" standalone =" true" >
18+
19+ <parameter name =" workEffortId" />
20+ <parameter name =" communicationEventId" />
21+
22+ <transition name =" updateCommentContent" ><service-call name =" mantle.party.CommunicationServices.update#CommunicationEventContent" />
23+ <default-response url =" .." /></transition >
24+ <transition name =" createCommentContent" ><service-call name =" mantle.party.CommunicationServices.create#CommunicationEventContent" />
25+ <default-response url =" .." /></transition >
26+ <transition name =" downloadCommentContent" read-only =" true" >
27+ <parameter name =" communicationEventContentId" />
28+ <actions ><entity-find-one entity-name =" mantle.party.communication.CommunicationEventContent" value-field =" commentContent" />
29+ <script >ec.web.sendResourceResponse(commentContent?.contentLocation)</script ></actions >
30+ <default-response type =" none" />
31+ </transition >
32+ <actions >
33+ <entity-find entity-name =" mantle.party.communication.CommunicationEventContent" list =" commentContentList" >
34+ <econdition field-name =" communicationEventId" /></entity-find >
35+ </actions >
36+
37+ <widgets >
38+ <container-box ><box-header title =" Comment Content" />
39+ <box-toolbar ><container-dialog id =" NewCommentContentDialog${communicationEventId}" button-text =" Add Comment Content" >
40+ <form-single name =" NewCommentContentForm" transition =" createCommentContent" >
41+ <field name =" workEffortId" ><default-field ><hidden /></default-field ></field >
42+ <field name =" communicationEventId" ><default-field ><hidden /></default-field ></field >
43+ <field name =" contentTypeEnumId" ><default-field title =" Content Type" >
44+ <widget-template-include location =" component://webroot/template/screen/BasicWidgetTemplates.xml#enumDropDown" >
45+ <set field =" enumTypeId" value =" CommunicationContentType" /><set field =" allowEmpty" value =" true" /></widget-template-include >
46+ </default-field ></field >
47+ <field name =" contentFile" ><default-field ><file /></default-field ></field >
48+ <field name =" description" ><default-field ><text-line size =" 60" /></default-field ></field >
49+ <field name =" submitButton" ><default-field title =" Add" ><submit /></default-field ></field >
50+ </form-single >
51+ </container-dialog ></box-toolbar >
52+ <box-body >
53+ <section-iterate name =" CommentContentIterateSection" list =" commentContentList" entry =" commentContent" ><actions >
54+ <entity-find-one entity-name =" mantle.party.PersonWithUserAccount" value-field =" paua" >
55+ <field-map field-name =" userId" from =" commentContent.userId" /></entity-find-one >
56+ <entity-find-one entity-name =" moqui.basic.Enumeration" value-field =" contentTypeEnum" >
57+ <field-map field-name =" enumId" from =" commentContent.contentTypeEnumId" /></entity-find-one >
58+ </actions ><widgets >
59+ <container >
60+ <container ><label text =" ${contentTypeEnum?.description?:'No Type'}" type =" strong" /></container >
61+ <link url =" downloadCommentContent" condition =" commentContent.contentLocation"
62+ parameter-map =" [communicationEventContentId:commentContent.communicationEventContentId]"
63+ text =" Download ${commentContent.contentLocation.substring(commentContent.contentLocation.lastIndexOf('/')+1)}" />
64+ <container-dialog id =" UpdateCommentContentContainer${communicationEventId}" button-text =" Edit Comment Content" >
65+ <form-single name =" UpdateCommentContentForm" transition =" updateCommentContent" map =" commentContent" >
66+ <field name =" communicationEventContentId" ><default-field ><hidden /></default-field ></field >
67+ <field name =" workEffortId" ><default-field ><hidden /></default-field ></field >
68+ <field name =" contentTypeEnumId" ><default-field title =" Content Type" >
69+ <widget-template-include location =" component://webroot/template/screen/BasicWidgetTemplates.xml#enumDropDown" >
70+ <set field =" enumTypeId" value =" CommunicationContentType" /><set field =" allowEmpty" value =" true" /></widget-template-include >
71+ </default-field ></field >
72+ <field name =" contentFile" ><default-field ><file /></default-field ></field >
73+ <field name =" description" ><default-field ><text-line size =" 60" /></default-field ></field >
74+ <field name =" submitButton" ><default-field title =" Update" ><submit /></default-field ></field >
75+ </form-single >
76+ </container-dialog >
77+ <container ><label condition =" paua" text =" By ${ec.resource.expand('UsernameTemplate','',paua+[userId:commentContent.userId])} at ${ec.l10n.format(commentContent.contentDate, 'yyyy-MM-dd HH:mm')}" /></container >
78+ <label text =" ${commentContent.description ?: 'No Description'}" type =" p" />
79+ </container >
80+ </widgets ></section-iterate >
81+ </box-body >
82+ </container-box >
83+
84+ </widgets >
85+ </screen >
0 commit comments