Commit 2562d9feace125af452ed4011ae295c29b051ce9
Exists in
staging
and in
1 other branch
Merge branch 'master' into staging
Showing
4 changed files
with
12 additions
and
7 deletions
Show diff stats
app/views/person_notifier/mailer/_create_article.html.erb
@@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
5 | <td> | 5 | <td> |
6 | <p> | 6 | <p> |
7 | <span style="font-size: 14px;"><%= link_to activity.user.short_name(20), activity.user.url %></span> | 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 | <span style="font-size: 10px; color: #929292; float:right;"><%= time_ago_in_words(activity.created_at) %></span> | 9 | <span style="font-size: 10px; color: #929292; float:right;"><%= time_ago_in_words(activity.created_at) %></span> |
10 | </p> | 10 | </p> |
11 | <p> | 11 | <p> |
app/views/person_notifier/mailer/content_summary.html.erb
@@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
5 | <%= link_to @url, :style => "text-decoration: none;" do %> | 5 | <%= link_to @url, :style => "text-decoration: none;" do %> |
6 | <span style="font-weight:bold;font-size: 28px;margin: 0;color: white;background-color: #AAAAAA;padding: 5px;"><%= @environment.name %></span> | 6 | <span style="font-weight:bold;font-size: 28px;margin: 0;color: white;background-color: #AAAAAA;padding: 5px;"><%= @environment.name %></span> |
7 | <% end %> | 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 | </div> | 9 | </div> |
10 | <div style="margin: 0 20px 20px 20px;border-top:1px solid #e2e2e2;"> | 10 | <div style="margin: 0 20px 20px 20px;border-top:1px solid #e2e2e2;"> |
11 | <% if @tasks.present? %> | 11 | <% if @tasks.present? %> |
@@ -34,7 +34,7 @@ | @@ -34,7 +34,7 @@ | ||
34 | 34 | ||
35 | <div style="color:#444444;font-size:11px;margin-bottom: 20px;"> | 35 | <div style="color:#444444;font-size:11px;margin-bottom: 20px;"> |
36 | <p style="margin:0"><%= _("Greetings,") %></p> | 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 | <p style="margin:0"><%= link_to @url, url_for(@url) %></p> | 38 | <p style="margin:0"><%= link_to @url, url_for(@url) %></p> |
39 | </div> | 39 | </div> |
40 | </div> | 40 | </div> |
plugins/video/lib/video_plugin/video.rb
@@ -12,8 +12,8 @@ class VideoPlugin::Video < Article | @@ -12,8 +12,8 @@ class VideoPlugin::Video < Article | ||
12 | settings_items :video_format, :type => :string | 12 | settings_items :video_format, :type => :string |
13 | settings_items :video_id, :type => :string | 13 | settings_items :video_id, :type => :string |
14 | settings_items :video_thumbnail_url, :type => :string, :default => '/plugins/video/images/video_generic_thumbnail.jpg' | 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 | settings_items :video_duration, :type=> :integer, :default => 0 | 17 | settings_items :video_duration, :type=> :integer, :default => 0 |
18 | 18 | ||
19 | attr_accessible :video_url | 19 | attr_accessible :video_url |
@@ -35,14 +35,14 @@ class VideoPlugin::Video < Article | @@ -35,14 +35,14 @@ class VideoPlugin::Video < Article | ||
35 | def self.description | 35 | def self.description |
36 | _('Display embedded videos.') | 36 | _('Display embedded videos.') |
37 | end | 37 | end |
38 | - | 38 | + |
39 | def is_youtube? | 39 | def is_youtube? |
40 | VideoPlugin::Video.is_youtube?(self.video_url) | 40 | VideoPlugin::Video.is_youtube?(self.video_url) |
41 | end | 41 | end |
42 | 42 | ||
43 | def is_vimeo? | 43 | def is_vimeo? |
44 | VideoPlugin::Video.is_vimeo?(self.video_url) | 44 | VideoPlugin::Video.is_vimeo?(self.video_url) |
45 | - end | 45 | + end |
46 | 46 | ||
47 | include ActionView::Helpers::TagHelper | 47 | include ActionView::Helpers::TagHelper |
48 | def to_html(options={}) | 48 | def to_html(options={}) |
plugins/video/test/unit/video_test.rb
@@ -46,6 +46,11 @@ class VideoTest < ActiveSupport::TestCase | @@ -46,6 +46,11 @@ class VideoTest < ActiveSupport::TestCase | ||
46 | assert_equal thumbnail_fitted_height, @video.thumbnail_fitted_height | 46 | assert_equal thumbnail_fitted_height, @video.thumbnail_fitted_height |
47 | end | 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 | should "show a no_browser_support_message" do | 54 | should "show a no_browser_support_message" do |
50 | 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>' | 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 | end | 56 | end |