Commit 84666cc09bc5b47184a4126b9dd94628d285670b
1 parent
cf9cad5c
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
fixed video content and video galery
Showing
10 changed files
with
68 additions
and
68 deletions
Show diff stats
plugins/video/lib/video_plugin/video.rb
| ... | ... | @@ -40,7 +40,7 @@ class VideoPlugin::Video < Article |
| 40 | 40 | def to_html(options={}) |
| 41 | 41 | article = self |
| 42 | 42 | proc do |
| 43 | - render :partial => 'content_viewer/video', :locals => {:article => article} | |
| 43 | + render :partial => 'content_viewer/video_plugin/video', :locals => {:article => article} | |
| 44 | 44 | end |
| 45 | 45 | end |
| 46 | 46 | ... | ... |
plugins/video/lib/video_plugin/video_gallery.rb
| ... | ... | @@ -36,7 +36,7 @@ class VideoPlugin::VideoGallery < Folder |
| 36 | 36 | def to_html(options = {}) |
| 37 | 37 | video_gallery = self |
| 38 | 38 | proc do |
| 39 | - render :partial => 'content_viewer/video_gallery', :locals => {:video_gallery => video_gallery} | |
| 39 | + render :partial => 'content_viewer/video_plugin/video_gallery', :locals => {:video_gallery => video_gallery} | |
| 40 | 40 | end |
| 41 | 41 | end |
| 42 | 42 | ... | ... |
plugins/video/views/cms/_video.html.erb
| ... | ... | @@ -1,12 +0,0 @@ |
| 1 | -<%= required_fields_message %> | |
| 2 | - | |
| 3 | -<div> | |
| 4 | -<%= required f.text_field('name', :size => '64', :maxlength => 150) %> | |
| 5 | -<%= required labelled_form_field _('URL of the video'), text_field(:article, :video_url, :size => 300) %> | |
| 6 | -<%= labelled_form_field(_('Description:'), text_area(:article, :body, :rows => 3, :cols => 64)) %> | |
| 7 | -<%= render :partial => 'general_fields' %> | |
| 8 | -<%= render :partial => 'translatable' %> | |
| 9 | -</div> | |
| 10 | - | |
| 11 | - | |
| 12 | - |
plugins/video/views/cms/_video_gallery.html.erb
| ... | ... | @@ -0,0 +1,12 @@ |
| 1 | +<%= required_fields_message %> | |
| 2 | + | |
| 3 | +<div> | |
| 4 | +<%= required f.text_field('name', :size => '64', :maxlength => 150) %> | |
| 5 | +<%= required labelled_form_field _('URL of the video'), text_field(:article, :video_url, :size => 300) %> | |
| 6 | +<%= labelled_form_field(_('Description:'), text_area(:article, :body, :rows => 3, :cols => 64)) %> | |
| 7 | +<%= render :partial => 'general_fields' %> | |
| 8 | +<%= render :partial => 'translatable' %> | |
| 9 | +</div> | |
| 10 | + | |
| 11 | + | |
| 12 | + | ... | ... |
plugins/video/views/cms/video_plugin/_video_gallery.html.erb
0 → 100644
plugins/video/views/content_viewer/_video.html.erb
| ... | ... | @@ -1,34 +0,0 @@ |
| 1 | -<div align="center"> | |
| 2 | -<%if @page.video_provider=='youtube' %> | |
| 3 | - <link type="text/css" rel="stylesheet" href="/plugins/video/css/video-js-4.5.1.css" /> | |
| 4 | - <video id="embedded_video" src="" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto" | |
| 5 | - width="<%= @page.fitted_width %>" height="<%= @page.fitted_height %>" | |
| 6 | - data-setup='<%=CGI::escapeHTML("{ \"techOrder\": [\"youtube\"], \"src\": \"#{@page.video_url}\" }") %>'> | |
| 7 | - <%= @page.no_browser_support_message %> | |
| 8 | - </video> | |
| 9 | - <script src="/plugins/video/javascripts/videojs/video-4.5.1.js"></script> | |
| 10 | - <script src="/plugins/video/javascripts/videojs/vjs.youtube.js"></script> | |
| 11 | - <% elsif @page.video_provider=='vimeo' %> | |
| 12 | - <link type="text/css" rel="stylesheet" href="/plugins/video/css/video-js-4.5.1.css" /> | |
| 13 | - <video id="embedded_video" src="" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto" | |
| 14 | - width="<%= @page.fitted_width %>" height="<%= @page.fitted_height %>" | |
| 15 | - data-setup='<%=CGI::escapeHTML("{ \"techOrder\": [\"vimeo\"], \"src\": \"#{@page.video_url}\", \"loop\": true, \"autoplay\": false }") %>'> | |
| 16 | - <%= @page.no_browser_support_message %> | |
| 17 | - </video> | |
| 18 | - <script src="/plugins/video/javascripts/videojs/video-4.5.1.js"></script> | |
| 19 | - <script src="/plugins/video/javascripts/videojs/vjs.vimeo.js"></script> | |
| 20 | -<% elsif @page.video_provider=='file' %> | |
| 21 | - <link href="/plugins/video/css/video-js-4.8.5.css" rel="stylesheet"> | |
| 22 | - <script src="/plugins/video/javascripts/videojs/video-4.8.5.js"></script> | |
| 23 | - <video id="embedded_video" class="video-js vjs-default-skin vjs-big-play-centered" | |
| 24 | - height="353" width="499" | |
| 25 | - controls preload="auto" | |
| 26 | - data-setup='<%=CGI::escapeHTML("{ \"example_option\":true}") %>'> | |
| 27 | - <source src="<%= @page.video_url %>" type='<%= @page.video_format %>' /> | |
| 28 | - <%= @page.no_browser_support_message %> | |
| 29 | - </video> | |
| 30 | -<% end %> | |
| 31 | -<br style="clear:both" /> | |
| 32 | -</div> | |
| 33 | -<% _("Description:") %> | |
| 34 | -<%= @page.body %> |
plugins/video/views/content_viewer/_video_gallery.html.erb
| ... | ... | @@ -1,14 +0,0 @@ |
| 1 | -<% extend VideoPlugin::VideoGalleryHelper %> | |
| 2 | - | |
| 3 | -<% unless video_gallery.body.blank? %> | |
| 4 | - <div> | |
| 5 | - <%= video_gallery.body %> | |
| 6 | - </div> | |
| 7 | - <hr/> | |
| 8 | -<% end %> | |
| 9 | - | |
| 10 | -<% if video_gallery.children.empty? %> | |
| 11 | - <em><%= _('(empty video gallery)') %></em> | |
| 12 | -<% else %> | |
| 13 | - <%= list_videos(:contents=>video_gallery.children) %> | |
| 14 | -<% end %> | |
| 15 | 0 | \ No newline at end of file |
plugins/video/views/content_viewer/video_plugin/_video.html.erb
0 → 100644
| ... | ... | @@ -0,0 +1,34 @@ |
| 1 | +<div align="center"> | |
| 2 | +<%if @page.video_provider=='youtube' %> | |
| 3 | + <link type="text/css" rel="stylesheet" href="/plugins/video/css/video-js-4.5.1.css" /> | |
| 4 | + <video id="embedded_video" src="" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto" | |
| 5 | + width="<%= @page.fitted_width %>" height="<%= @page.fitted_height %>" | |
| 6 | + data-setup='<%=CGI::escapeHTML("{ \"techOrder\": [\"youtube\"], \"src\": \"#{@page.video_url}\" }") %>'> | |
| 7 | + <%= @page.no_browser_support_message %> | |
| 8 | + </video> | |
| 9 | + <script src="/plugins/video/javascripts/videojs/video-4.5.1.js"></script> | |
| 10 | + <script src="/plugins/video/javascripts/videojs/vjs.youtube.js"></script> | |
| 11 | + <% elsif @page.video_provider=='vimeo' %> | |
| 12 | + <link type="text/css" rel="stylesheet" href="/plugins/video/css/video-js-4.5.1.css" /> | |
| 13 | + <video id="embedded_video" src="" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto" | |
| 14 | + width="<%= @page.fitted_width %>" height="<%= @page.fitted_height %>" | |
| 15 | + data-setup='<%=CGI::escapeHTML("{ \"techOrder\": [\"vimeo\"], \"src\": \"#{@page.video_url}\", \"loop\": true, \"autoplay\": false }") %>'> | |
| 16 | + <%= @page.no_browser_support_message %> | |
| 17 | + </video> | |
| 18 | + <script src="/plugins/video/javascripts/videojs/video-4.5.1.js"></script> | |
| 19 | + <script src="/plugins/video/javascripts/videojs/vjs.vimeo.js"></script> | |
| 20 | +<% elsif @page.video_provider=='file' %> | |
| 21 | + <link href="/plugins/video/css/video-js-4.8.5.css" rel="stylesheet"> | |
| 22 | + <script src="/plugins/video/javascripts/videojs/video-4.8.5.js"></script> | |
| 23 | + <video id="embedded_video" class="video-js vjs-default-skin vjs-big-play-centered" | |
| 24 | + height="353" width="499" | |
| 25 | + controls preload="auto" | |
| 26 | + data-setup='<%=CGI::escapeHTML("{ \"example_option\":true}") %>'> | |
| 27 | + <source src="<%= @page.video_url %>" type='<%= @page.video_format %>' /> | |
| 28 | + <%= @page.no_browser_support_message %> | |
| 29 | + </video> | |
| 30 | +<% end %> | |
| 31 | +<br style="clear:both" /> | |
| 32 | +</div> | |
| 33 | +<% _("Description:") %> | |
| 34 | +<%= @page.body %> | ... | ... |
plugins/video/views/content_viewer/video_plugin/_video_gallery.html.erb
0 → 100644
| ... | ... | @@ -0,0 +1,14 @@ |
| 1 | +<% extend VideoPlugin::VideoGalleryHelper %> | |
| 2 | + | |
| 3 | +<% unless video_gallery.body.blank? %> | |
| 4 | + <div> | |
| 5 | + <%= video_gallery.body %> | |
| 6 | + </div> | |
| 7 | + <hr/> | |
| 8 | +<% end %> | |
| 9 | + | |
| 10 | +<% if video_gallery.children.empty? %> | |
| 11 | + <em><%= _('(empty video gallery)') %></em> | |
| 12 | +<% else %> | |
| 13 | + <%= list_videos(:contents=>video_gallery.children) %> | |
| 14 | +<% end %> | |
| 0 | 15 | \ No newline at end of file | ... | ... |