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 /app/views/events | |
parent | 4da48868e57fdf5bfd41b680f5452450807c23f5 (diff) | |
download | gitlab-ce-e49ec46461ef033fb54c717378628a31bd33248b.tar.gz |
Open note image attachment in new tab
Diffstat (limited to 'app/views/events')
-rw-r--r-- | app/views/events/event/_note.html.haml | 7 |
1 files changed, 4 insertions, 3 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 |