|
|
|
@ -25,7 +25,7 @@
|
|
|
|
|
<% if file.is_public? || User.current.member_of_course?(course) %>
|
|
|
|
|
<div class="re_con_box" id="container_files_<%= file.id %>">
|
|
|
|
|
<div class="">
|
|
|
|
|
<%= link_to_attachment file, :download => true,:text => truncate(file.filename,length: 35, omission: '...'), :title => file.filename+"\n"+file.description.to_s,:class => "c_dblue f_14 f_b f_l hiddent" %>
|
|
|
|
|
<%= link_to truncate(file.filename,length: 35, omission: '...'), download_named_attachment_path(file.id, file.filename, preview: true),:title => file.filename+"\n"+file.description.to_s, :style => "overflow: hidden; white-space: nowrap;text-overflow: ellipsis;",:class => "c_dblue f_14 f_b f_l" %>
|
|
|
|
|
<% if User.current.logged? %>
|
|
|
|
|
<% if (is_course_teacher(User.current,@course) || file.author_id == User.current.id) && course_contains_attachment?(@course,file) %>
|
|
|
|
|
<%= link_to("选入我的其他课程",quote_resource_show_course_file_path(@course,file),:class => "f_l re_select c_lorange",:remote => true) if has_course?(User.current,file) %>
|
|
|
|
@ -40,7 +40,7 @@
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= link_to("选入我的课程",quote_resource_show_course_file_path(@course,file),:class => "f_l re_select c_lorange",:remote => true) if has_course?(User.current,file) %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<%= link_to '下载',download_named_attachment_path(file.id, file.filename, force: true),class: 'f_l re_open' %>
|
|
|
|
|
<%= link_to_attachment file, text: '下载', class: 'f_l re_open' %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|