44 lines
1.5 KiB
Plaintext
44 lines
1.5 KiB
Plaintext
|
<table class="table main-list">
|
||
|
<thead>
|
||
|
<tr class="sort-header">
|
||
|
<% @table_fields.each do |f| %>
|
||
|
<%= thead(f) %>
|
||
|
<% end %>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
<% @classes.each do |clas| %>
|
||
|
<tr>
|
||
|
<% if !clas.course_pic.url.empty? %>
|
||
|
<td><img width="150px" src="<%= clas.course_pic.thumb.url %>" /></td>
|
||
|
<% else %>
|
||
|
<td> </td>
|
||
|
<% end %>
|
||
|
<td>
|
||
|
<a href="<%= admin_hps_learning_path(clas.id, :page => params[:page]) %>"> <%= clas.title %> </a>
|
||
|
<div class="quick-edit">
|
||
|
<ul class="nav nav-pills">
|
||
|
<% if can_edit_or_delete?(clas) %>
|
||
|
<li><a href="<%= admin_hps_learning_path(clas.id, :page => params[:page]) %>"><%= t("hps_learning.lectures") %></a></li>
|
||
|
<li><a href="<%= edit_admin_hps_learning_path(clas.id, :page => params[:page]) %>"><%= t(:edit) %></a></li>
|
||
|
<li><a href="<%= admin_hps_learning_path(clas.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>
|
||
|
<%= clas.category.title rescue "" %>
|
||
|
</td>
|
||
|
<td>
|
||
|
<%= clas.get_runtime %>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<% end %>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
|
||
|
<%=
|
||
|
content_tag :div, class: "bottomnav clearfix" do
|
||
|
content_tag :div, paginate(@classes), class: "pagination pagination-centered"
|
||
|
end
|
||
|
%>
|