Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
b03c873184fc
Unverified
Commit
7b3fd816
authored
Aug 22, 2016
by
Dmitriy Zaporozhets
Browse files
Disable comments on older merge request diff
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
e6b74db57e2e
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/controllers/projects/merge_requests_controller.rb
View file @
b03c8731
...
...
@@ -93,6 +93,11 @@ def diffs
respond_to
do
|
format
|
format
.
html
{
define_discussion_vars
}
format
.
json
do
if
@merge_request_diff
!=
@merge_request
.
merge_request_diff
# Disable comments if browsing older version of the diff
@diff_notes_disabled
=
true
end
@diffs
=
@merge_request_diff
.
diffs
(
diff_options
)
render
json:
{
html:
view_to_html_string
(
"projects/merge_requests/show/_diffs"
)
}
...
...
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