summaryrefslogtreecommitdiff
path: root/app/views/projects/blob/_upload.html.haml
diff options
context:
space:
mode:
authorliyakun <liyakun127@gmail.com>2015-09-10 16:18:40 +0200
committerliyakun <liyakun127@gmail.com>2015-09-15 02:12:56 +0200
commite2ece2bc350bf881e9716e51c01a59eecac65fc9 (patch)
tree422d043e1cd6bc09c62fd726958384c320c483d8 /app/views/projects/blob/_upload.html.haml
parent7abb744eb961d95ef9f34e8b64c47084d3f620b6 (diff)
downloadgitlab-ce-e2ece2bc350bf881e9716e51c01a59eecac65fc9.tar.gz
Add "Replace" and "Upload" features
Refactor upload and replace functionality Rename file and move CSS Fix typo Make dropzone a div Remove unnecessary file Change color of "upload existing one" Add missing changes
Diffstat (limited to 'app/views/projects/blob/_upload.html.haml')
-rw-r--r--app/views/projects/blob/_upload.html.haml28
1 files changed, 28 insertions, 0 deletions
diff --git a/app/views/projects/blob/_upload.html.haml b/app/views/projects/blob/_upload.html.haml
new file mode 100644
index 00000000000..5a6a3358a17
--- /dev/null
+++ b/app/views/projects/blob/_upload.html.haml
@@ -0,0 +1,28 @@
+#modal-upload-blob.modal
+ .modal-dialog
+ .modal-content
+ .modal-header
+ %a.close{href: "#", "data-dismiss" => "modal"} ×
+ %h3.page-title Upload
+ %p.light
+ From branch
+ %strong= @ref
+ .modal-body
+ = form_tag namespace_project_create_blob_path(@project.namespace, @project, @id), method: :post, class: 'blob-file-upload-form-js form-horizontal' do
+ .dropzone
+ .dropzone-previews{class: "blob-upload-dropzone-previews"}
+ %p.dz-message{class: "hint"}<
+ Attach files by dragging & dropping or&nbsp;
+ %a{href: '#', class: "markdown-selector"}>click to upload
+ %br
+ .dropzone-alerts{class: "alert alert-danger data", "data-dismiss" => "alert", style: "display:none"}
+ = render 'shared/commit_message_container', params: params,
+ placeholder: 'Upload this file because...'
+ .form-group
+ .col-sm-offset-2.col-sm-10
+ = button_tag 'Upload file', class: 'btn btn-small btn-primary btn-upload-file', id: 'submit-all'
+ = link_to "Cancel", '#', class: "btn btn-cancel", "data-dismiss" => "modal"
+
+:coffeescript
+ disableButtonIfEmptyField $('.blob-file-upload-form-js').find('#commit_message'), '.btn-upload-file'
+ new BlobFileDropzone($('.blob-file-upload-form-js'), 'post')