Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-ce
Commits
788de6f1
Commit
788de6f1
authored
Mar 26, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better commit show page
parent
7d56a51b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
20 deletions
+38
-20
app/assets/stylesheets/common.scss
app/assets/stylesheets/common.scss
+16
-2
app/controllers/commits_controller.rb
app/controllers/commits_controller.rb
+2
-0
app/views/commits/show.html.haml
app/views/commits/show.html.haml
+20
-18
No files found.
app/assets/stylesheets/common.scss
View file @
788de6f1
...
...
@@ -1011,23 +1011,37 @@ p.time {
}
.issue_box
,
.commit_box
,
.merge_request_box
{
@extend
.padded
;
@extend
.borders
;
@extend
.prepend-top-20
;
@extend
.append-bottom-20
;
border-width
:
2px
;
img
{
max-width
:
100%
;
}
pre
{
background
:
white
!
important
;
code
{
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
{
background
:
#EEDC94
;
}
...
...
app/controllers/commits_controller.rb
View file @
788de6f1
...
...
@@ -32,6 +32,8 @@ class CommitsController < ApplicationController
@note
=
@project
.
build_commit_note
(
@commit
)
@comments_allowed
=
true
@line_notes
=
project
.
commit_line_notes
(
@commit
)
@notes_count
=
@line_notes
.
count
+
project
.
commit_notes
(
@commit
).
count
end
def
compare
...
...
app/views/commits/show.html.haml
View file @
788de6f1
.commit
=
link_to
tree_project_ref_path
(
@project
,
@commit
.
id
),
:class
=>
"btn right small"
do
.commit_box
.commit
.right
-
unless
@notes_count
.
zero?
%span
.btn.small.disabled.padded
=
pluralize
@notes_count
,
'note'
=
link_to
tree_project_ref_path
(
@project
,
@commit
.
id
),
:class
=>
"btn small"
do
Browse Code »
=
image_tag
gravatar_icon
(
@commit
.
author_email
),
:class
=>
"avatar"
%code
=
@commit
.
id
.
to_s
...
...
@@ -12,12 +17,9 @@
=
@commit
.
committer_name
%small
=
@commit
.
committed_date
.
stamp
(
"Aug 21, 2011 9:23pm"
)
%br
%pre
.commit_message.prettyprint
%pre
.commit_message
=
commit_msg_with_link_to_issues
(
@project
,
@commit
.
safe_message
)
.clear
%br
%p
.cgray
Showing
#{
pluralize
(
@commit
.
diffs
.
count
,
"changed file"
)
}
=
render
"commits/diffs"
,
:diffs
=>
@commit
.
diffs
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment