2016-08-24 18:44:58 -04:00
|
|
|
- @no_container = true
|
2015-04-30 13:06:18 -04:00
|
|
|
- page_title "Edit", @blob.path, @ref
|
2016-06-24 14:26:11 -04:00
|
|
|
- content_for :page_specific_javascripts do
|
|
|
|
= page_specific_javascript_tag('lib/ace.js')
|
2017-03-07 19:04:20 -05:00
|
|
|
= page_specific_javascript_bundle_tag('blob')
|
2016-08-24 18:44:58 -04:00
|
|
|
= render "projects/commits/head"
|
2015-09-17 06:16:24 -04:00
|
|
|
|
2016-08-24 18:44:58 -04:00
|
|
|
%div{ class: container_class }
|
|
|
|
- if @conflict
|
|
|
|
.alert.alert-danger
|
|
|
|
Someone edited the file the same time you did. Please check out
|
2017-03-15 17:21:48 -04:00
|
|
|
= link_to "the file", namespace_project_blob_path(@project.namespace, @project, tree_join(@target_branch, @file_path)), target: "_blank", rel: 'noopener noreferrer'
|
2016-08-24 18:44:58 -04:00
|
|
|
and make sure your changes will not unintentionally remove theirs.
|
2017-04-03 13:54:40 -04:00
|
|
|
.editor-title-row
|
|
|
|
%h3.page-title.blob-edit-page-title
|
|
|
|
Edit file
|
|
|
|
= render 'template_selectors'
|
2016-08-24 18:44:58 -04:00
|
|
|
.file-editor
|
|
|
|
%ul.nav-links.no-bottom.js-edit-mode
|
|
|
|
%li.active
|
|
|
|
= link_to '#editor' do
|
2017-04-03 13:54:40 -04:00
|
|
|
Write
|
2015-01-26 18:03:30 -05:00
|
|
|
|
2016-08-24 18:44:58 -04:00
|
|
|
%li
|
|
|
|
= link_to '#preview', 'data-preview-url' => namespace_project_preview_blob_path(@project.namespace, @project, @id) do
|
|
|
|
= editing_preview_title(@blob.name)
|
2014-05-22 05:25:44 -04:00
|
|
|
|
2016-08-24 18:44:58 -04:00
|
|
|
= 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', data: blob_editor_paths) 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_sha', @last_commit_sha
|
|
|
|
= hidden_field_tag 'content', '', id: "file-content"
|
2016-11-07 12:09:22 -05:00
|
|
|
= hidden_field_tag 'from_merge_request_iid', params[:from_merge_request_iid]
|
2016-08-24 18:44:58 -04:00
|
|
|
= render 'projects/commit_button', ref: @ref, cancel_path: namespace_project_blob_path(@project.namespace, @project, @id)
|