Commit 7816909c0de56e6558d0e450189aa29d4b3a4f6f

Authored by Joenio Costa
2 parents 9c680ef2 ec7bb260

Merge branch 'limit_email_notification_width' into 'master'

Fix: width of table on notification emails

When articles with big images were displayed, the width of the table was
overflowing the content

See merge request !747
app/views/person_notifier/mailer/_create_article.html.erb
... ... @@ -12,7 +12,7 @@
12 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 13 <br/>
14 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 16 </p>
17 17 <p><%= content_tag(:p, link_to(_('See complete forum'), activity.get_url), :class => 'see-forum') if activity.target.is_a?(Forum) %></p>
18 18 </td>
... ...
app/views/person_notifier/mailer/content_summary.html.erb
... ... @@ -24,7 +24,7 @@
24 24 </div>
25 25 <% @notifications.each do |activity| %>
26 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 28 <%= render activity.verb, activity: activity %>
29 29 </table>
30 30 </div>
... ...