diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-08-15 16:54:49 -0500 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-08-15 16:54:49 -0500 |
commit | a669bdb8e6a1fc304e2e920b144caa85bd37956d (patch) | |
tree | 08cc2372d9804fd12bd83ae446db931baef1765f /app/views | |
parent | dd2088b08dd89001c8b0da387bd1c928f6c69153 (diff) | |
parent | ade0c2c8922c0838ba85cf69419cbb109453d6b2 (diff) | |
download | gitlab-ce-a669bdb8e6a1fc304e2e920b144caa85bd37956d.tar.gz |
Merge branch 'frank-west-iii/gitlab-ce-fwiii-5857-web-editor-overwrites-commits'
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/blob/edit.html.haml | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/views/projects/blob/edit.html.haml b/app/views/projects/blob/edit.html.haml index b1c9895f43e..7b0621f9401 100644 --- a/app/views/projects/blob/edit.html.haml +++ b/app/views/projects/blob/edit.html.haml @@ -1,5 +1,11 @@ - page_title "Edit", @blob.path, @ref +- if @conflict + .alert.alert-danger + Someone edited the file the same time you did. Please check out + = link_to "the file", namespace_project_blob_path(@project.namespace, @project, tree_join(@target_branch, @file_path)), target: "_blank" + and make sure your changes will not unintentionally remove theirs. + .file-editor %ul.nav-links.no-bottom.js-edit-mode %li.active @@ -13,8 +19,7 @@ = form_tag(namespace_project_update_blob_path(@project.namespace, @project, @id), method: :put, class: 'form-horizontal js-quick-submit js-requires-input js-edit-blob-form') do = render 'projects/blob/editor', ref: @ref, path: @path, blob_data: @blob.data = render 'shared/new_commit_form', placeholder: "Update #{@blob.name}" - - = hidden_field_tag 'last_commit', @last_commit + = hidden_field_tag 'last_commit_sha', @last_commit_sha = hidden_field_tag 'content', '', id: "file-content" = hidden_field_tag 'from_merge_request_id', params[:from_merge_request_id] = render 'projects/commit_button', ref: @ref, cancel_path: namespace_project_blob_path(@project.namespace, @project, @id) |