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
e2576d58
Commit
e2576d58
authored
Oct 01, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid unnecessary usage of local vars
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
0d967bce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
6 deletions
+3
-6
app/views/projects/diffs/_diffs.html.haml
app/views/projects/diffs/_diffs.html.haml
+1
-4
app/views/projects/diffs/_stats.html.haml
app/views/projects/diffs/_stats.html.haml
+2
-2
No files found.
app/views/projects/diffs/_diffs.html.haml
View file @
e2576d58
...
@@ -8,10 +8,7 @@
...
@@ -8,10 +8,7 @@
.btn-group
.btn-group
=
inline_diff_btn
=
inline_diff_btn
=
parallel_diff_btn
=
parallel_diff_btn
-
additions
=
diff_files
.
sum
(
&
:added_lines
)
=
render
'projects/diffs/stats'
,
diff_files:
diff_files
-
deletions
=
diff_files
.
sum
(
&
:removed_lines
)
=
render
'projects/diffs/stats'
,
diff_files:
diff_files
,
additions:
additions
,
deletions:
deletions
-
if
diff_files
.
count
<
diffs
.
size
-
if
diff_files
.
count
<
diffs
.
size
=
render
'projects/diffs/warning'
,
diffs:
diffs
,
shown_files_count:
diff_files
.
count
=
render
'projects/diffs/warning'
,
diffs:
diffs
,
shown_files_count:
diff_files
.
count
...
...
app/views/projects/diffs/_stats.html.haml
View file @
e2576d58
...
@@ -4,9 +4,9 @@
...
@@ -4,9 +4,9 @@
=
link_to
'#'
,
class:
'js-toggle-button'
do
=
link_to
'#'
,
class:
'js-toggle-button'
do
%strong
#{
pluralize
(
diff_files
.
count
,
"changed file"
)
}
%strong
#{
pluralize
(
diff_files
.
count
,
"changed file"
)
}
with
with
%strong
.cgreen
#{
additions
}
additions
%strong
.cgreen
#{
diff_files
.
sum
(
&
:added_lines
)
}
additions
and
and
%strong
.cred
#{
d
eletions
}
deletions
%strong
.cred
#{
d
iff_files
.
sum
(
&
:removed_lines
)
}
deletions
.file-stats.js-toggle-content.hide
.file-stats.js-toggle-content.hide
%ul
%ul
-
diff_files
.
each_with_index
do
|
diff_file
,
i
|
-
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