refactoring email notification, closes #8
This commit is contained in:
4
server/emails/admin_register/html.pug
Normal file
4
server/emails/admin_register/html.pug
Normal file
@@ -0,0 +1,4 @@
|
||||
extends ../layout.pug
|
||||
|
||||
block content
|
||||
p !{t('admin_register.content', { user, config })}
|
||||
1
server/emails/admin_register/subject.pug
Normal file
1
server/emails/admin_register/subject.pug
Normal file
@@ -0,0 +1 @@
|
||||
| [#{config.title}] #{t('admin_register.subject')}
|
||||
6
server/emails/admin_register/text.pug
Normal file
6
server/emails/admin_register/text.pug
Normal file
@@ -0,0 +1,6 @@
|
||||
p= t('admin_register.content', { user, config })
|
||||
|
||||
hr
|
||||
small #{config.title} / #{config.description}
|
||||
br
|
||||
small <a href="#{config.baseurl}">#{config.baseurl}</a>
|
||||
@@ -1,12 +1,3 @@
|
||||
<!DOCTYPE html>
|
||||
html(lang="en")
|
||||
head
|
||||
meta(charset="UTF-8")
|
||||
meta(name="viewport", content="width=device-width, initial-scale=1.0")
|
||||
meta(http-equiv="X-UA-Compatible", content="ie=edge")
|
||||
title #{config.title}
|
||||
body
|
||||
p= t('email.confirm', { config })
|
||||
|
||||
hr
|
||||
<a href="#{config.baseurl}"> #{config.title} - #{config.description}</a>
|
||||
extends ../layout.pug
|
||||
block content
|
||||
p !{t('confirm.content', { config, user })}
|
||||
@@ -1 +1 @@
|
||||
| [#{config.title}] #{t('email.confirm.subject')}
|
||||
| [#{config.title}] #{t('confirm.subject')}
|
||||
1
server/emails/confirm/text.pug
Normal file
1
server/emails/confirm/text.pug
Normal file
@@ -0,0 +1 @@
|
||||
p !{t('confirm.content', { config })}
|
||||
@@ -1,22 +1,21 @@
|
||||
h3 #{event.title}
|
||||
p Dove: #{event.place.name} - #{event.place.address}
|
||||
p Quando: #{datetime(event.start_datetime)}
|
||||
br
|
||||
if event.image_path
|
||||
<center>
|
||||
<img style="height: 89vh; margin: 0 auto;" src="#{config.baseurl}/media/#{event.image_path}" />
|
||||
</center>
|
||||
p #{event.description}
|
||||
extends ../layout.pug
|
||||
block content
|
||||
h3 #{event.title}
|
||||
p Dove: #{event.place.name} - #{event.place.address}
|
||||
p Quando: #{datetime(event.start_datetime)}
|
||||
br
|
||||
if event.image_path
|
||||
<center>
|
||||
<img style="height: 89vh; margin: 0 auto;" src="#{config.baseurl}/media/#{event.image_path}" />
|
||||
</center>
|
||||
p #{event.description}
|
||||
|
||||
each tag in event.tags
|
||||
span ##{tag.tag}
|
||||
br
|
||||
<a href="#{config.baseurl}/event/#{event.id}">#{config.baseurl}/event/#{event.id}</a>
|
||||
hr
|
||||
if to_confirm
|
||||
p Puoi confermare questo evento <a href="#{config.baseurl}/admin/confirm/#{event.id}">qui</a>
|
||||
else
|
||||
p Puoi eliminare queste notifiche <a href="#{config.baseurl}/del_notification/#{notification.remove_code}">qui</a>
|
||||
|
||||
hr
|
||||
<a href="#{config.baseurl}">#{config.title} - #{config.description}</a>
|
||||
each tag in event.tags
|
||||
span ##{tag.tag}
|
||||
br
|
||||
<a href="#{config.baseurl}/event/#{event.id}">#{config.baseurl}/event/#{event.id}</a>
|
||||
hr
|
||||
if to_confirm
|
||||
p Puoi confermare questo evento <a href="#{config.baseurl}/admin/confirm/#{event.id}">qui</a>
|
||||
else
|
||||
p Puoi eliminare queste notifiche <a href="#{config.baseurl}/del_notification/#{notification.remove_code}">qui</a>
|
||||
|
||||
21
server/emails/event/text.pug
Normal file
21
server/emails/event/text.pug
Normal file
@@ -0,0 +1,21 @@
|
||||
extends ../layout.pug
|
||||
block content
|
||||
h3 #{event.title}
|
||||
p Dove: #{event.place.name} - #{event.place.address}
|
||||
p Quando: #{datetime(event.start_datetime)}
|
||||
br
|
||||
if event.image_path
|
||||
<center>
|
||||
<img style="height: 89vh; margin: 0 auto;" src="#{config.baseurl}/media/#{event.image_path}" />
|
||||
</center>
|
||||
p #{event.description}
|
||||
|
||||
each tag in event.tags
|
||||
span ##{tag.tag}
|
||||
br
|
||||
<a href="#{config.baseurl}/event/#{event.id}">#{config.baseurl}/event/#{event.id}</a>
|
||||
hr
|
||||
if to_confirm
|
||||
p Puoi confermare questo evento <a href="#{config.baseurl}/admin/confirm/#{event.id}">qui</a>
|
||||
else
|
||||
p Puoi eliminare queste notifiche <a href="#{config.baseurl}/del_notification/#{notification.remove_code}">qui</a>
|
||||
13
server/emails/layout.pug
Normal file
13
server/emails/layout.pug
Normal file
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
html(lang="en")
|
||||
head
|
||||
meta(charset="UTF-8")
|
||||
meta(name="viewport", content="width=device-width, initial-scale=1.0")
|
||||
meta(http-equiv="X-UA-Compatible", content="ie=edge")
|
||||
title #{config.title}
|
||||
body
|
||||
block content
|
||||
hr
|
||||
small #{config.title} / #{config.description}
|
||||
br
|
||||
<a href='#{config.baseurl}'> #{config.baseurl}</a>
|
||||
@@ -1,12 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
html(lang="en")
|
||||
head
|
||||
meta(charset="UTF-8")
|
||||
meta(name="viewport", content="width=device-width, initial-scale=1.0")
|
||||
meta(http-equiv="X-UA-Compatible", content="ie=edge")
|
||||
title #{config.title}
|
||||
body
|
||||
p= t('email.recover', {config})
|
||||
extends ../layout.pug
|
||||
|
||||
hr
|
||||
<a href="#{config.baseurl}/recover/#{user.recover_code}">#{t('email.press_here')}</a>
|
||||
block content
|
||||
p !{t('recover.content', {config, user})}
|
||||
@@ -1 +1 @@
|
||||
= `[#{config.title}] ${t('email.recover')}`
|
||||
| [#{config.title}] #{t('recover.subject')}
|
||||
|
||||
1
server/emails/recover/text.pug
Normal file
1
server/emails/recover/text.pug
Normal file
@@ -0,0 +1 @@
|
||||
p= !t('recover.content', {config, user})
|
||||
@@ -1,6 +1,4 @@
|
||||
p= t('email.register')
|
||||
extends ../layout.pug
|
||||
|
||||
hr
|
||||
small #{config.title} / #{config.description}
|
||||
br
|
||||
<a href='#{config.baseurl}'> #{config.baseurl}</a>
|
||||
block content
|
||||
p !{t('register.content', { user, config })}
|
||||
@@ -1 +1 @@
|
||||
| [#{config.title}] #{t('email.register.subject')}
|
||||
| [#{config.title}] #{t('register.subject')}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
p= t('email.register')
|
||||
p= t('register.content', { config, user })
|
||||
|
||||
hr
|
||||
small #{config.title} / #{config.description}
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
<!DOCTYPE html>
|
||||
html(lang="en")
|
||||
head
|
||||
meta(charset="UTF-8")
|
||||
meta(name="viewport", content="width=device-width, initial-scale=1.0")
|
||||
meta(http-equiv="X-UA-Compatible", content="ie=edge")
|
||||
title #{config.title}
|
||||
body
|
||||
|
||||
p !{t('email.user_confirm', { config, user })}
|
||||
extends ../layout.pug
|
||||
block content
|
||||
p !{t('confirm.content', { config, user })}
|
||||
|
||||
@@ -1 +1 @@
|
||||
= `[Gancio] Richiesta password recovery`
|
||||
| [#{config.title}] #{t('confirm.subject')}
|
||||
1
server/emails/user_confirm/text.pug
Normal file
1
server/emails/user_confirm/text.pug
Normal file
@@ -0,0 +1 @@
|
||||
p !{t('confirm.content', { config, user })}
|
||||
Reference in New Issue
Block a user