diff options
-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 |