Show images preview in notes. Show line additions/deletions for commit
This commit is contained in:
parent
ef5b36eaaf
commit
14d0ef8f37
4 changed files with 15 additions and 43 deletions
|
@ -1,9 +1,15 @@
|
|||
= render "commits/commit_box"
|
||||
|
||||
%p.right
|
||||
This commit has
|
||||
%span.cgreen #{@commit.stats.additions} additions
|
||||
and
|
||||
%span.cred #{@commit.stats.deletions} deletions
|
||||
|
||||
= render "commits/diffs", diffs: @commit.diffs
|
||||
= render "notes/notes_with_form", tid: @commit.id, tt: "commit"
|
||||
= render "notes/per_line_form"
|
||||
|
||||
|
||||
:javascript
|
||||
$(function(){
|
||||
PerLineNotes.init();
|
||||
|
@ -19,7 +25,7 @@
|
|||
, h = event.currentTarget.naturalHeight;
|
||||
$('.image.diff_added .image-info', this).append(' | <b>W:</b> ' + w + 'px | <b>H:</b> ' + h + 'px');
|
||||
}, this));
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
= preserve do
|
||||
= markdown(note.note)
|
||||
- if note.attachment.url
|
||||
- if note.attachment.image?
|
||||
= image_tag note.attachment.url, class: 'thumbnail span4'
|
||||
.right
|
||||
%div.file
|
||||
= link_to note.attachment_identifier, note.attachment.url, target: "_blank"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue