2017-09-10 17:25:29 +05:30
|
|
|
- breadcrumb_title "Repository"
|
2016-11-03 12:29:30 +05:30
|
|
|
- @no_container = true
|
2015-09-11 14:41:01 +05:30
|
|
|
- page_title "Edit", @blob.path, @ref
|
2016-09-13 17:45:13 +05:30
|
|
|
- content_for :page_specific_javascripts do
|
|
|
|
= page_specific_javascript_tag('lib/ace.js')
|
|
|
|
|
2016-11-03 12:29:30 +05:30
|
|
|
%div{ class: container_class }
|
|
|
|
- if @conflict
|
|
|
|
.alert.alert-danger
|
|
|
|
Someone edited the file the same time you did. Please check out
|
2017-09-10 17:25:29 +05:30
|
|
|
= link_to "the file", project_blob_path(@project, tree_join(@branch_name, @file_path)), target: "_blank", rel: 'noopener noreferrer'
|
2016-11-03 12:29:30 +05:30
|
|
|
and make sure your changes will not unintentionally remove theirs.
|
2017-08-17 22:00:37 +05:30
|
|
|
.editor-title-row
|
|
|
|
%h3.page-title.blob-edit-page-title
|
|
|
|
Edit file
|
|
|
|
= render 'template_selectors'
|
2016-11-03 12:29:30 +05:30
|
|
|
.file-editor
|
2018-11-08 19:23:39 +05:30
|
|
|
%ul.nav-links.no-bottom.js-edit-mode.nav.nav-tabs
|
2016-11-03 12:29:30 +05:30
|
|
|
%li.active
|
|
|
|
= link_to '#editor' do
|
2017-08-17 22:00:37 +05:30
|
|
|
Write
|
2015-04-26 12:48:37 +05:30
|
|
|
|
2016-11-03 12:29:30 +05:30
|
|
|
%li
|
2018-11-20 20:47:30 +05:30
|
|
|
= link_to '#preview', 'data-preview-url' => project_preview_blob_path(@project, @id, legacy_render: params[:legacy_render]) do
|
2016-11-03 12:29:30 +05:30
|
|
|
= editing_preview_title(@blob.name)
|
2015-04-26 12:48:37 +05:30
|
|
|
|
2018-12-13 13:39:08 +05:30
|
|
|
= form_tag(project_update_blob_path(@project, @id), method: :put, class: 'js-quick-submit js-requires-input js-edit-blob-form', data: blob_editor_paths(@project)) do
|
2016-11-03 12:29:30 +05:30
|
|
|
= 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"
|
2017-01-15 13:20:01 +05:30
|
|
|
= hidden_field_tag 'from_merge_request_iid', params[:from_merge_request_iid]
|
2017-09-10 17:25:29 +05:30
|
|
|
= render 'projects/commit_button', ref: @ref, cancel_path: project_blob_path(@project, @id)
|