Merge pull request #6045 from jacargentina/fix-4305

Temporary fix for #4305: Cant preview attached png images on notes; attachment.secure_url returns an url which is accessible
This commit is contained in:
Dmitriy Zaporozhets
2014-05-13 12:29:54 +03:00
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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