diff --git a/app/assets/images/social_buttons_mailer.png b/app/assets/images/social_buttons_mailer.png new file mode 100644 index 000000000..522f575cb Binary files /dev/null and b/app/assets/images/social_buttons_mailer.png differ diff --git a/app/assets/stylesheets/dashboard.scss b/app/assets/stylesheets/dashboard.scss index a97a67f85..db9ac5b93 100644 --- a/app/assets/stylesheets/dashboard.scss +++ b/app/assets/stylesheets/dashboard.scss @@ -424,7 +424,7 @@ .dashboard-mail-preview { .mail-header { - background-color: $brand; + background: #3700fd; color: #fff; padding: $line-height; text-align: center; @@ -432,6 +432,10 @@ .mail-body { text-align: justify; + + .button { + background: #3700fd; + } } } diff --git a/app/assets/stylesheets/dashboard_mailer.scss b/app/assets/stylesheets/dashboard_mailer.scss deleted file mode 100644 index 8e4f3ba6b..000000000 --- a/app/assets/stylesheets/dashboard_mailer.scss +++ /dev/null @@ -1,66 +0,0 @@ -@import 'application'; - -body { - padding-left: 30%; - padding-right: 30%; - - p { - text-align: justify; - } -} - -header { - background-color: #3700fd; - color: #fff; - padding: 20pt; - margin-bottom: 0; - border-bottom: 0; - - h1 { - font-size: 40pt; - text-align: center; - } - - h2 { - font-size: 25pt; - text-align: center; - } -} - -.proposal-image { - width: 100%; -} - -.mail-body { - color: #838383; - font-size: 18pt; - margin-top: 20pt; -} - -.support-link { - display: block; - background-color: #004a84; - color: #dff; - text-decoration: none; - border: 1px solid $border; - width: 80%; - margin-left: auto; - margin-right: auto; - font-size: 40pt; - padding: 20pt; - border-radius: 5pt; - text-align: center; - margin-top: 50pt; - margin-bottom: 50pt; -} - -.support-link:hover { - color: #ddffffff; - text-decoration: none; -} - -.share-title { - font-weight: bold; - font-size: 25pt; -} - diff --git a/app/mailers/dashboard/mailer.rb b/app/mailers/dashboard/mailer.rb index 3000f7d67..e246fb914 100644 --- a/app/mailers/dashboard/mailer.rb +++ b/app/mailers/dashboard/mailer.rb @@ -1,5 +1,5 @@ class Dashboard::Mailer < ApplicationMailer - layout 'dashboard/mailer' + layout 'mailer' def forward(proposal) @proposal = proposal diff --git a/app/views/dashboard/mailer/forward.html.erb b/app/views/dashboard/mailer/forward.html.erb index b3f5ee999..3788c94aa 100644 --- a/app/views/dashboard/mailer/forward.html.erb +++ b/app/views/dashboard/mailer/forward.html.erb @@ -1,19 +1,61 @@ -
-

<%= @proposal.title %>

-

<%= t("dashboard.mailer.forward.subtitle") %>

-
-<%= image_tag @proposal.image.attachment.url(:large), class: 'proposal-image' if @proposal.image.present? %> -<%= image_tag 'default_mailing.jpg', class: 'proposal-image' unless @proposal.image.present? %> -
- <%== t("dashboard.mailer.forward.introduction") %> - <%= link_to t("dashboard.mailer.forward.support_it"), proposal_url(@proposal), class: 'support-link' %> - <%== t("dashboard.mailer.forward.share_info") %> + -

<%= t("dashboard.mailer.forward.share_in") %>

- <%= render partial: 'shared/social_share', locals: { - title: @proposal.title, - url: proposal_url(@proposal), - description: @proposal.summary - } %> + + + + + + +
+

<%= @proposal.title %>

+

<%= t("dashboard.mailer.forward.subtitle") %>

+
-
+ <% if @proposal.image.present? %> + <%= image_tag @proposal.image.attachment.url(:large), style: "max-width: 100%;" %> + <% else %> + <%= image_tag "default_mailing.jpg", style: "max-width: 100%;" %> + <% end %> + +

<%= t("dashboard.mailer.forward.hi")%>

+

<%= t("dashboard.mailer.forward.introduction", org: setting['org_name']) %>

+

<%= t("dashboard.mailer.forward.support") %>

+ + + + + + + +
+ <%= link_to proposal_url(@proposal), + style: "font-family: 'Open Sans',arial,sans-serif; background: #3700fd; + border-radius: 6px; color: #fff !important; font-weight: bold; + padding: 17px 20px; text-align: center; text-decoration: none; + font-size: 20px; min-width: 200px; display: inline-block;", + target: "_blank" do %> + <%= t("dashboard.mailer.forward.support_button") %> + <% end %> +
+ +

<%= t("dashboard.mailer.forward.share") %>

+ + + + + + + + + + +
+

<%= t("dashboard.mailer.forward.share_in") %>

+
+ <%= link_to proposal_url(@proposal, anchor: "social-share") do %> + <%= image_tag("social_buttons_mailer.png", alt: t("dashboard.mailer.forward.share_in"), + style: "max-width: 100%;") %> + <% end %> +
+ diff --git a/app/views/dashboard/mailing/index.html.erb b/app/views/dashboard/mailing/index.html.erb index a08141ac7..abca60739 100644 --- a/app/views/dashboard/mailing/index.html.erb +++ b/app/views/dashboard/mailing/index.html.erb @@ -15,14 +15,16 @@
- <%== t("dashboard.mailer.forward.introduction") %> +

<%= t("dashboard.mailer.forward.hi") %>

+

<%= t("dashboard.mailer.forward.introduction", org: setting['org_name']) %>

+

<%= t("dashboard.mailer.forward.support") %>

- <%= link_to t("dashboard.mailer.forward.support_it"), + <%= link_to t("dashboard.mailer.forward.support_button"), proposal_url(@proposal), class: "button large" %>
- <%== t("dashboard.mailer.forward.share_info") %> + <%= t("dashboard.mailer.forward.share") %>

<%= t("dashboard.mailer.forward.share_in") %>

diff --git a/app/views/layouts/dashboard/mailer.html.erb b/app/views/layouts/dashboard/mailer.html.erb deleted file mode 100644 index 1d57e6bdd..000000000 --- a/app/views/layouts/dashboard/mailer.html.erb +++ /dev/null @@ -1,10 +0,0 @@ - - - - - <%= stylesheet_link_tag "dashboard_mailer" %> - - - <%= yield %> - - diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 03469442d..b7fafd0f0 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -15,7 +15,6 @@ Rails.application.config.assets.precompile += %w( stat_graphs.js ) Rails.application.config.assets.precompile += %w( dashboard_graphs.js ) Rails.application.config.assets.precompile += %w( print.css ) Rails.application.config.assets.precompile += %w( ie.css ) -Rails.application.config.assets.precompile += %w( dashboard_mailer.css ) Rails.application.config.assets.precompile += %w( pdf_fonts.css ) # Loads app/assets/images/custom before app/assets/images diff --git a/config/locales/en/general.yml b/config/locales/en/general.yml index 06ab0fba4..3fc400f87 100644 --- a/config/locales/en/general.yml +++ b/config/locales/en/general.yml @@ -607,34 +607,12 @@ en: mailer: forward: subtitle: If you support me, we will achieve it. - support_it: Support this proposal + support_button: Support this proposal share_in: Share in - introduction: - "

Hello!

- -

- I am writing to let you know that I am - participating in Decide Madrid, the platform for - Madrid and Madrid we can decide which city - we want. And for that, I created my own citizen proposal - and now, I'm going to need your support! But do not worry because - It is very simple. -

- -

- You just have to click on the button that you will see below - 'Support this proposal' and you can directly inform yourself about - before promoting it. Only the proposals that achieve the - maximum support will be carried out by our City Council, - and I thought that you, I'm sure you help me achieve it! -

" - share_info: - "

- And if you also do me the great favor of sharing my proposal with - your friends, family and contacts, it would be the bomb! Can - do it next from the social network that you want or from your - email: -

" + hi: "Hello!" + introduction: I am writing to let you know that I am participating in %{org}, the platform we can decide which city we want. And for that, I created my own citizen proposal and now, I'm going to need your support! But do not worry because It is very simple. + support: "You just have to click on the button that you will see below 'Support this proposal' and you can directly inform yourself about before promoting it. Only the proposals that achieve the maximum support will be carried out by our City Council, and I thought that you, I'm sure you help me achieve it!" + share: "And if you also do me the great favor of sharing my proposal with your friends, family and contacts, it would be the bomb! Can do it next from the social network that you want or from your email." polls: all: "All" no_dates: "no date assigned" diff --git a/config/locales/es/general.yml b/config/locales/es/general.yml index c32be9b97..0c461fc9f 100644 --- a/config/locales/es/general.yml +++ b/config/locales/es/general.yml @@ -607,34 +607,12 @@ es: mailer: forward: subtitle: Si me apoyas, lo conseguiremos. - support_it: Apoyar esta propuesta + support_button: Apoyar esta propuesta share_in: Compartir en - introduction: -

¡Hola!

- -

- Te escribo para comunicarte que estoy - participando en Decide Madrid, la plataforma para que - los madrileños y madrileñas podamos decidir qué ciudad - queremos. Y para ello, he creado mi propia propuesta ciudadana - y ahora, ¡voy a necesitar tu apoyo! Pero no te preocupes porque - es muy sencillo. -

- -

- Tan sólo tienes que pinchar en el botón que verás a continuación - 'Apoyar esta propuesta' y directamente podrás informarte a cerca de - ella antes de impulsarla. Sólo las propuestas que consigan el - máximo apoyo se llevarán a cabo por parte de nuestro Ayuntamiento, - y he pensado que tú, ¡seguro que me ayudas a lograrlo! -

- share_info: - "

- Y si además, me haces el gran favor de compartir mi propuesta con - tus amigos, familiares y contactos, ¡ya sería la bomba! Puedes - hacerlo a continuación desde la red social que tú quieras o desde tu - correo electrónico: -

" + hi: "¡Hola!" + introduction: "Te escribo para comunicarte que estoy participando en %{org}, la plataforma para que podamos decidir qué ciudad queremos. Y para ello, he creado mi propia propuesta ciudadana y ahora, ¡voy a necesitar tu apoyo! Pero no te preocupes porque es muy sencillo." + support: "Tan sólo tienes que hacer clic en el botón que verás a continuación 'Apoyar esta propuesta' y directamente podrás informarte acerca de ella antes de impulsarla. Sólo las propuestas que consigan el máximo apoyo se llevarán a cabo por parte de nuestro Ayuntamiento, y he pensado que tú, ¡seguro que me ayudas a lograrlo!" + share: "Y si además, me haces el gran favor de compartir mi propuesta con tus amigos, familiares y contactos, ¡ya sería la bomba! Puedes hacerlo a continuación desde la red social que tú quieras o desde tu correo electrónico." polls: all: "Todas" no_dates: "sin fecha asignada"