[Git][noosfero/noosfero][master] 2 commits: Fix: width of table on notification emails
Joenio Costa
gitlab at mg.gitlab.com
Mon Dec 14 19:34:56 BRST 2015
Joenio Costa pushed to branch master at Noosfero / noosfero
Commits:
ec7bb260 by Daniela Soares Feitosa at 2015-12-14T15:42:42Z
Fix: width of table on notification emails
When articles with big images were displayed, the width of the table was
overflowing the content
- - - - -
7816909c by Joenio Costa at 2015-12-14T21:34:32Z
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
- - - - -
2 changed files:
- app/views/person_notifier/mailer/_create_article.html.erb
- app/views/person_notifier/mailer/content_summary.html.erb
Changes:
=====================================
app/views/person_notifier/mailer/_create_article.html.erb
=====================================
--- a/app/views/person_notifier/mailer/_create_article.html.erb
+++ b/app/views/person_notifier/mailer/_create_article.html.erb
@@ -12,7 +12,7 @@
<span style="font-size: 14px;"><%= link_to(activity.params['name'], activity.params['url'], :style => "color: #333; font-weight: bold; text-decoration: none;") %></span>
<br/>
<span title='<%= activity.target.class.short_description %>' class='profile-activity-icon icon-new icon-new<%= activity.target.class.icon_name %>'></span>
- <%= 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? %>
+ <%= 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? %>
</p>
<p><%= content_tag(:p, link_to(_('See complete forum'), activity.get_url), :class => 'see-forum') if activity.target.is_a?(Forum) %></p>
</td>
=====================================
app/views/person_notifier/mailer/content_summary.html.erb
=====================================
--- a/app/views/person_notifier/mailer/content_summary.html.erb
+++ b/app/views/person_notifier/mailer/content_summary.html.erb
@@ -24,7 +24,7 @@
</div>
<% @notifications.each do |activity| %>
<div style="border-bottom:1px solid #e2e2e2;padding:15px 0;width:600px">
- <table style="width:100%;">
+ <table style="width:100%;table-layout:fixed;">
<%= render activity.verb, activity: activity %>
</table>
</div>
View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/9c680ef2f09e55cfb25909f61943502ac96caaed...7816909c0de56e6558d0e450189aa29d4b3a4f6f
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20151214/1ec4a61a/attachment.html>
More information about the Noosfero-dev
mailing list