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

22 lines
909 B
Plaintext
Raw Normal View History

2015-04-30 19:33:02 +00:00
- page_title "New File", @ref
%h3.page-title New file
.file-editor
= form_tag(namespace_project_create_blob_path(@project.namespace, @project, @id), method: :post, class: 'form-horizontal form-new-file js-requires-input') do
2015-01-27 04:57:42 +00:00
= render 'projects/blob/editor', ref: @ref
= render 'shared/commit_message_container', params: params,
placeholder: 'Add new file'
2015-02-14 16:18:05 +00:00
- unless @project.empty_repo?
.form-group.branch
= label_tag 'branch', class: 'control-label' do
Branch
.col-sm-10
= text_field_tag 'new_branch', @ref, class: "form-control"
2015-02-14 16:18:05 +00:00
= hidden_field_tag 'content', '', id: 'file-content'
= render 'projects/commit_button', ref: @ref,
cancel_path: namespace_project_tree_path(@project.namespace, @project, @id)
:javascript
2015-01-27 06:39:48 +00:00
blob = new NewBlob(gon.relative_url_root + "#{Gitlab::Application.config.assets.prefix}", null)