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
Léo-Paul Géneau
gitlab-ce
Commits
ea1827c9
Commit
ea1827c9
authored
Jul 06, 2016
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make expand_all param more explicit
parent
ff55398a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
app/controllers/concerns/diff_for_path.rb
app/controllers/concerns/diff_for_path.rb
+1
-1
app/helpers/diff_helper.rb
app/helpers/diff_helper.rb
+2
-2
app/views/projects/diffs/_content.html.haml
app/views/projects/diffs/_content.html.haml
+1
-1
app/views/projects/diffs/_diffs.html.haml
app/views/projects/diffs/_diffs.html.haml
+2
-2
No files found.
app/controllers/concerns/diff_for_path.rb
View file @
ea1827c9
...
...
@@ -8,7 +8,7 @@ module DiffForPath
diff_commit
=
commit_for_diff
(
diff_file
)
blob
=
diff_file
.
blob
(
diff_commit
)
@expand_all
=
true
@expand_all
_diffs
=
true
locals
=
{
diff_file:
diff_file
,
...
...
app/helpers/diff_helper.rb
View file @
ea1827c9
...
...
@@ -8,8 +8,8 @@ module DiffHelper
[
marked_old_line
,
marked_new_line
]
end
def
expand_all?
@expand_all
||
params
[
:expand
].
present?
def
expand_all
_diffs
?
@expand_all
_diffs
||
params
[
:expand_all_diffs
].
present?
end
def
diff_view
...
...
app/views/projects/diffs/_content.html.haml
View file @
ea1827c9
...
...
@@ -9,7 +9,7 @@
-
if
!
project
.
repository
.
diffable?
(
blob
)
.nothing-here-block
This diff was suppressed by a .gitattributes entry.
-
elsif
diff_file
.
diff_lines
.
length
>
0
-
if
diff_file
.
collapsed_by_default?
&&
!
expand_all?
-
if
diff_file
.
collapsed_by_default?
&&
!
expand_all
_diffs
?
-
url
=
url_for
(
params
.
merge
(
action: :diff_for_path
,
path:
diff_file
.
file_path
,
format:
nil
))
.nothing-here-block.diff-collapsed
{
data:
{
diff_for_path:
url
}
}
This diff is collapsed. Click to expand it.
...
...
app/views/projects/diffs/_diffs.html.haml
View file @
ea1827c9
...
...
@@ -6,8 +6,8 @@
.content-block.oneline-block.files-changed
.inline-parallel-buttons
-
unless
expand_all?
=
link_to
'Expand all'
,
url_for
(
params
.
merge
(
expand:
1
,
format:
'html'
)),
class:
'btn btn-default'
-
unless
expand_all
_diffs
?
=
link_to
'Expand all'
,
url_for
(
params
.
merge
(
expand
_all_diffs
:
1
,
format:
'html'
)),
class:
'btn btn-default'
-
if
show_whitespace_toggle
-
if
current_controller?
(
:commit
)
=
commit_diff_whitespace_link
(
@project
,
@commit
,
class:
'hidden-xs'
)
...
...
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