资源下载链接问题
This commit is contained in:
parent
3ffe131a73
commit
90bb940290
|
@ -6,7 +6,7 @@
|
|||
<% attachments.each do |attach| %>
|
||||
<ul class="resource-list" onmouseover="if($('#contextMenu').css('display') != 'block')$(this).children().css('background-color', '#e1e1e1')" onmouseout=" if($('#contextMenu').css('display') == 'none')$(this).children().css('background-color', 'white')">
|
||||
<li class="resource-list-checkbox fl">
|
||||
<% if attach.is_public == 0 && (@type == "6" || @type == "2") && attach.author != User.current && attach.get_apply_resource_status(attach.id, attach.author_id) != 2 %>
|
||||
<% if attach.is_public == 0 && (@type == "6" || @type == "2") && attach.author != User.current && attach.get_apply_resource_status(attach.id, attach.author_id) != 2 && !attach_show_allow(attach) %>
|
||||
<input name="checkbox1[]" type="checkbox" disabled="disabled" data-has-history="<%= attach.attachment_histories.count == 0 ? 'N' : 'Y' %>" data-deleteble="<%= User.current.id ==attach.author_id ? 'Y' : 'N' %>" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="resourcesCheckbox" />
|
||||
<% else %>
|
||||
<input name="checkbox1[]" type="checkbox" data-has-history="<%= attach.attachment_histories.count == 0 ? 'N' : 'Y' %>" data-deleteble="<%= User.current.id ==attach.author_id ? 'Y' : 'N' %>" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="resourcesCheckbox" />
|
||||
|
@ -14,7 +14,7 @@
|
|||
<!--<input name="checkbox2" type="checkbox" value="" class="resourcesCheckbox" />-->
|
||||
</li>
|
||||
<li class="resource-list-name fl">
|
||||
<% if attach.is_public == 0 && attach.get_apply_resource_status(attach.id, attach.author_id) != 2 %>
|
||||
<% if attach.is_public == 0 && !attach_show_allow(attach) && attach.get_apply_resource_status(attach.id, attach.author_id) != "2" %>
|
||||
<a style="cursor: default" class = "resourcesBlack resource-list-middle hidden mw280" title="<%= attach.filename %>"><%= attach.filename %> </a>
|
||||
<% else %>
|
||||
<%= link_to truncate(attach.filename, :length => 30), download_named_attachment_path(attach.id, attach.filename), :title => attach.filename, :class => 'resourcesBlack resource-list-middle hidden mw280' %>
|
||||
|
|
|
@ -6,14 +6,14 @@
|
|||
<ul class="subjectRow">
|
||||
<li class="subjectName fl hidden">
|
||||
<label>
|
||||
<% if attach.is_public == 0 && (@type == "6" || @type == "2") && attach.author != User.current && attach.get_apply_resource_status(attach.id, attach.author_id) != 2 %>
|
||||
<% if attach.is_public == 0 && (@type == "6" || @type == "2") && attach.author != User.current && attach.get_apply_resource_status(attach.id, attach.author_id) != 2 && !attach_show_allow(attach)%>
|
||||
<input name="checkbox1[]" type="checkbox" disabled="disabled" data-has-history="<%= attach.attachment_histories.count == 0 ? 'N' : 'Y' %>" data-deleteble="<%= User.current.id ==attach.author_id ? 'Y' : 'N' %>" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="mr5" style="vertical-align:middle;" />
|
||||
<% else %>
|
||||
<input name="checkbox1[]" type="checkbox" data-has-history="<%= attach.attachment_histories.count == 0 ? 'N' : 'Y' %>" data-deleteble="<%= User.current.id ==attach.author_id ? 'Y' : 'N' %>" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="mr5" style="vertical-align:middle;" />
|
||||
<% end %>
|
||||
|
||||
<span>
|
||||
<% if attach.is_public == 0 && attach.get_apply_resource_status(attach.id, attach.author_id) != 2 %>
|
||||
<% if attach.is_public == 0 && !attach_show_allow(attach) && attach.get_apply_resource_status(attach.id, attach.author_id) != 2 %>
|
||||
<a href="" style="cursor: default" title="<%= attach.filename %>"><%= attach.filename %> </a>
|
||||
<% else %>
|
||||
<%= link_to truncate(attach.filename, :length => 30), download_named_attachment_path(attach.id, attach.filename), :title => attach.filename%>
|
||||
|
|
Loading…
Reference in New Issue