Commit ec7bb260620eac680e1c4ac9f80b4f3903c8465b

Authored by Daniela Feitosa
1 parent 9c680ef2

Fix: width of table on notification emails

When articles with big images were displayed, the width of the table was
overflowing the content
app/views/person_notifier/mailer/_create_article.html.erb
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 <span style="font-size: 14px;"><%= link_to(activity.params['name'], activity.params['url'], :style => "color: #333; font-weight: bold; text-decoration: none;") %></span> 12 <span style="font-size: 14px;"><%= link_to(activity.params['name'], activity.params['url'], :style => "color: #333; font-weight: bold; text-decoration: none;") %></span>
13 <br/> 13 <br/>
14 <span title='<%= activity.target.class.short_description %>' class='profile-activity-icon icon-new icon-new<%= activity.target.class.icon_name %>'></span> 14 <span title='<%= activity.target.class.short_description %>' class='profile-activity-icon icon-new icon-new<%= activity.target.class.icon_name %>'></span>
15 - <%= image_tag(activity.params['first_image']) unless activity.params['first_image'].blank? %><%= strip_tags(truncate(activity.params['lead'], :length => 1000, :ommision => '...')).gsub(/(\xC2\xA0|\s)+/, ' ').gsub(/^\s+/, '') unless activity.params['lead'].blank? %> 15 + <%= image_tag(activity.params['first_image'], :style => 'max-width:100%;') unless activity.params['first_image'].blank? %><%= strip_tags(truncate(activity.params['lead'], :length => 1000, :ommision => '...')).gsub(/(\xC2\xA0|\s)+/, ' ').gsub(/^\s+/, '') unless activity.params['lead'].blank? %>
16 </p> 16 </p>
17 <p><%= content_tag(:p, link_to(_('See complete forum'), activity.get_url), :class => 'see-forum') if activity.target.is_a?(Forum) %></p> 17 <p><%= content_tag(:p, link_to(_('See complete forum'), activity.get_url), :class => 'see-forum') if activity.target.is_a?(Forum) %></p>
18 </td> 18 </td>
app/views/person_notifier/mailer/content_summary.html.erb
@@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
24 </div> 24 </div>
25 <% @notifications.each do |activity| %> 25 <% @notifications.each do |activity| %>
26 <div style="border-bottom:1px solid #e2e2e2;padding:15px 0;width:600px"> 26 <div style="border-bottom:1px solid #e2e2e2;padding:15px 0;width:600px">
27 - <table style="width:100%;"> 27 + <table style="width:100%;table-layout:fixed;">
28 <%= render activity.verb, activity: activity %> 28 <%= render activity.verb, activity: activity %>
29 </table> 29 </table>
30 </div> 30 </div>