54 lines
1.7 KiB
Plaintext
54 lines
1.7 KiB
Plaintext
|
|
<table class="table main-list">
|
|
<thead>
|
|
<tr class="sort-header">
|
|
<% @table_fields.each do |f| %>
|
|
<%= thead(f) %>
|
|
<% end %>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @vlogs.each do |vlog| %>
|
|
<tr>
|
|
<td>
|
|
<% if (!vlog.video.url.nil? || vlog.video.url != "") && vlog.type == "upload" %>
|
|
<div class="video-thumbnail" data-video-url="http://<%= request.host_with_port %>/<%= vlog.video.url %>" data-video-type="upload" data-video-title="<%= vlog.title %>" >
|
|
<img src="<%= vlog.thumbnail %>" />
|
|
<div class="video-thumbnail-overlay"></div>
|
|
<i class="icons-play"></i>
|
|
</div>
|
|
<% else %>
|
|
<div class="video-thumbnail" data-video-url="<%= vlog.youtube_link %>" data-video-type="youtube" data-video-title="<%= vlog.title %>" >
|
|
<img src="<%= vlog.youtube_thumbnail %>" />
|
|
<div class="video-thumbnail-overlay"></div>
|
|
<i class="icons-play"></i>
|
|
</div>
|
|
<% end %>
|
|
</td>
|
|
<td>
|
|
<%= vlog.category.title %>
|
|
</td>
|
|
<td>
|
|
<%= vlog.title %>
|
|
<div class="quick-edit">
|
|
<ul class="nav nav-pills">
|
|
<% if can_edit_or_delete?(vlog) %>
|
|
<li><a href="/admin/vlogs/<%= vlog.id.to_s %>/edit"><%= t(:edit) %></a></li>
|
|
<li><a href="<%= admin_vlog_path(vlog.id,:page => params[:page]) %>" class="delete text-error" data-method="delete" data-confirm="Are you sure?"><%= t(:delete_) %></a></li>
|
|
<% end %>
|
|
</ul>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<%= User.find(vlog.create_user_id).name rescue "" %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
|
|
<%=
|
|
content_tag :div, class: "bottomnav clearfix" do
|
|
content_tag :div, paginate(@vlogs), class: "pagination pagination-centered"
|
|
end
|
|
%> |