1c61f2de58
Make it more reusable, by: - Renaming `attachment/update` to `attachment/edit` - Refactoring the CSS styles into their own stylesheet - Allow to specify the 'accept' option
8 lines
437 B
Text
8 lines
437 B
Text
<%= render_to_element(".attachment-link[data-attachment-id=\"#{@attachment.id}\"]",
|
|
partial: 'shared/attachment/show',
|
|
outer: true,
|
|
locals: { attachment: @attachment, user_can_upload: @user_can_upload }) %>
|
|
|
|
<% if @attachment.virus_scanner.pending? %>
|
|
<%= fire_event('attachment:update', { url: attachment_url(@attachment.id, { signed_id: @attachment.blob.signed_id, user_can_upload: @user_can_upload }) }.to_json ) %>
|
|
<% end %>
|