video_channel/app/views/panel/video/back_end/videos/index.html.erb

33 lines
1.4 KiB
Plaintext
Raw Permalink Normal View History

2014-01-14 09:19:31 +00:00
<table class="table main-list">
<thead>
<tr>
<th class="span1"></th>
<th class="span1"><%= t('videos.title') %></th>
<th class="span3"><%= t('videos.description') %></th>
<%if is_manager? %>
<th class="span1"><%= t('videos.edit') %></th>
<th class="span1"><%= t('videos.delete') %></th>
<% end %>
</tr>
</thead>
<tbody id="tbody_locations" class="sort-holder">
<% @videos.each do |video| %>
<tr class="with_action">
<% video_display = UnvlogIt.new(video.url)%>
<td><%= video_display.embed_html(400, 300).html_safe %></td>
<td><%= video.title %></td>
<% @client_videos = @client.videos_by(:user => 'ntuprs', :per_page => 5) %>
<td><% @client_videos.videos.each do |v| %> <% @video = v.video_id.split(/tag:youtube.com,2008:video:+/).last %><% vd = UnvlogIt.new("https://www.youtube.com/watch?v=#{@video}")%><%= vd.embed_html(200, 150).html_safe %><br/><br/><br/> <% end %></td>
<%if is_manager? %>
<td><%= link_to 'Edit', edit_panel_videos_back_end_video_path(video) %></td>
<td><%= link_to 'Destroy', panel_videos_back_end_video_path(video), method: :delete , :confirm => t(:sure?) %></td>
<%end%>
</tr>
<% end %>
</tbody>
</table>
<%if is_manager? %>
<td><%= link_to 'New', new_panel_videos_back_end_video_path, :class => "btn btn-primary", :id=>"create_event_btn", :ref=>"add-btn" %></td>
<% end %>