diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-07-11 09:19:19 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-07-11 09:19:19 +0300 |
commit | e49ec46461ef033fb54c717378628a31bd33248b (patch) | |
tree | b7f0c682c5f80944cbc9df417be89859af5405d0 | |
parent | 4da48868e57fdf5bfd41b680f5452450807c23f5 (diff) | |
download | gitlab-ce-e49ec46461ef033fb54c717378628a31bd33248b.tar.gz |
Open note image attachment in new tab
-rw-r--r-- | app/views/events/event/_note.html.haml | 7 | ||||
-rw-r--r-- | app/views/projects/notes/_note.html.haml | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/app/views/events/event/_note.html.haml b/app/views/events/event/_note.html.haml index 9dd0767e896..8384bbecd06 100644 --- a/app/views/events/event/_note.html.haml +++ b/app/views/events/event/_note.html.haml @@ -13,9 +13,10 @@ = sanitize(markdown(truncate(event.target.note, length: 150)), tags: %w(a img b pre p)) - note = event.target - 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' - - else + - else + = link_to note.attachment.secure_url, target: "_blank", class: 'note-file-attach' do %i.icon-paper-clip = note.attachment_identifier diff --git a/app/views/projects/notes/_note.html.haml b/app/views/projects/notes/_note.html.haml index 6fa7a1c3c78..1389d899310 100644 --- a/app/views/projects/notes/_note.html.haml +++ b/app/views/projects/notes/_note.html.haml @@ -51,7 +51,8 @@ - if note.attachment.url .note-attachment - if note.attachment.image? - = image_tag note.attachment.url, class: 'note-image-attach' + = link_to note.attachment.url, target: '_blank' do + = image_tag note.attachment.url, class: 'note-image-attach' .attachment.pull-right = link_to note.attachment.secure_url, target: "_blank" do %i.icon-paper-clip |