Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
e2760d42dfff
Unverified
Commit
e2576d58
authored
Oct 01, 2015
by
Dmitriy Zaporozhets
Browse files
Avoid unnecessary usage of local vars
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
2540c69dd73d
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/views/projects/diffs/_diffs.html.haml
View file @
e2760d42
...
...
@@ -8,10 +8,7 @@
.btn-group
=
inline_diff_btn
=
parallel_diff_btn
-
additions
=
diff_files
.
sum
(
&
:added_lines
)
-
deletions
=
diff_files
.
sum
(
&
:removed_lines
)
=
render
'projects/diffs/stats'
,
diff_files:
diff_files
,
additions:
additions
,
deletions:
deletions
=
render
'projects/diffs/stats'
,
diff_files:
diff_files
-
if
diff_files
.
count
<
diffs
.
size
=
render
'projects/diffs/warning'
,
diffs:
diffs
,
shown_files_count:
diff_files
.
count
...
...
app/views/projects/diffs/_stats.html.haml
View file @
e2760d42
...
...
@@ -4,9 +4,9 @@
=
link_to
'#'
,
class:
'js-toggle-button'
do
%strong
#{
pluralize
(
diff_files
.
count
,
"changed file"
)
}
with
%strong
.cgreen
#{
additions
}
additions
%strong
.cgreen
#{
diff_files
.
sum
(
&
:added_lines
)
}
additions
and
%strong
.cred
#{
d
eletions
}
deletions
%strong
.cred
#{
d
iff_files
.
sum
(
&
:removed_lines
)
}
deletions
.file-stats.js-toggle-content.hide
%ul
-
diff_files
.
each_with_index
do
|
diff_file
,
i
|
...
...
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