diff --git a/ghost/members-importer/lib/email-template.js b/ghost/members-importer/lib/email-template.js new file mode 100644 index 0000000000..b17042eb10 --- /dev/null +++ b/ghost/members-importer/lib/email-template.js @@ -0,0 +1,178 @@ +const iff = (cond, yes, no) => (cond ? yes : no); +module.exports = ({result, siteUrl, membersUrl, emailRecipient}) => ` + + + + + + Your member import is complete + + + + + + + + + +
  +
+ + + + + + + + + + + + + + +
+ + + + + + + + ${iff(result.imported === 0 && result.errors.length === 0, ` + + + + `, ``)} + ${iff(result.imported > 0, ` + + + `, ``)} + ${iff(result.errors.length > 0, ` + + + `, '')} + + + +
+

Your member import is complete

+
+

No members were added.

+
+

A total of ${result.imported} ${iff(result.imported === 1, 'person', 'people')} were successfully added or updated in your list of members, and now have access to your site.

+
+

+ ${iff(result.imported === 0, `No members were added.`, `${result.errors.length} ${iff(result.errors.length === 1, `member was`, `members were`)} skipped due to errors.`)} We attached a validated CSV file in this email with the complete list of errors so that you can fix them and re-upload the CSV to complete the import.

+
+ View members +
+
+ +
+ + + +
+
 
+ + +`; +