Commit f64ac63628e005189c839e0388ffc846b2b0d437
1 parent
97ec3806
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
renamed folders for plugin
Showing
15 changed files
with
157 additions
and
85 deletions
Show diff stats
plugins/video/views/box_organizer/_html5_video_block.html.erb
plugins/video/views/box_organizer/_iframe_video_block.html.erb
... | ... | @@ -1 +0,0 @@ |
1 | -<iframe width='<%="#{width}px"%>' height='<%="#{height}px"%>' src='<%= "#{url}" %>' frameborder="0" allowfullscreen></iframe> |
plugins/video/views/box_organizer/_video_block.html.erb
... | ... | @@ -1,11 +0,0 @@ |
1 | -<label for="url" class="formlabel"> Video URL: </label> | |
2 | - | |
3 | -<div class="formfield type-text"> | |
4 | - <%= text_field_tag 'block[url]', @block.url, :class => 'video-url', :maxlength => 255 %> | |
5 | -</div> | |
6 | -<div class="formfield type-text"> | |
7 | - <label for="width" class="formlabel"> Width: </label> | |
8 | - <%= text_field_tag 'block[width]', @block.width, :size => 7, :class => 'video-width', :maxlength => 5 %> | |
9 | - <label for="height" class="formlabel"> Height: </label> | |
10 | - <%= text_field_tag 'block[height]', @block.height, :size => 7, :class => 'video-height', :maxlength => 5 %> | |
11 | -</div> |
plugins/video/views/box_organizer/video_plugin/_html5_video_block.html.erb
0 → 100644
plugins/video/views/box_organizer/video_plugin/_iframe_video_block.html.erb
0 → 100644
... | ... | @@ -0,0 +1 @@ |
1 | +<iframe width='<%="#{width}px"%>' height='<%="#{height}px"%>' src='<%= "#{url}" %>' frameborder="0" allowfullscreen></iframe> | ... | ... |
plugins/video/views/box_organizer/video_plugin/_video_block.html.erb
0 → 100644
... | ... | @@ -0,0 +1,11 @@ |
1 | +<label for="url" class="formlabel"> Video URL: </label> | |
2 | + | |
3 | +<div class="formfield type-text"> | |
4 | + <%= text_field_tag 'block[url]', @block.url, :class => 'video-url', :maxlength => 255 %> | |
5 | +</div> | |
6 | +<div class="formfield type-text"> | |
7 | + <label for="width" class="formlabel"> Width: </label> | |
8 | + <%= text_field_tag 'block[width]', @block.width, :size => 7, :class => 'video-width', :maxlength => 5 %> | |
9 | + <label for="height" class="formlabel"> Height: </label> | |
10 | + <%= text_field_tag 'block[height]', @block.height, :size => 7, :class => 'video-height', :maxlength => 5 %> | |
11 | +</div> | ... | ... |
plugins/video/views/cms/video.html.erb
plugins/video/views/cms/video_plugin/_video_video.html.erb
0 → 100644
... | ... | @@ -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_video_gallery.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="https://vjs.zencdn.net/4.5.1/video-js.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='{ "techOrder": ["youtube"], "src": "<%= @page.video_url %>" }'> | |
7 | + <%= @page.no_browser_support_message %> | |
8 | + </video> | |
9 | + <script src="https://vjs.zencdn.net/4.5.1/video.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="https://vjs.zencdn.net/4.5.1/video-js.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='{ "techOrder": ["vimeo"], "src": "<%= @page.video_url %>", "loop": true, "autoplay": false }'> | |
16 | + <%= @page.no_browser_support_message %> | |
17 | + </video> | |
18 | + <script src="https://vjs.zencdn.net/4.5.1/video.js"></script> | |
19 | + <script src="/plugins/video/javascripts/videojs/vjs.vimeo.js"></script> | |
20 | +<% elsif @page.video_provider=='file' %> | |
21 | + <link href="https://vjs.zencdn.net/4.8/video-js.css" rel="stylesheet"> | |
22 | + <script src="https://vjs.zencdn.net/4.8/video.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='{"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 %> | |
0 | 35 | \ No newline at end of file | ... | ... |
plugins/video/views/content_viewer/_video_gallery.html.erb
0 → 100644
... | ... | @@ -0,0 +1,28 @@ |
1 | +<% | |
2 | +def self.list_videos(configure={}) | |
3 | + configure[:recursive] ||= false | |
4 | + configure[:list_type] ||= :folder | |
5 | + if !configure[:contents].blank? | |
6 | + configure[:contents] = configure[:contents].paginate( | |
7 | + :order => "updated_at DESC", | |
8 | + :per_page => 16, | |
9 | + :page => params[:npage] | |
10 | + ) | |
11 | + render :file => 'shared/video_list', :locals => configure | |
12 | + else | |
13 | + content_tag('em', _('(empty folder)')) | |
14 | + end | |
15 | + end | |
16 | +%> | |
17 | +<% unless video_gallery.body.blank? %> | |
18 | + <div> | |
19 | + <%= video_gallery.body %> | |
20 | + </div> | |
21 | + <hr/> | |
22 | +<% end %> | |
23 | + | |
24 | +<% if video_gallery.children.empty? %> | |
25 | + <em><%= _('(empty video gallery)') %></em> | |
26 | +<% else %> | |
27 | + <%= list_videos(:contents=>video_gallery.children) %> | |
28 | +<% end %> | |
0 | 29 | \ No newline at end of file | ... | ... |
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="https://vjs.zencdn.net/4.5.1/video-js.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='{ "techOrder": ["youtube"], "src": "<%= @page.video_url %>" }'> | |
7 | - <%= @page.no_browser_support_message %> | |
8 | - </video> | |
9 | - <script src="https://vjs.zencdn.net/4.5.1/video.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="https://vjs.zencdn.net/4.5.1/video-js.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='{ "techOrder": ["vimeo"], "src": "<%= @page.video_url %>", "loop": true, "autoplay": false }'> | |
16 | - <%= @page.no_browser_support_message %> | |
17 | - </video> | |
18 | - <script src="https://vjs.zencdn.net/4.5.1/video.js"></script> | |
19 | - <script src="/plugins/video/javascripts/videojs/vjs.vimeo.js"></script> | |
20 | -<% elsif @page.video_provider=='file' %> | |
21 | - <link href="https://vjs.zencdn.net/4.8/video-js.css" rel="stylesheet"> | |
22 | - <script src="https://vjs.zencdn.net/4.8/video.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='{"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 %> | |
35 | 0 | \ No newline at end of file |
plugins/video/views/content_viewer/video_gallery.html.erb
... | ... | @@ -1,28 +0,0 @@ |
1 | -<% | |
2 | -def self.list_videos(configure={}) | |
3 | - configure[:recursive] ||= false | |
4 | - configure[:list_type] ||= :folder | |
5 | - if !configure[:contents].blank? | |
6 | - configure[:contents] = configure[:contents].paginate( | |
7 | - :order => "updated_at DESC", | |
8 | - :per_page => 16, | |
9 | - :page => params[:npage] | |
10 | - ) | |
11 | - render :file => 'shared/video_list', :locals => configure | |
12 | - else | |
13 | - content_tag('em', _('(empty folder)')) | |
14 | - end | |
15 | - end | |
16 | -%> | |
17 | -<% unless video_gallery.body.blank? %> | |
18 | - <div> | |
19 | - <%= video_gallery.body %> | |
20 | - </div> | |
21 | - <hr/> | |
22 | -<% end %> | |
23 | - | |
24 | -<% if video_gallery.children.empty? %> | |
25 | - <em><%= _('(empty video gallery)') %></em> | |
26 | -<% else %> | |
27 | - <%= list_videos(:contents=>video_gallery.children) %> | |
28 | -<% end %> | |
29 | 0 | \ No newline at end of file |
plugins/video/views/content_viewer/video_plugin/video_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="https://vjs.zencdn.net/4.5.1/video-js.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='{ "techOrder": ["youtube"], "src": "<%= @page.video_url %>" }'> | |
7 | + <%= @page.no_browser_support_message %> | |
8 | + </video> | |
9 | + <script src="https://vjs.zencdn.net/4.5.1/video.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="https://vjs.zencdn.net/4.5.1/video-js.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='{ "techOrder": ["vimeo"], "src": "<%= @page.video_url %>", "loop": true, "autoplay": false }'> | |
16 | + <%= @page.no_browser_support_message %> | |
17 | + </video> | |
18 | + <script src="https://vjs.zencdn.net/4.5.1/video.js"></script> | |
19 | + <script src="/plugins/video/javascripts/videojs/vjs.vimeo.js"></script> | |
20 | +<% elsif @page.video_provider=='file' %> | |
21 | + <link href="https://vjs.zencdn.net/4.8/video-js.css" rel="stylesheet"> | |
22 | + <script src="https://vjs.zencdn.net/4.8/video.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='{"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 %> | |
0 | 35 | \ No newline at end of file | ... | ... |
plugins/video/views/content_viewer/video_plugin/video_video_gallery.html.erb
0 → 100644
... | ... | @@ -0,0 +1,28 @@ |
1 | +<% | |
2 | +def self.list_videos(configure={}) | |
3 | + configure[:recursive] ||= false | |
4 | + configure[:list_type] ||= :folder | |
5 | + if !configure[:contents].blank? | |
6 | + configure[:contents] = configure[:contents].paginate( | |
7 | + :order => "updated_at DESC", | |
8 | + :per_page => 16, | |
9 | + :page => params[:npage] | |
10 | + ) | |
11 | + render :file => 'shared/video_list', :locals => configure | |
12 | + else | |
13 | + content_tag('em', _('(empty folder)')) | |
14 | + end | |
15 | + end | |
16 | +%> | |
17 | +<% unless video_gallery.body.blank? %> | |
18 | + <div> | |
19 | + <%= video_gallery.body %> | |
20 | + </div> | |
21 | + <hr/> | |
22 | +<% end %> | |
23 | + | |
24 | +<% if video_gallery.children.empty? %> | |
25 | + <em><%= _('(empty video gallery)') %></em> | |
26 | +<% else %> | |
27 | + <%= list_videos(:contents=>video_gallery.children) %> | |
28 | +<% end %> | |
0 | 29 | \ No newline at end of file | ... | ... |