Commit 556ae5ae8187b89a3785219d5621e7ebc9bb7a8c

Authored by Javier Castro
1 parent 71f1a845

Temporary fix for #4305: Cant preview attached png images on notes; attachment.s…

…ecure_url returns an url which is accessible
app/views/events/event/_note.html.haml
@@ -14,8 +14,8 @@ @@ -14,8 +14,8 @@
14 - note = event.target 14 - note = event.target
15 - if note.attachment.url 15 - if note.attachment.url
16 - if note.attachment.image? 16 - if note.attachment.image?
17 - = link_to note.attachment.url, target: '_blank' do  
18 - = image_tag note.attachment.url, class: 'note-image-attach' 17 + = link_to note.attachment.secure_url, target: '_blank' do
  18 + = image_tag note.attachment.secure_url, class: 'note-image-attach'
19 - else 19 - else
20 = link_to note.attachment.secure_url, target: "_blank", class: 'note-file-attach' do 20 = link_to note.attachment.secure_url, target: "_blank", class: 'note-file-attach' do
21 %i.icon-paper-clip 21 %i.icon-paper-clip
app/views/projects/notes/_note.html.haml
@@ -54,8 +54,8 @@ @@ -54,8 +54,8 @@
54 - if note.attachment.url 54 - if note.attachment.url
55 .note-attachment 55 .note-attachment
56 - if note.attachment.image? 56 - if note.attachment.image?
57 - = link_to note.attachment.url, target: '_blank' do  
58 - = image_tag note.attachment.url, class: 'note-image-attach' 57 + = link_to note.attachment.secure_url, target: '_blank' do
  58 + = image_tag note.attachment.secure_url, class: 'note-image-attach'
59 .attachment.pull-right 59 .attachment.pull-right
60 = link_to note.attachment.secure_url, target: "_blank" do 60 = link_to note.attachment.secure_url, target: "_blank" do
61 %i.icon-paper-clip 61 %i.icon-paper-clip