|
|
|
@ -37,7 +37,7 @@
|
|
|
|
|
<% if options[:length] %>
|
|
|
|
|
<%= link_to_short_attachment attachment, :class => ' link_file_board', :download => true,:length => options[:length] -%>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= link_to_short_attachment attachment, :class => ' link_file_board', :download => true -%>
|
|
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
</span>
|
|
|
|
|
<%if is_float%>
|
|
|
|
@ -66,6 +66,16 @@
|
|
|
|
|
:class => 'delete delete-homework-icon',
|
|
|
|
|
:remote => true,
|
|
|
|
|
:title => l(:button_delete) %>
|
|
|
|
|
<% elsif attachment.container_type == 'Issue' %>
|
|
|
|
|
<% if User.current == attachment.author %>
|
|
|
|
|
<%= link_to image_tag('delete.png'), attachment_path(attachment),
|
|
|
|
|
:data => {:confirm => l(:text_are_you_sure)},
|
|
|
|
|
:method => :delete,
|
|
|
|
|
:class => 'delete',
|
|
|
|
|
#:remote => true,
|
|
|
|
|
#:id => "attachments_" + attachment.id.to_s,
|
|
|
|
|
:title => l(:button_delete) %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= link_to image_tag('delete.png'), attachment_path(attachment),
|
|
|
|
|
:data => {:confirm => l(:text_are_you_sure)},
|
|
|
|
|