video/app/views/admin/video_channels/_index.html.erb

39 lines
1.3 KiB
Plaintext
Raw Normal View History

2015-08-31 09:46:03 +00:00
<script>
if(document.querySelectorAll("#orbit-bar").length==0) location.reload();
</script>
<table class="table main-list">
<thead>
<tr class="sort-header">
<% @table_fields.each do |f| %>
<%= thead(f) %>
<% end %>
</tr>
</thead>
<tbody>
<% @video_channels.each do |video_channel| %>
<tr>
<td>
2015-10-21 06:39:30 +00:00
<a href="/admin/video_channels/<%= video_channel.id.to_s %>" target="_blank"><%= video_channel.title %></a>
2015-08-31 09:46:03 +00:00
<div class="quick-edit">
<ul class="nav nav-pills">
<% if can_edit_or_delete?(video_channel) %>
<li><a href="/<%= I18n.locale.to_s %>/admin/video_channels/<%= video_channel.id.to_s %>/edit"><%= t(:edit) %></a></li>
<li><a href="<%=admin_video_channel_path(video_channel.id.to_s)%>" data-method="delete" data-confirm="Are you sure?"><%= t(:delete_) %></a></li>
<% end %>
</ul>
</div>
</td>
<td>
<%= video_channel.category.title rescue "" %>
<% if (video_channel.category.disable rescue false) %>
<span class='label'><%= t(:disabled) %></span>
<% end %>
</td>
<td>
<%= video_channel.owner rescue "" %>
</td>
</tr>
<% end %>
</tbody>
</table>