diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-04-25 14:17:07 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-04-25 14:17:07 +0000 |
commit | 9d2ca3f52c0fd803c50877c64e838a6eb726f68b (patch) | |
tree | 150d7ddc0431a9ad717f090782cb2564df833381 /app/views | |
parent | 04811cbbff15c7b40d679a81f0c920216f873824 (diff) | |
parent | a27b59f620ff26c9b358c5a34e175a6a513c9d15 (diff) | |
download | gitlab-ce-9d2ca3f52c0fd803c50877c64e838a6eb726f68b.tar.gz |
Merge branch '31276-fix-diffs-with-edit-forking-needs' into 'master'
Fix diffs with edit-forking needs
Closes #31276
See merge request !10868
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/_fork_suggestion.html.haml | 11 | ||||
-rw-r--r-- | app/views/projects/blob/_header.html.haml | 12 | ||||
-rw-r--r-- | app/views/projects/diffs/_file.html.haml | 2 |
3 files changed, 14 insertions, 11 deletions
diff --git a/app/views/projects/_fork_suggestion.html.haml b/app/views/projects/_fork_suggestion.html.haml new file mode 100644 index 00000000000..c855bfaf067 --- /dev/null +++ b/app/views/projects/_fork_suggestion.html.haml @@ -0,0 +1,11 @@ +- if current_user + .js-file-fork-suggestion-section.file-fork-suggestion.hidden + %span.file-fork-suggestion-note + You're not allowed to + %span.js-file-fork-suggestion-section-action + edit + files in this project directly. Please fork this project, + make your changes there, and submit a merge request. + = link_to 'Fork', nil, method: :post, class: 'js-fork-suggestion-button btn btn-grouped btn-inverted btn-new' + %button.js-cancel-fork-suggestion-button.btn.btn-grouped{ type: 'button' } + Cancel diff --git a/app/views/projects/blob/_header.html.haml b/app/views/projects/blob/_header.html.haml index d46e4534497..c553db84ee0 100644 --- a/app/views/projects/blob/_header.html.haml +++ b/app/views/projects/blob/_header.html.haml @@ -39,14 +39,4 @@ = replace_blob_link = delete_blob_link -- if current_user - .js-file-fork-suggestion-section.file-fork-suggestion.hidden - %span.file-fork-suggestion-note - You're not allowed to - %span.js-file-fork-suggestion-section-action - edit - files in this project directly. Please fork this project, - make your changes there, and submit a merge request. - = link_to 'Fork', nil, method: :post, class: 'js-fork-suggestion-button btn btn-grouped btn-inverted btn-new' - %button.js-cancel-fork-suggestion-button.btn.btn-grouped{ type: 'button' } - Cancel += render 'projects/fork_suggestion' diff --git a/app/views/projects/diffs/_file.html.haml b/app/views/projects/diffs/_file.html.haml index 0232a09b4a8..4622b980754 100644 --- a/app/views/projects/diffs/_file.html.haml +++ b/app/views/projects/diffs/_file.html.haml @@ -18,4 +18,6 @@ = view_file_button(diff_commit.id, diff_file.new_path, project) = view_on_environment_button(diff_commit.id, diff_file.new_path, environment) if environment + = render 'projects/fork_suggestion' + = render 'projects/diffs/content', diff_file: diff_file, diff_commit: diff_commit, blob: blob, project: project |