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
10c5ec3e
Commit
10c5ec3e
authored
Aug 18, 2016
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix expansion of discussions in diff
parent
6a355d45
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
5 deletions
+3
-5
app/views/discussions/_diff_discussion.html.haml
app/views/discussions/_diff_discussion.html.haml
+1
-1
app/views/projects/diffs/_line.html.haml
app/views/projects/diffs/_line.html.haml
+1
-1
app/views/projects/diffs/_text_file.html.haml
app/views/projects/diffs/_text_file.html.haml
+1
-3
No files found.
app/views/discussions/_diff_discussion.html.haml
View file @
10c5ec3e
-
expanded
=
local_assigns
.
fetch
(
:expanded
,
discussion
.
expanded?
)
-
expanded
=
local_assigns
.
fetch
(
:expanded
,
true
)
%tr
.notes_holder
{
class:
(
'hide'
unless
expanded
)}
%td
.notes_line
{
colspan:
2
}
%td
.notes_content
...
...
app/views/projects/diffs/_line.html.haml
View file @
10c5ec3e
...
...
@@ -30,8 +30,8 @@
=
diff_line_content
(
line
.
text
,
type
)
-
discussions
=
local_assigns
.
fetch
(
:discussions
,
nil
)
-
discussion_expanded
=
local_assigns
.
fetch
(
:discussion_expanded
,
false
)
-
if
discussions
&&
!
line
.
meta?
-
discussion
=
discussions
[
line_code
]
-
if
discussion
-
discussion_expanded
=
local_assigns
.
fetch
(
:discussion_expanded
,
discussion
.
expanded?
)
=
render
"discussions/diff_discussion"
,
discussion:
discussion
,
expanded:
discussion_expanded
app/views/projects/diffs/_text_file.html.haml
View file @
10c5ec3e
...
...
@@ -9,9 +9,7 @@
=
render
partial:
"projects/diffs/line"
,
collection:
diff_file
.
highlighted_diff_lines
,
as: :line
,
locals:
{
diff_file:
diff_file
,
discussions:
discussions
,
plain:
true
}
locals:
{
diff_file:
diff_file
,
discussions:
discussions
}
-
last_line
=
diff_file
.
highlighted_diff_lines
.
last
.
new_pos
-
if
!
diff_file
.
new_file
&&
last_line
>
0
...
...
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