Commit e49ec46461ef033fb54c717378628a31bd33248b
1 parent
4da48868
Exists in
master
and in
4 other branches
Open note image attachment in new tab
Showing
2 changed files
with
6 additions
and
4 deletions
Show diff stats
app/views/events/event/_note.html.haml
| ... | ... | @@ -13,9 +13,10 @@ |
| 13 | 13 | = sanitize(markdown(truncate(event.target.note, length: 150)), tags: %w(a img b pre p)) |
| 14 | 14 | - note = event.target |
| 15 | 15 | - if note.attachment.url |
| 16 | - = link_to note.attachment.secure_url, target: "_blank", class: 'note-file-attach' do | |
| 17 | - - if note.attachment.image? | |
| 16 | + - if note.attachment.image? | |
| 17 | + = link_to note.attachment.url, target: '_blank' do | |
| 18 | 18 | = image_tag note.attachment.url, class: 'note-image-attach' |
| 19 | - - else | |
| 19 | + - else | |
| 20 | + = link_to note.attachment.secure_url, target: "_blank", class: 'note-file-attach' do | |
| 20 | 21 | %i.icon-paper-clip |
| 21 | 22 | = note.attachment_identifier | ... | ... |
app/views/projects/notes/_note.html.haml
| ... | ... | @@ -51,7 +51,8 @@ |
| 51 | 51 | - if note.attachment.url |
| 52 | 52 | .note-attachment |
| 53 | 53 | - if note.attachment.image? |
| 54 | - = image_tag note.attachment.url, class: 'note-image-attach' | |
| 54 | + = link_to note.attachment.url, target: '_blank' do | |
| 55 | + = image_tag note.attachment.url, class: 'note-image-attach' | |
| 55 | 56 | .attachment.pull-right |
| 56 | 57 | = link_to note.attachment.secure_url, target: "_blank" do |
| 57 | 58 | %i.icon-paper-clip | ... | ... |