Commit 3d0197246ebd382d1bbfe8501177cef7fd269e7d

Authored by Riyad Preukschas
1 parent c78359a8

Use #author_link for blame, commits and tree

app/views/blame/show.html.haml
@@ -24,9 +24,7 @@ @@ -24,9 +24,7 @@
24 - commit = Commit.new(commit) 24 - commit = Commit.new(commit)
25 - commit = CommitDecorator.decorate(commit) 25 - commit = CommitDecorator.decorate(commit)
26 %tr 26 %tr
27 - %td.author  
28 - = image_tag gravatar_icon(commit.author_email, 16)  
29 - = commit.author_name 27 + %td.author= commit.author_link avatar: true, size: 16
30 %td.blame_commit 28 %td.blame_commit
31   29  
32 %code= link_to commit.short_id, project_commit_path(@project, commit) 30 %code= link_to commit.short_id, project_commit_path(@project, commit)
app/views/commits/_commit.html.haml
@@ -4,9 +4,8 @@ @@ -4,9 +4,8 @@
4 %strong= link_to "Browse Code »", project_tree_path(@project, commit), class: "right" 4 %strong= link_to "Browse Code »", project_tree_path(@project, commit), class: "right"
5 %p 5 %p
6 = link_to commit.short_id(8), project_commit_path(@project, commit), class: "commit_short_id" 6 = link_to commit.short_id(8), project_commit_path(@project, commit), class: "commit_short_id"
7 - %strong.commit-author-name= commit.author_name 7 + %strong= commit.author_link avatar: true, size: 24
8 %span.dash – 8 %span.dash –
9 - = image_tag gravatar_icon(commit.author_email), class: "avatar", width: 16  
10 = link_to_gfm truncate(commit.title, length: 50), project_commit_path(@project, commit.id), class: "row_title" 9 = link_to_gfm truncate(commit.title, length: 50), project_commit_path(@project, commit.id), class: "row_title"
11 10
12 %span.committed_ago 11 %span.committed_ago
app/views/commits/_commit_box.html.haml
@@ -18,16 +18,15 @@ @@ -18,16 +18,15 @@
18 .commit-info 18 .commit-info
19 .row 19 .row
20 .span5 20 .span5
21 - = image_tag gravatar_icon(@commit.author_email, 40), class: "avatar"  
22 .author 21 .author
23 - %strong= @commit.author_name 22 + %strong= @commit.author_link avatar: true, size: 40
24 authored 23 authored
25 %time{title: @commit.authored_date.stamp("Aug 21, 2011 9:23pm")} 24 %time{title: @commit.authored_date.stamp("Aug 21, 2011 9:23pm")}
26 #{time_ago_in_words(@commit.authored_date)} ago 25 #{time_ago_in_words(@commit.authored_date)} ago
27 - if @commit.different_committer? 26 - if @commit.different_committer?
28 .committer 27 .committer
29 → 28 →
30 - %strong= @commit.committer_name 29 + %strong= @commit.committer_link
31 committed 30 committed
32 %time{title: @commit.committed_date.stamp("Aug 21, 2011 9:23pm")} 31 %time{title: @commit.committed_date.stamp("Aug 21, 2011 9:23pm")}
33 #{time_ago_in_words(@commit.committed_date)} ago 32 #{time_ago_in_words(@commit.committed_date)} ago