Commit 2562d9feace125af452ed4011ae295c29b051ce9

Authored by Leandro Santos
2 parents 928dbe2e 87bd3f7a
Exists in staging and in 1 other branch production

Merge branch 'master' into staging

app/views/person_notifier/mailer/_create_article.html.erb
... ... @@ -5,7 +5,7 @@
5 5 <td>
6 6 <p>
7 7 <span style="font-size: 14px;"><%= link_to activity.user.short_name(20), activity.user.url %></span>
8   - <span style="font-size: 14px;"><%= _("has published on community %s") % link_to(activity.target.profile.short_name(20), activity.target.profile.url, :style => "color: #333; font-weight: bold; text-decoration: none;") if activity.target.profile.is_a?(Community) %></span>
  8 + <span style="font-size: 14px;"><%= _("has published on community %s").html_safe % link_to(activity.target.profile.short_name(20), activity.target.profile.url, :style => "color: #333; font-weight: bold; text-decoration: none;") if activity.target.profile.is_a?(Community) %></span>
9 9 <span style="font-size: 10px; color: #929292; float:right;"><%= time_ago_in_words(activity.created_at) %></span>
10 10 </p>
11 11 <p>
... ...
app/views/person_notifier/mailer/content_summary.html.erb
... ... @@ -5,7 +5,7 @@
5 5 <%= link_to @url, :style => "text-decoration: none;" do %>
6 6 <span style="font-weight:bold;font-size: 28px;margin: 0;color: white;background-color: #AAAAAA;padding: 5px;"><%= @environment.name %></span>
7 7 <% end %>
8   - <span style="font-weight:bold;color: #333;font-size:19px;margin-left: 8px;"><%= _("%s's Notifications") % @profile.name %></h3>
  8 + <span style="font-weight:bold;color: #333;font-size:19px;margin-left: 8px;"><%= _("%s's Notifications").html_safe % @profile.name %></h3>
9 9 </div>
10 10 <div style="margin: 0 20px 20px 20px;border-top:1px solid #e2e2e2;">
11 11 <% if @tasks.present? %>
... ... @@ -34,7 +34,7 @@
34 34  
35 35 <div style="color:#444444;font-size:11px;margin-bottom: 20px;">
36 36 <p style="margin:0"><%= _("Greetings,") %></p>
37   - <p style="margin:0"><%= _('%s team.') % @environment.name %></p>
  37 + <p style="margin:0"><%= _('%s team.').html_safe % @environment.name %></p>
38 38 <p style="margin:0"><%= link_to @url, url_for(@url) %></p>
39 39 </div>
40 40 </div>
... ...
plugins/video/lib/video_plugin/video.rb
... ... @@ -12,8 +12,8 @@ class VideoPlugin::Video &lt; Article
12 12 settings_items :video_format, :type => :string
13 13 settings_items :video_id, :type => :string
14 14 settings_items :video_thumbnail_url, :type => :string, :default => '/plugins/video/images/video_generic_thumbnail.jpg'
15   - settings_items :video_thumbnail_width, :type=> :integer
16   - settings_items :video_thumbnail_height, :type=> :integer
  15 + settings_items :video_thumbnail_width, :type=> :integer, :default => 239
  16 + settings_items :video_thumbnail_height, :type=> :integer, :default => 210
17 17 settings_items :video_duration, :type=> :integer, :default => 0
18 18  
19 19 attr_accessible :video_url
... ... @@ -35,14 +35,14 @@ class VideoPlugin::Video &lt; Article
35 35 def self.description
36 36 _('Display embedded videos.')
37 37 end
38   -
  38 +
39 39 def is_youtube?
40 40 VideoPlugin::Video.is_youtube?(self.video_url)
41 41 end
42 42  
43 43 def is_vimeo?
44 44 VideoPlugin::Video.is_vimeo?(self.video_url)
45   - end
  45 + end
46 46  
47 47 include ActionView::Helpers::TagHelper
48 48 def to_html(options={})
... ...
plugins/video/test/unit/video_test.rb
... ... @@ -46,6 +46,11 @@ class VideoTest &lt; ActiveSupport::TestCase
46 46 assert_equal thumbnail_fitted_height, @video.thumbnail_fitted_height
47 47 end
48 48  
  49 + should "have dimensions of default thumbnail" do
  50 + assert @video.video_thumbnail_height.present? && @video.video_thumbnail_height > 0
  51 + assert @video.video_thumbnail_width.present? && @video.video_thumbnail_width > 0
  52 + end
  53 +
49 54 should "show a no_browser_support_message" do
50 55 assert_equal @video.no_browser_support_message, '<p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a></p>'
51 56 end
... ...