From c33d9fa97bf63bafccc72506dcace1f0698ad8eb Mon Sep 17 00:00:00 2001 From: decabeza Date: Sat, 13 Oct 2018 13:03:02 +0200 Subject: [PATCH] Improves styles for dashboard mailer forward Uses layout with tables and inline styles to avoid display errors in mail readers --- app/assets/images/social_buttons_mailer.png | Bin 0 -> 2768 bytes app/views/dashboard/mailer/forward.html.erb | 76 +++++++++++++++----- 2 files changed, 59 insertions(+), 17 deletions(-) create mode 100644 app/assets/images/social_buttons_mailer.png diff --git a/app/assets/images/social_buttons_mailer.png b/app/assets/images/social_buttons_mailer.png new file mode 100644 index 0000000000000000000000000000000000000000..522f575cb83bff9ebb4e1e21bf35b62de576a2c3 GIT binary patch literal 2768 zcmaJ@c{r478`nw>6Viv_FpagvY+=mENHdn9VH(unklC1#SgIIKH@BwoIjKIS( zm@LO|KEo~C#hn&@h=!trZ7`r+BD9Qv%@9&RB6bi*fEHPUKl7qx`xP-14En4hJY)_2 z;uM)c1Yx;+2FM&@VM>GVv;-kh5V$$Y5@EIjgn+>|_mQ3WYp06dD>D3JKi_;qn8Za1;s!g(08_gsDu!R1n4yQbeX4f&MoJ z9790kvv@)lmjha1q)@pbLTj+h(=Q>gdEaR{g0E?kB@8N}@St!AY$c>`iUh*{S7o!m zYYT)V#=rjlPhx?47>@xZF$CNYK226QfBh9xJT#Wipa{8qcP=;RTNa5-u8=EWa(N&u zb|q^_kO_f8V{ul5TR)=+1T>x_5K=fa1|DY(mhnJXEIJwiN5ajK_9(1{y)7JWXK85x zgJZEM^F2GwEbU-8I3H8;Q{veE+>K0smz9v4hP99Nm`Z#O>01R?XGFLNR(~phE zt85fqAa_yU|Grh<$GEQ6na-D}VRF-MF#c3LmPOGc2%OVM?uD;*+iW*&}5s&6UHe$Qsb& z*(3WD-XFwcTdr`+HkTS_IQk?_CHC{okx!87eWZeh+q$~c$hpgaKS6uUpOY!1;Oq0T zRHck05yhhgE;t9cIbWW?`Q}4^r=G*g@sYU6~nQ)={_ zo8SE5GUsbG#Z$V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<$ZMr zEUl~F#g9C<%DO)a%y(|dx^*MY(kvn2X^bNmnF%f2lasgeQ0K$CrK&-%T1XkP3fr8! zC>^)S(vnS?FQZ2`guaX(*%107luf4mA?~X6aw&@!W8a)jsb2ZV#M`;xZtwAn{Rd2e B#CZS! literal 0 HcmV?d00001 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") %> + - - <%= 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 %> +
+