diff --git a/message/output/email/templates/email_digest_html.mustache b/message/output/email/templates/email_digest_html.mustache new file mode 100644 index 00000000000..cb15b6e5c20 --- /dev/null +++ b/message/output/email/templates/email_digest_html.mustache @@ -0,0 +1,123 @@ +{{! + This file is part of Moodle - http://moodle.org/ + + Moodle is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Moodle is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Moodle. If not, see . +}} +{{! + @template email_message/email_digest_html + + Template which defines a forum post for sending in a single-post HTML email. + + Classes required for JS: + * none + + Data attributes required for JS: + * none + + Example context (json): + { + "conversations": [ + { + "groupname": "Blue Students", + "coursename": "Math 101", + "numberofunreadmessages": "2", + "messages": [ + { + "userfullname": "Chris Cross", + "message": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla neque nunc, bibendum ac vestibulum sit amet, scelerisque luctus sem. Maecenas ultricies hendrerit augue, ac venenatis odio volutpat nec", + "timesent": "10:12" + }, + { + "userfullname": "Irene Ipsum", + "message": "Etiam a tristique risus. Pellentesque id tellus eget elit dictum varius id sed sapien", + "timesent": "10:14" + } + ], + "viewallmessageslink": "http://example.com" + } + ] + } +}} + + + + +{{#conversations}} + + + + + + + + + {{#messages}} + + + + + {{/messages}} + + + + +
+ {{ groupname }}
+ {{ coursename }} +
+ {{ numberofunreadmessages }} {{#str}} emaildigestunreadmessages, message_email {{/str}} +
+ {{{ userfullname }}} +

{{{ message }}}

+
+ {{ timesent }} +
+ {{{viewallmessageslink}}} +
+{{/conversations}} diff --git a/message/output/email/templates/email_digest_text.mustache b/message/output/email/templates/email_digest_text.mustache new file mode 100644 index 00000000000..eb23e68f229 --- /dev/null +++ b/message/output/email/templates/email_digest_text.mustache @@ -0,0 +1,69 @@ +{{! + This file is part of Moodle - http://moodle.org/ + + Moodle is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Moodle is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Moodle. If not, see . +}} +{{! + @template email_message/email_digest_text + + Template which defines a forum post for sending in a single-post HTML email. + + Classes required for JS: + * none + + Data attributes required for JS: + * none + + Example context (json): + { + "conversations": [ + { + "groupname": "Blue Students", + "coursename": "Math 101", + "numberofunreadmessages": "2", + "messages": [ + { + "userfullname": "Chris Cross", + "message": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla neque nunc, bibendum ac vestibulum sit amet, scelerisque luctus sem. Maecenas ultricies hendrerit augue, ac venenatis odio volutpat nec", + "timesent": "10:12" + }, + { + "userfullname": "Irene Ipsum", + "message": "Etiam a tristique risus. Pellentesque id tellus eget elit dictum varius id sed sapien", + "timesent": "10:14" + } + ], + "viewallmessageslink": "http://example.com" + } + ] + } +}} +{{#conversations}} + {{groupname}} + + {{coursename}} + + {{numberofunreadmessages}} {{#str}}emaildigestunreadmessages, message_email{{/str}} + + {{#messages}} + {{userfullname}} + + {{message}} + + {{timesent}} + + {{viewallmessageslink}} + + {{/messages}} +{{/conversations}}