summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2016-08-19 16:17:14 +0100
committerSean McGivern <sean@gitlab.com>2016-08-19 16:17:14 +0100
commit9cf6d4514b8f9ff312ab45102127fce97050630c (patch)
treeb6606a3c9055109d0d1e5ddb75773776e14ede8a /app/views
parent8db088ccc726996bdcda74373d9ce855dedf5bd5 (diff)
downloadgitlab-ce-9cf6d4514b8f9ff312ab45102127fce97050630c.tar.gz
Move editor paths to helper
Diffstat (limited to 'app/views')
-rw-r--r--app/views/projects/blob/edit.html.haml2
-rw-r--r--app/views/projects/blob/new.html.haml2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/views/projects/blob/edit.html.haml b/app/views/projects/blob/edit.html.haml
index dae476d7cc4..680e95ac6b5 100644
--- a/app/views/projects/blob/edit.html.haml
+++ b/app/views/projects/blob/edit.html.haml
@@ -19,7 +19,7 @@
= link_to '#preview', 'data-preview-url' => namespace_project_preview_blob_path(@project.namespace, @project, @id) do
= editing_preview_title(@blob.name)
- = 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: {'relative-url-root' => "#{Rails.application.config.relative_url_root}", 'assets-prefix' => "#{Gitlab::Application.config.assets.prefix}", 'blob-language' => "#{@blob.language.try(:ace_mode)}" }) do
+ = 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
= 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
diff --git a/app/views/projects/blob/new.html.haml b/app/views/projects/blob/new.html.haml
index 9c60131f6d1..b6ed9518c48 100644
--- a/app/views/projects/blob/new.html.haml
+++ b/app/views/projects/blob/new.html.haml
@@ -7,7 +7,7 @@
New File
.file-editor
- = form_tag(namespace_project_create_blob_path(@project.namespace, @project, @id), method: :post, class: 'form-horizontal js-edit-blob-form js-new-blob-form js-quick-submit js-requires-input', data: {'relative-url-root' => "#{Rails.application.config.relative_url_root}", 'assets-prefix' => "#{Gitlab::Application.config.assets.prefix}" }) do
+ = form_tag(namespace_project_create_blob_path(@project.namespace, @project, @id), method: :post, class: 'form-horizontal js-edit-blob-form js-new-blob-form js-quick-submit js-requires-input', data: blob_editor_paths) do
= render 'projects/blob/editor', ref: @ref
= render 'shared/new_commit_form', placeholder: "Add new file"