Commit e49ec464 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Open note image attachment in new tab

parent 4da48868
...@@ -13,9 +13,10 @@ ...@@ -13,9 +13,10 @@
= sanitize(markdown(truncate(event.target.note, length: 150)), tags: %w(a img b pre p)) = sanitize(markdown(truncate(event.target.note, length: 150)), tags: %w(a img b pre p))
- note = event.target - note = event.target
- if note.attachment.url - if note.attachment.url
= link_to note.attachment.secure_url, target: "_blank", class: 'note-file-attach' do
- if note.attachment.image? - if note.attachment.image?
= link_to note.attachment.url, target: '_blank' do
= image_tag note.attachment.url, class: 'note-image-attach' = image_tag note.attachment.url, class: 'note-image-attach'
- else - else
= link_to note.attachment.secure_url, target: "_blank", class: 'note-file-attach' do
%i.icon-paper-clip %i.icon-paper-clip
= note.attachment_identifier = note.attachment_identifier
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
- if note.attachment.url - if note.attachment.url
.note-attachment .note-attachment
- if note.attachment.image? - if note.attachment.image?
= link_to note.attachment.url, target: '_blank' do
= image_tag note.attachment.url, class: 'note-image-attach' = image_tag note.attachment.url, class: 'note-image-attach'
.attachment.pull-right .attachment.pull-right
= link_to note.attachment.secure_url, target: "_blank" do = link_to note.attachment.secure_url, target: "_blank" do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment