summaryrefslogtreecommitdiff
path: root/app/views/projects/blob/new.html.haml
blob: 167fa61518277a9a0e0cf4301a2b739cfde16508 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
- page_title "New File", @path.presence, @ref
= render "header_title"

%h3.page-title
  New File

.file-editor
  = form_tag(namespace_project_create_blob_path(@project.namespace, @project, @id), method: :post, class: 'form-horizontal js-new-blob-form js-requires-input') do
    = render 'projects/blob/editor', ref: @ref
    = render 'shared/new_commit_form', placeholder: "Add new file"

    = hidden_field_tag 'content', '', id: 'file-content'
    = render 'projects/commit_button', ref: @ref,
              cancel_path: namespace_project_tree_path(@project.namespace, @project, @id)

:javascript
  blob = new NewBlob(gon.relative_url_root + "#{Gitlab::Application.config.assets.prefix}", null)
  new NewCommitForm($('.js-new-blob-form'))