Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
moqui
/
moqui-mjml
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
88f3e150
authored
2024-05-09 11:23:48 -0500
by
acetousk
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Add grapesjs email
1 parent
5430184b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
screen/emails/GrapesJsEmail.xml
screen/emails/GrapesJsEmail.xml
View file @
88f3e15
...
...
@@ -16,6 +16,31 @@ along with this software (see the LICENSE.md file). If not, see
<screen
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"http://moqui.org/xsd/xml-screen-3.xsd"
>
<actions>
<entity-find-one
entity-name=
"moqui.basic.email.EmailTemplate"
value-field=
"emailTemplate"
auto-field-map=
"[emailTemplateId:emailTemplateId]"
/>
<entity-find-one
entity-name=
"moqui.resource.DbResource"
value-field=
"dbResource"
auto-field-map=
"[resourceId:emailTemplate.resourceId]"
/>
<!-- <log level="warn" message="dbResource ${dbResource}"/>-->
<if
condition=
"!dbResource"
>
<return
error=
"true"
message=
"Resource not found"
/>
</if>
<set
field=
"actualDbResourcePath"
from=
"null"
/>
<set
field=
"dbResourcePath"
from=
"dbResource.filename"
/>
<set
field=
"lastDbResource"
from=
"dbResource"
/>
<!-- <log level="warn" message="lastDbResource ${lastDbResource}"/>-->
<script>
while (actualDbResourcePath == null) {
// ec.logger.warn('dbResourcePath: '+dbResourcePath)
if (lastDbResource.parentResourceId == null) {
dbResourcePath = 'dbresource://'+dbResourcePath
actualDbResourcePath = dbResourcePath
// ec.logger.warn('actualDbResourcePath: '+actualDbResourcePath)
} else {
lastDbResource = ec.entity.fastFindOne("moqui.resource.DbResource", true, false, lastDbResource.parentResourceId)
dbResourcePath = lastDbResource.filename+'/'+dbResourcePath
}
}
</script>
<set
field=
"locationText"
from=
"ec.resource.getLocationText(actualDbResourcePath)"
/>
<log
level=
"warn"
message=
"GrapesJsEmail context.toString(): ${context.toString()}"
/>
</actions>
...
...
Please
register
or
sign in
to post a comment