refactoring email notification, closes #8

This commit is contained in:
les
2019-09-06 11:58:11 +02:00
parent 2c24591621
commit beebca7ab9
31 changed files with 195 additions and 149 deletions

View File

@@ -0,0 +1,4 @@
extends ../layout.pug
block content
p !{t('admin_register.content', { user, config })}

View File

@@ -0,0 +1 @@
| [#{config.title}] #{t('admin_register.subject')}

View 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>

View File

@@ -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 })}

View File

@@ -1 +1 @@
| [#{config.title}] #{t('email.confirm.subject')}
| [#{config.title}] #{t('confirm.subject')}

View File

@@ -0,0 +1 @@
p !{t('confirm.content', { config })}

View File

@@ -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>

View 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
View 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>

View File

@@ -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})}

View File

@@ -1 +1 @@
= `[#{config.title}] ${t('email.recover')}`
| [#{config.title}] #{t('recover.subject')}

View File

@@ -0,0 +1 @@
p= !t('recover.content', {config, user})

View File

@@ -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 })}

View File

@@ -1 +1 @@
| [#{config.title}] #{t('email.register.subject')}
| [#{config.title}] #{t('register.subject')}

View File

@@ -1,4 +1,4 @@
p= t('email.register')
p= t('register.content', { config, user })
hr
small #{config.title} / #{config.description}

View File

@@ -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 })}

View File

@@ -1 +1 @@
= `[Gancio] Richiesta password recovery`
| [#{config.title}] #{t('confirm.subject')}

View File

@@ -0,0 +1 @@
p !{t('confirm.content', { config, user })}