Noosfero/noosfero

View on GitHub
plugins/video/views/blocks/video.html.erb

Summary

Maintainability
Test Coverage
<h3 class="block-title">
  <span><%=block.title%></span>
</h3>
<div class="video-block-data">
  <% if block.is_youtube? %>
    <div class='youtube'>
      <%= render :partial => 'box_organizer/iframe_video_block', :locals => { :url => block.format_embed_video_url_for_youtube, :width => block.width, :height => block.height }%>
    </div>
  <% elsif block.is_vimeo? %>
    <div class='vimeo'>
      <%= render :partial => 'box_organizer/iframe_video_block', :locals => { :url => block.format_embed_video_url_for_vimeo, :width => block.width, :height => block.height }%>
    </div>
  <% elsif block.is_video_file? %>
    <div class='video'>
      <%= render :partial => 'box_organizer/html5_video_block', :locals => { :url => block.url, :width => block.width, :height => block.height }%>
    </div>
  <% else %>
    <span class='alert-block'><%= _("Register a valid url (Vimeo, Youtube, video files)") %></span>
  <% end %>

</div>