2016-03-07 16:46:02 +08:00
|
|
|
<h3><%=l(:label_course_resource_list)%></h3>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="autoscroll">
|
|
|
|
<table class="list" style="width: 100%;table-layout: fixed">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
|
2016-03-08 11:01:08 +08:00
|
|
|
<th style="width: 60px;">
|
2016-03-07 16:46:02 +08:00
|
|
|
资源名称
|
|
|
|
</th>
|
2016-03-08 11:01:08 +08:00
|
|
|
<th style="width: 30px;">
|
2016-03-15 15:23:43 +08:00
|
|
|
<%= link_to "资源大小",admin_course_resource_list_path(:sort => "file_size") %>
|
2016-03-07 16:46:02 +08:00
|
|
|
</th>
|
2016-03-08 11:01:08 +08:00
|
|
|
<th style="width: 25px;">
|
2016-03-07 16:46:02 +08:00
|
|
|
资源类型
|
|
|
|
</th>
|
2016-03-08 11:01:08 +08:00
|
|
|
<th style="width: 23px;">
|
2016-03-15 15:59:49 +08:00
|
|
|
<%= link_to "上传时间",admin_course_resource_list_path(:sort => "file_upload") %>
|
2016-03-07 16:46:02 +08:00
|
|
|
</th>
|
2016-03-08 11:01:08 +08:00
|
|
|
<th style="width: 15px;">
|
2016-03-15 15:59:49 +08:00
|
|
|
<%= link_to "下载次数",admin_course_resource_list_path(:sort => "file_download_times") %>
|
2016-03-07 16:46:02 +08:00
|
|
|
</th>
|
|
|
|
<th style="width: 20px;">
|
|
|
|
上传者
|
|
|
|
</th>
|
2016-03-08 11:01:08 +08:00
|
|
|
<th style="width: 35px;">
|
2016-03-07 16:46:02 +08:00
|
|
|
所属课程
|
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<% @resource.each do |resource| %>
|
|
|
|
<tr class="<%= cycle("odd", "even") %>">
|
|
|
|
<td style="text-align: left;">
|
2016-03-08 11:01:08 +08:00
|
|
|
<%= link_to truncate(resource.filename, :length => 18), download_named_attachment_path(resource.id, resource.filename ), :title => resource.filename,:class=>'resourcesBlack'%>
|
2016-03-07 16:46:02 +08:00
|
|
|
</td>
|
|
|
|
<td style=" text-align: center;">
|
2016-03-08 11:01:08 +08:00
|
|
|
<%= number_to_human_size(resource.filesize)%>
|
2016-03-07 16:46:02 +08:00
|
|
|
</td>
|
|
|
|
<td style=" text-align: center;">
|
2016-07-01 11:11:53 +08:00
|
|
|
班级资源
|
2016-03-07 16:46:02 +08:00
|
|
|
</td>
|
|
|
|
<td style=" text-align: center;">
|
|
|
|
<%= format_date(resource.created_on)%>
|
|
|
|
</td>
|
|
|
|
<td style=" text-align: center;">
|
|
|
|
<%= resource.downloads %>
|
|
|
|
</td>
|
|
|
|
<td style=" text-align: center;">
|
|
|
|
<%= link_to(User.find(resource.author_id).realname, user_path(User.find(resource.author_id)) ) %>
|
|
|
|
</td>
|
|
|
|
<td style=" text-align: center;">
|
2016-03-08 11:01:08 +08:00
|
|
|
<%=link_to truncate(Course.find(resource.container_id).name, :length => 10), course_path(Course.find(resource.container_id)), :title => Course.find(resource.container_id).name, :class => "hidden fl w170" %>
|
2016-03-07 16:46:02 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="pagination">
|
|
|
|
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false %>
|
2016-03-17 15:05:14 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<% html_title(l(:label_course_resource_list)) -%>
|