diff --git a/app/assets/images/icon_mailer_comment.png b/app/assets/images/icon_mailer_comment.png new file mode 100644 index 000000000..d3c9bff73 Binary files /dev/null and b/app/assets/images/icon_mailer_comment.png differ diff --git a/app/assets/images/icon_mailer_share.png b/app/assets/images/icon_mailer_share.png new file mode 100644 index 000000000..f95d44141 Binary files /dev/null and b/app/assets/images/icon_mailer_share.png differ diff --git a/app/mailers/mailer.rb b/app/mailers/mailer.rb index b8ca433ce..447daabc4 100644 --- a/app/mailers/mailer.rb +++ b/app/mailers/mailer.rb @@ -46,7 +46,7 @@ class Mailer < ApplicationMailer @notification = notification with_user(voter) do - mail(to: voter.email, subject: @notification.title) + mail(to: voter.email, subject: @notification.title + ": " + @notification.proposal.title) end end diff --git a/app/views/mailer/proposal_notification.html.erb b/app/views/mailer/proposal_notification.html.erb index 59489840c..3bcfccc1b 100644 --- a/app/views/mailer/proposal_notification.html.erb +++ b/app/views/mailer/proposal_notification.html.erb @@ -4,6 +4,26 @@

- <%= @notification.body %> + <%= @notification.body %>

+ + + + + + + + + +
+ <%= link_to "#comments", style: "font-family: 'Open Sans','Helvetica Neue',arial,sans-serif; background: #f7f5f2; border-radius: 6px; color: #3d3d66!important; font-weight: bold; margin: 0px; padding: 10px 15px; text-align: center; text-decoration: none; min-width: 200px; display: inline-block;" do %> + <%= image_tag('icon_mailer_share.png', style: "border: 0; display: inline-block; width: 100%; max-width: 16px", alt: "") %> + <%= t('mailers.proposal_notification.share') %> + <% end %> + + <%= link_to "#social-share", style: "font-family: 'Open Sans','Helvetica Neue',arial,sans-serif; background: #f7f5f2; border-radius: 6px; color: #3d3d66!important; font-weight: bold; margin: 0px; padding: 10px 15px; text-align: center; text-decoration: none; min-width: 200px; display: inline-block;" do %> + <%= image_tag('icon_mailer_comment.png', style: "border: 0; display: inline-block; width: 100%; max-width: 16px; vertical-align: middle;", alt: "") %> + <%= t('mailers.proposal_notification.comment') %> + <% end %> +
diff --git a/app/views/proposals/show.html.erb b/app/views/proposals/show.html.erb index 8a391a031..2153b23e5 100644 --- a/app/views/proposals/show.html.erb +++ b/app/views/proposals/show.html.erb @@ -103,7 +103,7 @@ { proposal: @proposal, vote_url: vote_proposal_path(@proposal, value: 'yes') } %> - +

<%= t("proposals.show.share") %>

<%= social_share_button_tag("#{@proposal.title} #{setting['twitter_hashtag']}") %> diff --git a/config/locales/mailers.en.yml b/config/locales/mailers.en.yml index 16cc762d6..1c5c6e42d 100755 --- a/config/locales/mailers.en.yml +++ b/config/locales/mailers.en.yml @@ -29,4 +29,7 @@ en: signatory: "DEPARTMENT OF PUBLIC PARTICIPATION" sorry: "Sorry for the inconvenience and we again thank you for your invaluable participation." subject: "Your investment project '%{code}' has been marked as unfeasible" - unfeasible_html: "From the Madrid City Council we want to thank you for your participation in the participatory budgets of the city of Madrid. We regret to inform you that your proposal '%{title}' will be excluded from this participatory process for the following reason:" \ No newline at end of file + unfeasible_html: "From the Madrid City Council we want to thank you for your participation in the participatory budgets of the city of Madrid. We regret to inform you that your proposal '%{title}' will be excluded from this participatory process for the following reason:" + proposal_notification: + share: Share + comment: Comment proposal \ No newline at end of file diff --git a/config/locales/mailers.es.yml b/config/locales/mailers.es.yml index 8a16c00ec..ada63694b 100644 --- a/config/locales/mailers.es.yml +++ b/config/locales/mailers.es.yml @@ -30,3 +30,6 @@ es: sorry: "Sentimos las molestias ocasionadas y volvemos a darte las gracias por tu inestimable participación." subject: "Tu propuesta de inversión '%{code}' ha sido marcada como inviable" unfeasible_html: "Desde el Ayuntamiento de Madrid queremos agradecer tu participación en los Presupuestos Participativos de la ciudad de Madrid. Lamentamos informarte de que tu propuesta '%{title}' quedará excluida de este proceso participativo por el siguiente motivo:" + proposal_notification: + share: Compartir + comment: Comentar propuesta \ No newline at end of file