2015-04-30 13:06:18 -04:00
|
|
|
- page_title "Edit", @blob.path, @ref
|
2015-09-17 06:16:24 -04:00
|
|
|
|
2012-10-09 13:11:49 -04:00
|
|
|
.file-editor
|
2016-01-13 09:58:04 -05:00
|
|
|
%ul.nav-links.no-bottom.js-edit-mode
|
2014-05-22 05:25:44 -04:00
|
|
|
%li.active
|
2015-01-26 18:03:30 -05:00
|
|
|
= link_to '#editor' do
|
2015-12-02 08:53:11 -05:00
|
|
|
Edit File
|
2015-01-26 18:03:30 -05:00
|
|
|
|
2014-05-22 05:25:44 -04:00
|
|
|
%li
|
2015-01-24 13:02:58 -05:00
|
|
|
= link_to '#preview', 'data-preview-url' => namespace_project_preview_blob_path(@project.namespace, @project, @id) do
|
2015-01-26 18:03:30 -05:00
|
|
|
= editing_preview_title(@blob.name)
|
2014-05-22 05:25:44 -04:00
|
|
|
|
2016-02-12 16:28:53 -05: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') do
|
2015-01-26 23:57:42 -05:00
|
|
|
= render 'projects/blob/editor', ref: @ref, path: @path, blob_data: @blob.data
|
2015-11-17 12:53:56 -05:00
|
|
|
= render 'shared/new_commit_form', placeholder: "Update #{@blob.name}"
|
2015-10-19 18:25:35 -04:00
|
|
|
|
2014-10-02 18:13:23 -04:00
|
|
|
= 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]
|
2015-12-18 04:03:34 -05:00
|
|
|
= render 'projects/commit_button', ref: @ref, cancel_path: namespace_project_blob_path(@project.namespace, @project, @id)
|
2012-10-09 13:11:49 -04:00
|
|
|
|
|
|
|
:javascript
|
2015-01-27 01:39:48 -05:00
|
|
|
blob = new EditBlob(gon.relative_url_root + "#{Gitlab::Application.config.assets.prefix}", "#{@blob.language.try(:ace_mode)}")
|
2015-11-17 12:53:56 -05:00
|
|
|
new NewCommitForm($('.js-edit-blob-form'))
|