gitlab-org--gitlab-foss/app/views/projects/blob/edit.html.haml

25 lines
1 KiB
Text
Raw Normal View History

2012-10-09 13:11:49 -04:00
.file-editor
%ul.nav.nav-tabs.js-edit-mode
%li.active
2015-01-26 18:03:30 -05:00
= link_to '#editor' do
%i.fa.fa-edit
Edit file
%li
= link_to '#preview', 'data-preview-url' => namespace_project_preview_blob_path(@project.namespace, @project, @id) do
2015-01-26 18:03:30 -05:00
%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") do
2015-01-26 23:57:42 -05:00
= render 'projects/blob/editor', ref: @ref, path: @path, blob_data: @blob.data
2014-09-26 18:41:17 -04:00
= render 'shared/commit_message_container', params: params,
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]
= render 'projects/commit_button', ref: @ref,
cancel_path: @after_edit_path
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)}")