Commit 77bde9a0e41e9229357983d258eaea9d7ef67017
1 parent
679d0d6d
Exists in
master
and in
4 other branches
Add notes count to commits in lists.
Showing
2 changed files
with
12 additions
and
0 deletions
Show diff stats
app/assets/stylesheets/sections/commits.scss
| @@ -203,6 +203,11 @@ | @@ -203,6 +203,11 @@ | ||
| 203 | @extend .cgray; | 203 | @extend .cgray; |
| 204 | } | 204 | } |
| 205 | 205 | ||
| 206 | + .notes_count { | ||
| 207 | + float:right; | ||
| 208 | + margin: -6px 8px 6px; | ||
| 209 | + } | ||
| 210 | + | ||
| 206 | code { | 211 | code { |
| 207 | background:#FCEEC1; | 212 | background:#FCEEC1; |
| 208 | color:$style_color; | 213 | color:$style_color; |
app/views/commits/_commit.html.haml
| @@ -13,3 +13,10 @@ | @@ -13,3 +13,10 @@ | ||
| 13 | = time_ago_in_words(commit.committed_date) | 13 | = time_ago_in_words(commit.committed_date) |
| 14 | ago | 14 | ago |
| 15 | | 15 | |
| 16 | + | ||
| 17 | + %span.notes_count | ||
| 18 | + - notes = @project.commit_notes(commit) + @project.commit_line_notes(commit) | ||
| 19 | + - if notes.any? | ||
| 20 | + %span.btn.small.disabled.grouped | ||
| 21 | + %i.icon-comment | ||
| 22 | + = notes.count |