diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-11-17 20:53:56 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-11-17 20:53:56 +0300 |
commit | e945ec02804bb28dbd228d8002a159c8da0fcc38 (patch) | |
tree | 72600162a61e7990d6c62ce5af90f5e649cc1e86 /app/views/projects/blob/edit.html.haml | |
parent | 0b540a0fadf172277639910023fcf8b713ad35aa (diff) |
Add "Start a new merge request" option to every commit form
Diffstat (limited to 'app/views/projects/blob/edit.html.haml')
-rw-r--r-- | app/views/projects/blob/edit.html.haml | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/app/views/projects/blob/edit.html.haml b/app/views/projects/blob/edit.html.haml index 26216462707..56745165251 100644 --- a/app/views/projects/blob/edit.html.haml +++ b/app/views/projects/blob/edit.html.haml @@ -13,28 +13,15 @@ %i.fa.fa-eye = editing_preview_title(@blob.name) - = form_tag(namespace_project_update_blob_path(@project.namespace, @project, @id), method: :put, class: 'form-horizontal js-requires-input') do + = form_tag(namespace_project_update_blob_path(@project.namespace, @project, @id), method: :put, class: 'form-horizontal js-requires-input js-edit-blob-form') do = render 'projects/blob/editor', ref: @ref, path: @path, blob_data: @blob.data - = render 'shared/commit_message_container', params: params, placeholder: "Update #{@blob.name}" - - .form-group.branch - = label_tag 'branch', class: 'control-label' do - Branch - .col-sm-10 - = text_field_tag 'new_branch', @ref, class: "form-control" - - .form-group.destination - .col-sm-offset-2.col-sm-10 - .checkbox - = label_tag :create_merge_request do - = check_box_tag :create_merge_request, 1, false - Start a new merge request + = render 'shared/new_commit_form', placeholder: "Update #{@blob.name}" = hidden_field_tag 'last_commit', @last_commit = hidden_field_tag 'content', '', id: "file-content" = hidden_field_tag 'from_merge_request_id', params[:from_merge_request_id] - = hidden_field_tag 'original_branch', @ref = render 'projects/commit_button', ref: @ref, cancel_path: @after_edit_path :javascript blob = new EditBlob(gon.relative_url_root + "#{Gitlab::Application.config.assets.prefix}", "#{@blob.language.try(:ace_mode)}") + new NewCommitForm($('.js-edit-blob-form')) |