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
8e591135
Commit
8e591135
authored
Feb 27, 2019
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Web IDE path for merge request edit buttons
parent
d6696f81
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
app/helpers/blob_helper.rb
app/helpers/blob_helper.rb
+1
-1
app/serializers/diff_file_base_entity.rb
app/serializers/diff_file_base_entity.rb
+7
-3
spec/features/merge_request/maintainer_edits_fork_spec.rb
spec/features/merge_request/maintainer_edits_fork_spec.rb
+2
-0
No files found.
app/helpers/blob_helper.rb
View file @
8e591135
...
...
@@ -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
,
...
...
app/serializers/diff_file_base_entity.rb
View file @
8e591135
...
...
@@ -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
|
...
...
spec/features/merge_request/maintainer_edits_fork_spec.rb
View file @
8e591135
...
...
@@ -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
)
...
...
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