ref: master
plugins/html5_video/views/content_viewer/video_channel.html.erb
<%= @page.body %><% if ! @page.children.all.find {|f| f.content_type =~ /^video\//} %><%= _('This channel contains no videos yet') %>
<% else %><%= render :partial => 'video_player', :locals => {:video => nil} %><%=_('Quality options')%>:
<%=_('Description')%>:
<% unconverted_videos = [] @page.children. map{|f| FilePresenter.for f }. select{|f| f.class == FilePresenter::Video}. sort_by{|f| - f.created_at.to_i}.each do |f| unless f.has_web_version unconverted_videos << f else %>
<% end %> <% if unconverted_videos && !unconverted_videos.empty? %>- <%= link_to( content_tag('strong', f.title. gsub(/([a-z0-9])_+([a-z0-9])/i, '\1 \2'). gsub(/\.[a-z0-9]{2,4}$/i, '') ), f.view_url, { 'data-poster' => f.image_preview(:big), 'data-download' => f.public_filename, 'data-webversions' => CGI::escapeHTML(f.web_versions!.to_json), :style => "background-image:url(#{f.image_preview(:big)})" }) %>
<% end end %>
<%= f.abstract %><% end %> <% if @page.children.all.find {|f| f.content_type !~ /^video\//} %><%= n_( 'This channel has one video waiting to be converted', 'This channel has %d videos waiting to be converted', unconverted_videos.length ) % unconverted_videos.length %>
<% end %><%=_('Non video files')%>
<%= list_contents contents: @page.children.all.select {|f| f.content_type !~ /^video\// } %>