Better commit show page
This commit is contained in:
parent
7d56a51bdc
commit
788de6f1c8
3 changed files with 38 additions and 20 deletions
|
@ -1011,23 +1011,37 @@ p.time {
|
||||||
}
|
}
|
||||||
|
|
||||||
.issue_box,
|
.issue_box,
|
||||||
|
.commit_box,
|
||||||
.merge_request_box{
|
.merge_request_box{
|
||||||
@extend .padded;
|
@extend .padded;
|
||||||
@extend .borders;
|
@extend .borders;
|
||||||
@extend .prepend-top-20;
|
@extend .prepend-top-20;
|
||||||
@extend .append-bottom-20;
|
@extend .append-bottom-20;
|
||||||
|
border-width:2px;
|
||||||
|
|
||||||
img { max-width: 100%; }
|
img { max-width: 100%; }
|
||||||
|
|
||||||
pre {
|
pre {
|
||||||
background: white !important;
|
|
||||||
|
|
||||||
code {
|
code {
|
||||||
background: none !important;
|
background: none !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.commit_box {
|
||||||
|
.commit_message {
|
||||||
|
margin: -20px;
|
||||||
|
padding: 20px;
|
||||||
|
margin-top:10px;
|
||||||
|
border-radius:0;
|
||||||
|
border:none;
|
||||||
|
font-size:12px;
|
||||||
|
background-color:#f5f5f5;
|
||||||
|
border:none;
|
||||||
|
border-top:1px solid #eee;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.highlight_word {
|
.highlight_word {
|
||||||
background:#EEDC94;
|
background:#EEDC94;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,8 @@ class CommitsController < ApplicationController
|
||||||
@note = @project.build_commit_note(@commit)
|
@note = @project.build_commit_note(@commit)
|
||||||
@comments_allowed = true
|
@comments_allowed = true
|
||||||
@line_notes = project.commit_line_notes(@commit)
|
@line_notes = project.commit_line_notes(@commit)
|
||||||
|
|
||||||
|
@notes_count = @line_notes.count + project.commit_notes(@commit).count
|
||||||
end
|
end
|
||||||
|
|
||||||
def compare
|
def compare
|
||||||
|
|
|
@ -1,23 +1,25 @@
|
||||||
.commit
|
.commit_box
|
||||||
= link_to tree_project_ref_path(@project, @commit.id), :class => "btn right small" do
|
.commit
|
||||||
Browse Code »
|
.right
|
||||||
= image_tag gravatar_icon(@commit.author_email), :class => "avatar"
|
- unless @notes_count.zero?
|
||||||
%code= @commit.id.to_s
|
%span.btn.small.disabled.padded= pluralize @notes_count, 'note'
|
||||||
%h5
|
|
||||||
= @commit.author_name
|
|
||||||
%small= @commit.created_at.stamp("Aug 21, 2011 9:23pm")
|
|
||||||
- if @commit.author_name != @commit.committer_name or @commit.author_email != @commit.committer_email or @commit.authored_date != @commit.committed_date
|
|
||||||
–
|
|
||||||
%cite committed by
|
|
||||||
= @commit.committer_name
|
|
||||||
%small= @commit.committed_date.stamp("Aug 21, 2011 9:23pm")
|
|
||||||
|
|
||||||
%br
|
= link_to tree_project_ref_path(@project, @commit.id), :class => "btn small" do
|
||||||
%pre.commit_message.prettyprint
|
Browse Code »
|
||||||
= commit_msg_with_link_to_issues(@project, @commit.safe_message)
|
= image_tag gravatar_icon(@commit.author_email), :class => "avatar"
|
||||||
.clear
|
%code= @commit.id.to_s
|
||||||
%br
|
%h5
|
||||||
|
= @commit.author_name
|
||||||
|
%small= @commit.created_at.stamp("Aug 21, 2011 9:23pm")
|
||||||
|
- if @commit.author_name != @commit.committer_name or @commit.author_email != @commit.committer_email or @commit.authored_date != @commit.committed_date
|
||||||
|
–
|
||||||
|
%cite committed by
|
||||||
|
= @commit.committer_name
|
||||||
|
%small= @commit.committed_date.stamp("Aug 21, 2011 9:23pm")
|
||||||
|
|
||||||
|
%pre.commit_message
|
||||||
|
= commit_msg_with_link_to_issues(@project, @commit.safe_message)
|
||||||
|
%br
|
||||||
%p.cgray
|
%p.cgray
|
||||||
Showing #{pluralize(@commit.diffs.count, "changed file")}
|
Showing #{pluralize(@commit.diffs.count, "changed file")}
|
||||||
= render "commits/diffs", :diffs => @commit.diffs
|
= render "commits/diffs", :diffs => @commit.diffs
|
||||||
|
|
Loading…
Reference in a new issue