Skip to content
Snippets Groups Projects
Unverified Commit 8e591135 authored by Phil Hughes's avatar Phil Hughes
Browse files

Use Web IDE path for merge request edit buttons

parent d6696f81
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -37,7 +37,7 @@ module BlobHelper
end
 
def ide_edit_button(project = @project, ref = @ref, path = @path, options = {})
return unless Feature.enabled?(:web_ide_default)
return if Feature.enabled?(:web_ide_default)
return unless blob = readable_blob(options, path, project, ref)
 
edit_button_tag(blob,
Loading
Loading
Loading
Loading
@@ -27,9 +27,13 @@ class DiffFileBaseEntity < Grape::Entity
 
next unless merge_request.source_project
 
project_edit_blob_path(merge_request.source_project,
tree_join(merge_request.source_branch, diff_file.new_path),
options)
if Feature.enabled?(:web_ide_default)
ide_edit_path(merge_request.source_project, merge_request.source_branch, diff_file.new_path)
else
project_edit_blob_path(merge_request.source_project,
tree_join(merge_request.source_branch, diff_file.new_path),
options)
end
end
 
expose :old_path_html do |diff_file|
Loading
Loading
Loading
Loading
@@ -18,6 +18,8 @@ describe 'a maintainer edits files on a source-branch of an MR from a fork', :js
end
 
before do
stub_feature_flags(web_ide_default: false)
target_project.add_maintainer(user)
sign_in(user)
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment