sergio-fry/youtube-fetcher

View on GitHub
app/views/channels/index.html.erb

Summary

Maintainability
Test Coverage
<h1><%= t :channels %></h1>

<table class="table">
  <tr>
    <th><%= t :channel %></th>
    <th><i class="fa fa-headphones"></i></th>
    <% if Flipper.enabled?(:video) %>
      <th><i class="fa fa-video-camera"></i></th>
    <% end %>
    <th></th>
    <th></th>
  </tr>
  <% @channels.each do |channel| %>
    <tr>
      <td><%= link_to channel.title, channel_path(channel.origin_id) %></td>
      <td>
        <%= channel.episodes.count %>
      </td>
      <% if Flipper.enabled?(:video) %>
        <td>
          <%= channel.video_episodes.count %>
        </td>
      <% end %>
      <td><%= channel.updated_at %></td>
      <td><%= channel.accessed_at %></td>
    </tr>
  <% end %>
  
</table>

<div class="pagination">
  <%= paginate @channels %>
</div>