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
Boxiang Sun
gitlab-ce
Commits
3dc347a3
Commit
3dc347a3
authored
Jul 15, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup diff stats UI
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
45623089
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
16 deletions
+28
-16
app/assets/stylesheets/sections/commits.scss
app/assets/stylesheets/sections/commits.scss
+3
-1
app/views/projects/commits/_diffs.html.haml
app/views/projects/commits/_diffs.html.haml
+25
-15
No files found.
app/assets/stylesheets/sections/commits.scss
View file @
3dc347a3
...
@@ -112,7 +112,9 @@
...
@@ -112,7 +112,9 @@
.commit-stat-summary
{
.commit-stat-summary
{
color
:
#666
;
color
:
#666
;
line-height
:
2
;
font-size
:
14px
;
font-weight
:
normal
;
padding
:
10px
0
;
}
}
.commit-info-row
{
.commit-info-row
{
...
...
app/views/projects/commits/_diffs.html.haml
View file @
3dc347a3
...
@@ -23,21 +23,31 @@
...
@@ -23,21 +23,31 @@
If you still want to see the diff
If you still want to see the diff
=
link_to
"click this link"
,
url_for
(
force_show_diff:
true
),
class:
"underlined-link"
=
link_to
"click this link"
,
url_for
(
force_show_diff:
true
),
class:
"underlined-link"
%p
.commit-stat-summary
Showing
.row
%strong
.cdark
#{
pluralize
(
diffs
.
count
,
"changed file"
)
}
.col-md-8
-
if
current_controller?
(
:commit
)
.js-toggle-container
-
unless
@commit
.
has_zero_stats?
.commit-stat-summary
with
Showing
%strong
.cgreen
#{
@commit
.
stats
.
additions
}
additions
%strong
.cdark
#{
pluralize
(
diffs
.
count
,
"changed file"
)
}
and
-
if
current_controller?
(
:commit
)
%strong
.cred
#{
@commit
.
stats
.
deletions
}
deletions
-
unless
@commit
.
has_zero_stats?
-
if
params
[
:view
]
==
'parallel'
with
=
link_to
"Inline Diff"
,
url_for
(
view:
'inline'
),
{
id:
"commit-diff-viewtype"
,
class:
'btn btn-tiny pull-right'
}
%strong
.cgreen
#{
@commit
.
stats
.
additions
}
additions
-
else
and
=
link_to
"Side-by-side Diff"
,
url_for
(
view:
'parallel'
),
{
id:
"commit-diff-viewtype"
,
class:
'btn btn-tiny pull-right'
}
%strong
.cred
#{
@commit
.
stats
.
deletions
}
deletions
.file-stats
=
render
"projects/commits/diff_head"
,
diffs:
diffs
=
link_to
'#'
,
class:
'btn btn-small js-toggle-button'
do
Show diff stats
%i
.icon-chevron-down
.file-stats.js-toggle-content.hide
=
render
"projects/commits/diff_head"
,
diffs:
diffs
.col-md-4
%ul
.nav.nav-tabs
%li
.pull-right
{
class:
params
[
:view
]
==
'parallel'
?
'active'
:
''
}
=
link_to
"Side-by-side Diff"
,
url_for
(
view:
'parallel'
),
{
id:
"commit-diff-viewtype"
}
%li
.pull-right
{
class:
params
[
:view
]
!=
'parallel'
?
'active'
:
''
}
=
link_to
"Inline Diff"
,
url_for
(
view:
'inline'
),
{
id:
"commit-diff-viewtype"
}
.files
.files
-
unless
@suppress_diff
-
unless
@suppress_diff
...
...
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