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

28 lines
1.2 KiB
Text
Raw Normal View History

2015-09-11 14:41:01 +05:30
- page_title "Edit", @blob.path, @ref
2015-09-25 12:07:36 +05:30
= render "header_title"
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
= icon('edit')
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
2015-12-23 02:04:40 +05:30
= icon('eye')
2015-04-26 12:48:37 +05:30
= editing_preview_title(@blob.name)
2015-11-26 14:37:03 +05:30
= form_tag(namespace_project_update_blob_path(@project.namespace, @project, @id), method: :put, class: 'form-horizontal js-requires-input js-edit-blob-form') 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}"
2015-04-26 12:48:37 +05:30
= 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: namespace_project_blob_path(@project.namespace, @project, @id)
2015-04-26 12:48:37 +05:30
:javascript
blob = new EditBlob(gon.relative_url_root + "#{Gitlab::Application.config.assets.prefix}", "#{@blob.language.try(:ace_mode)}")
2015-11-26 14:37:03 +05:30
new NewCommitForm($('.js-edit-blob-form'))