diff --git a/Gemfile b/Gemfile
index 439ca3f..72b8d41 100644
--- a/Gemfile
+++ b/Gemfile
@@ -22,6 +22,9 @@ gem 'sdoc', '~> 0.4.0', group: :doc
gem 'rails_bootstrap_navbar'
+# This gem hooks up your Rails application with Roadie to help you generate HTML emails.
+gem 'roadie-rails', '~> 1.0'
+
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
diff --git a/Gemfile.lock b/Gemfile.lock
index f860516..ca7ccaa 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -66,6 +66,8 @@ GEM
execjs
coffee-script-source (1.10.0)
concurrent-ruby (1.0.2)
+ css_parser (1.4.8)
+ addressable
debug_inspector (0.0.2)
diff-lcs (1.2.5)
dotenv (2.1.1)
@@ -200,6 +202,12 @@ GEM
rdoc (4.2.2)
json (~> 1.4)
remotipart (1.2.1)
+ roadie (3.2.1)
+ css_parser (~> 1.4.5)
+ nokogiri (>= 1.5.0, < 1.8.0)
+ roadie-rails (1.1.1)
+ railties (>= 3.0, < 5.1)
+ roadie (~> 3.1)
rspec (3.4.0)
rspec-core (~> 3.4.0)
rspec-expectations (~> 3.4.0)
@@ -291,6 +299,7 @@ DEPENDENCIES
rails_12factor
rails_admin
rails_bootstrap_navbar
+ roadie-rails (~> 1.0)
rspec-rails (~> 3.0)
sass-rails (~> 5.0)
sdoc (~> 0.4.0)
diff --git a/app/assets/images/IMG_8973.JPG b/app/assets/images/IMG_8973.JPG
new file mode 100644
index 0000000..1db84d0
Binary files /dev/null and b/app/assets/images/IMG_8973.JPG differ
diff --git a/app/assets/images/markus.png b/app/assets/images/markus.png
new file mode 100644
index 0000000..2130d17
Binary files /dev/null and b/app/assets/images/markus.png differ
diff --git a/app/assets/images/nino.png b/app/assets/images/nino.png
new file mode 100644
index 0000000..ddc5676
Binary files /dev/null and b/app/assets/images/nino.png differ
diff --git a/app/assets/stylesheets/application.sass b/app/assets/stylesheets/application.sass
index d5dac35..29dfd39 100644
--- a/app/assets/stylesheets/application.sass
+++ b/app/assets/stylesheets/application.sass
@@ -74,3 +74,8 @@ body
.text-success
color: $brand-success
+
+ .portrait
+ display: block
+ float: left
+ margin: 12px
diff --git a/app/mailers/supporter_mailer.rb b/app/mailers/supporter_mailer.rb
index faa9bf3..f763814 100644
--- a/app/mailers/supporter_mailer.rb
+++ b/app/mailers/supporter_mailer.rb
@@ -1,4 +1,6 @@
class SupporterMailer < ApplicationMailer
+ include Roadie::Rails::Automatic
+
def welcome_email(supporter)
@supporter = supporter
mail(to: @supporter.email, subject: I18n.t('welcome_email.subject'))
diff --git a/app/views/layouts/mailer.slim b/app/views/layouts/mailer.slim
index f2ac24f..930ae8c 100644
--- a/app/views/layouts/mailer.slim
+++ b/app/views/layouts/mailer.slim
@@ -2,5 +2,6 @@ doctype html
html
head
meta content=("text/html; charset=UTF-8") http-equiv="Content-Type" /
+ = stylesheet_link_tag 'application', media: 'all'
body style='padding: 20px; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 16px;'
= yield
diff --git a/app/views/supporter_mailer/welcome_email.de.slim b/app/views/supporter_mailer/welcome_email.de.slim
index 19314c6..211bb57 100644
--- a/app/views/supporter_mailer/welcome_email.de.slim
+++ b/app/views/supporter_mailer/welcome_email.de.slim
@@ -1,22 +1,34 @@
-p
- strong Hallo #{@supporter.first_name},
-
-p Du bist nun ein Teil der Bewegung!
+p Hallo #{@supporter.first_name}, du bist nun ein Teil der Bewegung!
p Wir informieren dich per E-Mail über die nächsten Schritte und kommen aktiv auf dich zu. Auf https://www.hanflegal.ch/initiative informieren wir über laufende Aktivitäten.
p
- b Was kannst du machen?
-
-p
+ | Was kannst du machen?
ul
- li Versende den Link https://ch420.herokuapp.com an all deine Freunde und Bekannte
+ li Versende den Link https://hanflegal.ch/ch420 an all deine Freunde und Bekannte
li Folge uns auf Facebook und Twitter
li Teile unser Projekt in den sozialen Medien mit dem Hashtag #CH420
li Erzähle allen von unserem Vorhaben und bitte Sie mitzumachen
li Werde Mitglied beim Verein Legalize it!
- li Besuche unser Forum. Da findest du eine Jobbörse und spannende Projekte bei denen wir deine Hilfe brauchen können
p
| Hanfige Grüsse,
em die Initianten
+p
+ .portrait
+ = image_tag 'nino.png', class: 'img-rounded', width: 150
+ br
+ strong Nino Forrer
+ br
+ a href="mailto: nino@hanflegal.ch" nino@hanflegal.ch
+ br
+ em Strategie / Presse
+
+ .portrait
+ = image_tag 'markus.png', class: 'img-rounded', width: 150
+ br
+ strong Markus Graf
+ br
+ a href="mailto: markus@hanflegal.ch" markus@hanflegal.ch
+ br
+ em Inhalt / Technik
\ No newline at end of file
diff --git a/app/views/supporter_mailer/welcome_email.fr.slim b/app/views/supporter_mailer/welcome_email.fr.slim
new file mode 100644
index 0000000..6a7b42b
--- /dev/null
+++ b/app/views/supporter_mailer/welcome_email.fr.slim
@@ -0,0 +1,36 @@
+p Salut #{@supporter.first_name}, Tu fais maintenant partie du mouvement!
+
+
+
+p Nous allons t’envoyer par e-mail les informations sur les prochaines étapes. Sur https://www.hanflegal.ch/initiative initiative nous informons des activités en cours.
+
+p
+ | Que peux-tu faire?
+ ul
+ li Envoie le lien pour le formulaire en ligne à tous tes amis et connaissances
+ li Suis-nous sur Facebook et Twitter
+ li Partage notre projet sur les réseaux sociaux avec le hashtag #CH420
+ li Raconte à tout le monde ce que nous avons prévu et demande leurs de participer
+ li Deviens un membre de l’association Legalize it!
+
+p
+ | Hanfige Grüsse,
+ em die Initianten
+p
+ .portrait
+ = image_tag 'nino.png', class: 'img-rounded', width: 150
+ br
+ strong Nino Forrer
+ br
+ a href="mailto: nino@hanflegal.ch" nino@hanflegal.ch
+ br
+ em Strategie / Presse
+
+ .portrait
+ = image_tag 'markus.png', class: 'img-rounded', width: 150
+ br
+ strong Markus Graf
+ br
+ a href="mailto: markus@hanflegal.ch" markus@hanflegal.ch
+ br
+ em Inhalt / Technik
\ No newline at end of file
diff --git a/app/views/supporter_mailer/welcome_email.it.slim b/app/views/supporter_mailer/welcome_email.it.slim
index 35dd536..3232680 100644
--- a/app/views/supporter_mailer/welcome_email.it.slim
+++ b/app/views/supporter_mailer/welcome_email.it.slim
@@ -1,21 +1,34 @@
-p
- strong Ciao #{@supporter.first_name},
-
-p Ora sei una parte del movimento!
+p Ciao #{@supporter.first_name}, ora sei una parte del movimento!
p Vi informeremo via e-mail circa i prossimi passi e diventare attivo. Su https://www.hanflegal.ch/initiative può informarsi sulle attività in corso.
p
- b Che cosa puoi fare?
-p
+ | Che cosa puoi fare?
ul
- li Invia il https://ch420.herokuapp.com a tutti i tuoi amici e conoscenti
+ li Invia il https://hanflegal.ch/ch420 a tutti i tuoi amici e conoscenti
li Seguici su Facebook e Twitter
li Racconta die nostri progetti sui social media con l’Hashtag #CH420
li Di a tutti di unirsi ai nostri progetti
li Diventa un membro dell’ associazione Verein Legalize it!
- li Visita il nostro Forum. Puoi trovare scambi di lavoro e progetti interessanti in cui potrebbe esser richiesto il tuo aiuto.
p
| Saluti,
em hanflegal.ch
+
+.portrait
+ = image_tag 'nino.png', class: 'img-rounded', width: 150
+ br
+ strong Nino Forrer
+ br
+ a href="mailto: nino@hanflegal.ch" nino@hanflegal.ch
+ br
+ em Strategie / Presse
+
+.portrait
+ = image_tag 'markus.png', class: 'img-rounded', width: 150
+ br
+ strong Markus Graf
+ br
+ a href="mailto: markus@hanflegal.ch" markus@hanflegal.ch
+ br
+ em Inhalt / Technik
\ No newline at end of file
diff --git a/spec/mailers/previews/supporter_mailer_preview.rb b/spec/mailers/previews/supporter_mailer_preview.rb
index 3e61c1a..23ffb92 100644
--- a/spec/mailers/previews/supporter_mailer_preview.rb
+++ b/spec/mailers/previews/supporter_mailer_preview.rb
@@ -1,7 +1,7 @@
# Preview all emails at http://localhost:3000/rails/mailers/supporter_mailer
class SupporterMailerPreview < ActionMailer::Preview
def welcome
- I18n.locale = 'it'
+ I18n.locale = :fr
SupporterMailer.welcome_email(Supporter.first)
end
end