From 5017bd9541f30be10c21e76185bfe1cba47742ec Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sun, 4 Sep 2016 01:12:36 +0200 Subject: [PATCH] rewrite notifier template with haml closes #7054 --- Changelog.md | 1 + app/views/layouts/notifier.html.erb | 27 --------------------------- app/views/layouts/notifier.html.haml | 15 +++++++++++++++ 3 files changed, 16 insertions(+), 27 deletions(-) delete mode 100644 app/views/layouts/notifier.html.erb create mode 100644 app/views/layouts/notifier.html.haml diff --git a/Changelog.md b/Changelog.md index da2c396a3..fd450d5b9 100644 --- a/Changelog.md +++ b/Changelog.md @@ -2,6 +2,7 @@ ## Refactor * Indicate proper way to report bugs in the sidebar [#7039](https://github.com/diaspora/diaspora/pull/7039) +* Remove text color from notification mails and fix sender avatar [#7054](https://github.com/diaspora/diaspora/pull/7054) ## Bug fixes diff --git a/app/views/layouts/notifier.html.erb b/app/views/layouts/notifier.html.erb deleted file mode 100644 index 044b717fd..000000000 --- a/app/views/layouts/notifier.html.erb +++ /dev/null @@ -1,27 +0,0 @@ - - - <% if @notification.try(:sender) %> - - <% end %> - - -
-
- <%=@notification.sender%> -
-
- <%= yield %> -
- - - - - -
- <%= t("notifier.email_sent_by_diaspora", pod_name: pod_name) %> - - <%= t("notifier.click_here") %> - - <%=t("notifier.to_change_your_notification_settings")%>. -
diff --git a/app/views/layouts/notifier.html.haml b/app/views/layouts/notifier.html.haml new file mode 100644 index 000000000..8e18a337a --- /dev/null +++ b/app/views/layouts/notifier.html.haml @@ -0,0 +1,15 @@ +%table{cellspacing: 0, cellpadding: 0, border: 0, + style: "font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px"} + %tr + - if @notification.try(:sender) + %td{width: "60px", style: "vertical-align: top"}> + %div{style: "background-color: #eee; height: 50px; width: 50px"} + = image_tag @notification.sender.profile.image_url(:thumb_small), alt: @notification.sender.name, + style: "border: 0, display: block; top: 0; left: 0", height: "50px", width: "50px" + %td{style: "vertical-align: top"} + != yield + +%div{style: "font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 12px; color: #999; padding-top: 10px; margin-top: 10px; border-top: 1px solid #ddd"} + != t("notifier.email_sent_by_diaspora", pod_name: pod_name) + != link_to t("notifier.click_here"), edit_user_url + != t("notifier.to_change_your_notification_settings") + "."