debian-mirror-gitlab/app/views/projects/blob/edit.html.haml

29 lines
1.5 KiB
Text
Raw Normal View History

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')
= page_specific_javascript_tag('blob_edit/blob_edit_bundle.js')
- 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.
2015-09-25 12:07:36 +05:30
2015-04-26 12:48:37 +05:30
.file-editor
%ul.nav-links.no-bottom.js-edit-mode
2015-04-26 12:48:37 +05:30
%li.active
= link_to '#editor' do
2015-12-23 02:04:40 +05:30
Edit File
2015-04-26 12:48:37 +05:30
%li
= link_to '#preview', 'data-preview-url' => namespace_project_preview_blob_path(@project.namespace, @project, @id) do
= editing_preview_title(@blob.name)
2016-09-13 17:45:13 +05:30
= 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
2015-04-26 12:48:37 +05:30
= render 'projects/blob/editor', ref: @ref, path: @path, blob_data: @blob.data
2015-11-26 14:37:03 +05:30
= render 'shared/new_commit_form', placeholder: "Update #{@blob.name}"
2016-09-13 17:45:13 +05:30
= hidden_field_tag 'last_commit_sha', @last_commit_sha
2015-04-26 12:48:37 +05:30
= 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)