]> git.openstreetmap.org Git - rails.git/blob - app/views/notifier/_message_body.html.erb
Put the user avatar in a <p> block
[rails.git] / app / views / notifier / _message_body.html.erb
1 <table style="font-size: 15px; font-style: italic; margin: 15px; background-color: #eee; width: 520px">
2   <tr>
3     <td style="width: 50px; vertical-align: top; padding: 5px 15px">
4       <%# Some email clients (e.g. Yahoo as of 2017-01) remove the margin
5         on <p> tags. Since the body itself always starts with a <p>, by
6         wrapping the image here in a <p> as well, we ensure that they will at
7         least always be aligned with each other. %>
8       <p>
9         <%= link_to(
10             image_tag(
11               attachments["avatar.png"].url,
12               alt: @author,
13               title: @author
14             ),
15             user_url(@author, :host => SERVER_URL),
16             :target => "_blank"
17         ) %>
18       </p>
19     </td>
20     <td style="text-align: left; vertical-align: top; padding-right: 10px">
21       <%= body %>
22     </td>
23   </tr>
24 </table>