rewrite notifier template with haml

closes #7054
This commit is contained in:
Benjamin Neff 2016-09-04 01:12:36 +02:00 committed by Steffen van Bergerem
parent b0611ce270
commit 5017bd9541
No known key found for this signature in database
GPG key ID: 2F08F75F9525C7E0
3 changed files with 16 additions and 27 deletions

View file

@ -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

View file

@ -1,27 +0,0 @@
<table cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:14px;">
<tr width="100%">
<% if @notification.try(:sender) %>
<td style="vertical-align:top;" width="60px">
<div style="background-color:#eee; height:50px; width:50px;">
<img alt="<%=@notification.sender%>" src="<%=@notification.sender.profile.image_url(:thumb_small)%>"
style="border:0; display:block; top:0; left:0;" height="50px" width="50px">
</div>
</td>
<% end %>
<td style="vertical-align:top;">
<%= yield %>
</td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" border="0" align="center" width="100%" 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;">
<tr>
<td>
<%= t("notifier.email_sent_by_diaspora", pod_name: pod_name) %>
<a href="<%=edit_user_url%>">
<%= t("notifier.click_here") %>
</a>
<%=t("notifier.to_change_your_notification_settings")%>.
</td>
</tr>
</table>

View file

@ -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") + "."