Merge pull request #283 from veprbl/master
Display both author and committer in commits list
This commit is contained in:
commit
7d750cbf79
|
@ -121,8 +121,8 @@ pre.commit_message {
|
||||||
/** COMMIT BLOCK **/
|
/** COMMIT BLOCK **/
|
||||||
.commit-title{display: block;}
|
.commit-title{display: block;}
|
||||||
.commit-title{margin-bottom: 10px}
|
.commit-title{margin-bottom: 10px}
|
||||||
.commit-author{color: #999; font-weight: normal; font-style: italic;}
|
.commit-author, .commit-committer{display: block;color: #999; font-weight: normal; font-style: italic;}
|
||||||
.commit-author strong{font-weight: bold; font-style: normal;}
|
.commit-author strong, .commit-committer strong{font-weight: bold; font-style: normal;}
|
||||||
|
|
||||||
/** bordered list **/
|
/** bordered list **/
|
||||||
ul.bordered-list {
|
ul.bordered-list {
|
||||||
|
|
|
@ -5,10 +5,12 @@ class Commit
|
||||||
attr_accessor :refs
|
attr_accessor :refs
|
||||||
|
|
||||||
delegate :message,
|
delegate :message,
|
||||||
|
:authored_date,
|
||||||
:committed_date,
|
:committed_date,
|
||||||
:parents,
|
:parents,
|
||||||
:sha,
|
:sha,
|
||||||
:date,
|
:date,
|
||||||
|
:committer,
|
||||||
:author,
|
:author,
|
||||||
:message,
|
:message,
|
||||||
:diffs,
|
:diffs,
|
||||||
|
@ -37,6 +39,14 @@ class Commit
|
||||||
author.name
|
author.name
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def committer_name
|
||||||
|
committer.name
|
||||||
|
end
|
||||||
|
|
||||||
|
def committer_email
|
||||||
|
committer.email
|
||||||
|
end
|
||||||
|
|
||||||
def prev_commit
|
def prev_commit
|
||||||
parents.first
|
parents.first
|
||||||
end
|
end
|
||||||
|
|
|
@ -19,6 +19,15 @@
|
||||||
%strong
|
%strong
|
||||||
= truncate(commit.safe_message, :length => 70)
|
= truncate(commit.safe_message, :length => 70)
|
||||||
%span.commit-author
|
%span.commit-author
|
||||||
|
Authored by
|
||||||
|
|
||||||
%strong= commit.author_name
|
%strong= commit.author_name
|
||||||
= time_ago_in_words(commit.committed_date)
|
= time_ago_in_words(commit.authored_date)
|
||||||
ago
|
ago
|
||||||
|
- if commit.author_name != commit.committer_name or commit.author_email != commit.committer_email or commit.authored_date != commit.committed_date
|
||||||
|
%span.commit-committer
|
||||||
|
Committed by
|
||||||
|
|
||||||
|
%strong= commit.committer_name
|
||||||
|
= time_ago_in_words(commit.committed_date)
|
||||||
|
ago
|
||||||
|
|
Loading…
Reference in a new issue