Add grapesjs email
Showing
1 changed file
with
25 additions
and
0 deletions
... | @@ -16,6 +16,31 @@ along with this software (see the LICENSE.md file). If not, see | ... | @@ -16,6 +16,31 @@ along with this software (see the LICENSE.md file). If not, see |
16 | <screen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/xml-screen-3.xsd"> | 16 | <screen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/xml-screen-3.xsd"> |
17 | 17 | ||
18 | <actions> | 18 | <actions> |
19 | <entity-find-one entity-name="moqui.basic.email.EmailTemplate" value-field="emailTemplate" auto-field-map="[emailTemplateId:emailTemplateId]"/> | ||
20 | <entity-find-one entity-name="moqui.resource.DbResource" value-field="dbResource" auto-field-map="[resourceId:emailTemplate.resourceId]"/> | ||
21 | <!-- <log level="warn" message="dbResource ${dbResource}"/>--> | ||
22 | <if condition="!dbResource"> | ||
23 | <return error="true" message="Resource not found"/> | ||
24 | </if> | ||
25 | <set field="actualDbResourcePath" from="null"/> | ||
26 | <set field="dbResourcePath" from="dbResource.filename"/> | ||
27 | <set field="lastDbResource" from="dbResource"/> | ||
28 | <!-- <log level="warn" message="lastDbResource ${lastDbResource}"/>--> | ||
29 | <script> | ||
30 | while (actualDbResourcePath == null) { | ||
31 | // ec.logger.warn('dbResourcePath: '+dbResourcePath) | ||
32 | if (lastDbResource.parentResourceId == null) { | ||
33 | dbResourcePath = 'dbresource://'+dbResourcePath | ||
34 | actualDbResourcePath = dbResourcePath | ||
35 | // ec.logger.warn('actualDbResourcePath: '+actualDbResourcePath) | ||
36 | } else { | ||
37 | lastDbResource = ec.entity.fastFindOne("moqui.resource.DbResource", true, false, lastDbResource.parentResourceId) | ||
38 | dbResourcePath = lastDbResource.filename+'/'+dbResourcePath | ||
39 | } | ||
40 | } | ||
41 | </script> | ||
42 | <set field="locationText" from="ec.resource.getLocationText(actualDbResourcePath)"/> | ||
43 | |||
19 | <log level="warn" message="GrapesJsEmail context.toString(): ${context.toString()}"/> | 44 | <log level="warn" message="GrapesJsEmail context.toString(): ${context.toString()}"/> |
20 | </actions> | 45 | </actions> |
21 | 46 | ... | ... |
-
Please register or sign in to post a comment