mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
renamed email templator -> email builder
This commit is contained in:
parent
360fac9510
commit
eb92e5832b
2 changed files with 9 additions and 4 deletions
|
@ -10,6 +10,7 @@ templates = {}
|
|||
templates.welcome =
|
||||
subject: _.template "Welcome to ShareLaTeX"
|
||||
layout: PersonalEmailLayout
|
||||
type:"lifecycle"
|
||||
compiledTemplate: _.template '''
|
||||
Hi {{first_name}}, thanks for signing up to ShareLaTeX. If you ever get lost, you can log in again <a href="https://www.sharelatex.com/login">here</a>.
|
||||
<p>
|
||||
|
@ -25,6 +26,7 @@ ShareLaTeX Co-founder
|
|||
templates.canceledSubscription =
|
||||
subject: _.template "ShareLaTeX thoughts"
|
||||
layout: PersonalEmailLayout
|
||||
type:"lifecycle"
|
||||
compiledTemplate: _.template '''
|
||||
Hi {{first_name}},
|
||||
|
||||
|
@ -40,6 +42,7 @@ ShareLaTeX Co-founder
|
|||
templates.passwordReset =
|
||||
subject: _.template "Password Reset - ShareLatex.com"
|
||||
layout: NotificationEmailLayout
|
||||
type:"notification"
|
||||
compiledTemplate: _.template '''
|
||||
<h1 class="h1">Password Reset</h1>
|
||||
<p>
|
||||
|
@ -55,6 +58,7 @@ please <a href="https://www.sharelatex.com/login">login here</a> and then change
|
|||
templates.projectSharedWithYou =
|
||||
subject: _.template "{{owner.email}} wants to share {{project.name}} with you"
|
||||
layout: NotificationEmailLayout
|
||||
type:"notification"
|
||||
compiledTemplate: _.template '''
|
||||
<h1 class="h1">{{owner.email}} wants to share <a href="{{project.url}}">'{{project.name}}'</a> with you</h1>
|
||||
<p> </p>
|
||||
|
@ -81,5 +85,6 @@ module.exports =
|
|||
return {
|
||||
subject : template.subject(opts)
|
||||
html: template.layout(opts)
|
||||
type:template.type
|
||||
}
|
||||
|
|
@ -3,7 +3,7 @@ SandboxedModule = require('sandboxed-module')
|
|||
assert = require('assert')
|
||||
path = require('path')
|
||||
sinon = require('sinon')
|
||||
modulePath = path.join __dirname, "../../../../app/js/Features/Email/EmailTemplator"
|
||||
modulePath = path.join __dirname, "../../../../app/js/Features/Email/EmailBuilder"
|
||||
expect = require("chai").expect
|
||||
_ = require('underscore')
|
||||
_.templateSettings =
|
||||
|
@ -14,7 +14,7 @@ describe "Email Templator ", ->
|
|||
beforeEach ->
|
||||
|
||||
@settings = {}
|
||||
@EmailTemplator = SandboxedModule.require modulePath, requires:
|
||||
@EmailBuilder = SandboxedModule.require modulePath, requires:
|
||||
"settings-sharelatex":@settings
|
||||
"logger-sharelatex": log:->
|
||||
|
||||
|
@ -24,7 +24,7 @@ describe "Email Templator ", ->
|
|||
@opts =
|
||||
to:"bob@bob.com"
|
||||
first_name:"bob"
|
||||
@email = @EmailTemplator.buildEmail("welcome", @opts)
|
||||
@email = @EmailBuilder.buildEmail("welcome", @opts)
|
||||
|
||||
it "should insert the first_name into the template", ->
|
||||
@email.html.indexOf(@opts.first_name).should.not.equal -1
|
||||
|
@ -42,7 +42,7 @@ describe "Email Templator ", ->
|
|||
project:
|
||||
url:"http://www.project.com"
|
||||
name:"standard project"
|
||||
@email = @EmailTemplator.buildEmail("projectSharedWithYou", @opts)
|
||||
@email = @EmailBuilder.buildEmail("projectSharedWithYou", @opts)
|
||||
|
||||
it "should insert the owner email into the template", ->
|
||||
@email.html.indexOf(@opts.owner.email).should.not.equal -1
|
Loading…
Reference in a new issue