summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Castro <javiercastro@nexion.com.ar>2014-01-14 12:06:53 -0300
committerJavier Castro <javiercastro@nexion.com.ar>2014-01-14 12:06:53 -0300
commit556ae5ae8187b89a3785219d5621e7ebc9bb7a8c (patch)
treef04b7e50bf06e21f8e5d5919c755fbe90c1ae59f
parent71f1a84599101b2af2f74ae54ebfb2f880935985 (diff)
downloadgitlab-ce-556ae5ae8187b89a3785219d5621e7ebc9bb7a8c.tar.gz
Temporary fix for #4305: Cant preview attached png images on notes; attachment.secure_url returns an url which is accessible
-rw-r--r--app/views/events/event/_note.html.haml4
-rw-r--r--app/views/projects/notes/_note.html.haml4
2 files changed, 4 insertions, 4 deletions
diff --git a/app/views/events/event/_note.html.haml b/app/views/events/event/_note.html.haml
index db5f3ebb00f..ad2afbce14c 100644
--- a/app/views/events/event/_note.html.haml
+++ b/app/views/events/event/_note.html.haml
@@ -14,8 +14,8 @@
- note = event.target
- if note.attachment.url
- if note.attachment.image?
- = link_to note.attachment.url, target: '_blank' do
- = image_tag note.attachment.url, class: 'note-image-attach'
+ = link_to note.attachment.secure_url, target: '_blank' do
+ = image_tag note.attachment.secure_url, class: 'note-image-attach'
- else
= link_to note.attachment.secure_url, target: "_blank", class: 'note-file-attach' do
%i.icon-paper-clip
diff --git a/app/views/projects/notes/_note.html.haml b/app/views/projects/notes/_note.html.haml
index fd2a3f43674..be9c6ca79bb 100644
--- a/app/views/projects/notes/_note.html.haml
+++ b/app/views/projects/notes/_note.html.haml
@@ -54,8 +54,8 @@
- if note.attachment.url
.note-attachment
- if note.attachment.image?
- = link_to note.attachment.url, target: '_blank' do
- = image_tag note.attachment.url, class: 'note-image-attach'
+ = link_to note.attachment.secure_url, target: '_blank' do
+ = image_tag note.attachment.secure_url, class: 'note-image-attach'
.attachment.pull-right
= link_to note.attachment.secure_url, target: "_blank" do
%i.icon-paper-clip