全站搜索资源后列表中只能删除当前课程的资源,且需有删除资源的权限

This commit is contained in:
z9hang 2014-11-21 15:02:34 +08:00
parent cf808598d2
commit ba11fe25b5
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@
<div class=""> <div class="">
<p class="f_l c_grey02">文件大小:<%= number_to_human_size(file.filesize) %></p> <p class="f_l c_grey02">文件大小:<%= number_to_human_size(file.filesize) %></p>
<%= link_to( l(:button_delete), attachment_path(file), <%= link_to( l(:button_delete), attachment_path(file),
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete,:class => "f_r re_de") if delete_allowed %> :data => {:confirm => l(:text_are_you_sure)}, :method => :delete,:class => "f_r re_de") if delete_allowed && file.container_id == @course.id && file.container_type == "Course"%>
<p class="f_r c_grey02" ><%= time_tag(file.created_on).html_safe %><%= l(:label_bids_published_ago) %>&nbsp;&nbsp;|&nbsp;&nbsp;下载<%= file.downloads %>&nbsp;&nbsp;|&nbsp;&nbsp;引用0 </p> <p class="f_r c_grey02" ><%= time_tag(file.created_on).html_safe %><%= l(:label_bids_published_ago) %>&nbsp;&nbsp;|&nbsp;&nbsp;下载<%= file.downloads %>&nbsp;&nbsp;|&nbsp;&nbsp;引用0 </p>
</div> </div>
<div class="cl"></div> <div class="cl"></div>