bisscomm/refinerycms-videos

View on GitHub
app/views/refinery/videos/videos/index.html.erb

Summary

Maintainability
Test Coverage
<% content_for :body do %>
  <% if @videos.any? %>
    <ul>
      <% @videos.each_with_index do |v, index| %>
        <li>
          <h2><%= v.title %></h2>
          <%= image_tag "http://img.youtube.com/vi/#{v.video_key}/0.jpg", alt: v.title %>

          <iframe id="ytplayer" type="text/html" width="640" height="360" src="https://www.youtube.com/embed/<%= v.video_key %>?controls=0&modestbranding=1&rel=0&showinfo=0&theme=light" frameborder="0" allowfullscreen></iframe>
        </li>
      <% end %>
    </ul>
  <% end %>
<% end %>

<%= render '/refinery/content_page' %>