63 lines
2.0 KiB
Plaintext
63 lines
2.0 KiB
Plaintext
|
<table class="table main-list">
|
||
|
<thead>
|
||
|
<tr class="sort-header">
|
||
|
<% @table_fields.each do |f| %>
|
||
|
<%= thead(f) %>
|
||
|
<% end %>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
<% @hpsclass.hps_lectures.each do |lecture| %>
|
||
|
<tr>
|
||
|
<% if !lecture.lecture_pic.url.empty? %>
|
||
|
<td><img width="150px" src="<%= lecture.lecture_pic.thumb.url %>" /></td>
|
||
|
<% else %>
|
||
|
<td> </td>
|
||
|
<% end %>
|
||
|
<td>
|
||
|
<%= lecture.subject %>
|
||
|
<div class="quick-edit">
|
||
|
<ul class="nav nav-pills">
|
||
|
<% if can_edit_or_delete?(@hpsclass) %>
|
||
|
<li><a href="<%= edit_lecture_admin_hps_learning_path(lecture.id, :page => params[:page]) %>"><%= t(:edit) %></a></li>
|
||
|
<li><a href="<%= delete_lecture_admin_hps_learning_path(lecture.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>
|
||
|
<%= lecture.presenter %>
|
||
|
</td>
|
||
|
<td>
|
||
|
<%= lecture.get_runtime %>
|
||
|
</td>
|
||
|
<td>
|
||
|
<% if !lecture.hps_lecture_file.nil? && !lecture.hps_lecture_file.index_path.nil? %>
|
||
|
<a href="http://<%= request.host_with_port %>/<%= lecture.hps_lecture_file.index_path %>" class="open-presentation">Link</a>
|
||
|
<% else %>
|
||
|
Not Available
|
||
|
<% end %>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<% end %>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
<%=
|
||
|
content_tag :div, class: "bottomnav clearfix" do
|
||
|
content_tag :div, class: "pull-right" do
|
||
|
link_to(t("hps_learning.add_lecture"), add_lecture_admin_hps_learning_path(@hpsclass.id), :class => "btn btn-primary") + " " +
|
||
|
link_to(t("back"), admin_hps_learnings_path, :class => "btn")
|
||
|
end
|
||
|
end
|
||
|
%>
|
||
|
<script type="text/javascript">
|
||
|
var presenter = null;
|
||
|
$(".open-presentation").on("click",function(){
|
||
|
var el = $(this);
|
||
|
presenter = window.open(el.attr("href"), "presenter", "width=1024,height=768");
|
||
|
return false;
|
||
|
})
|
||
|
</script>
|
||
|
|
||
|
|