summaryrefslogtreecommitdiff
path: root/app/views/projects/notes
diff options
context:
space:
mode:
authorHannes Rosenögger <123haynes@gmail.com>2015-02-14 16:04:45 +0100
committerDouwe Maan <douwe@gitlab.com>2015-02-17 22:20:44 +0100
commit9bf8480b4a0d3ea6e284c4bd8bf26243f3f3f6f5 (patch)
tree2365d68b1905ddce4d20f226f9e888c29bc0dcf4 /app/views/projects/notes
parent0da0d800f2a0db9d9c16cf5e2feb0dd80b528223 (diff)
downloadgitlab-ce-9bf8480b4a0d3ea6e284c4bd8bf26243f3f3f6f5.tar.gz
Generalize the image upload in markdown
This commit generalizes the image upload via drag and drop so it supports all files. It also adds access control for these files.
Diffstat (limited to 'app/views/projects/notes')
-rw-r--r--app/views/projects/notes/_edit_form.html.haml2
-rw-r--r--app/views/projects/notes/_form.html.haml6
2 files changed, 4 insertions, 4 deletions
diff --git a/app/views/projects/notes/_edit_form.html.haml b/app/views/projects/notes/_edit_form.html.haml
index cdc76f5d96f..4ba59078318 100644
--- a/app/views/projects/notes/_edit_form.html.haml
+++ b/app/views/projects/notes/_edit_form.html.haml
@@ -6,7 +6,7 @@
.comment-hints.clearfix
.pull-left Comments are parsed with #{link_to "GitLab Flavored Markdown", help_page_path("markdown", "markdown"),{ target: '_blank', tabindex: -1 }}
- .pull-right Attach images (JPG, PNG, GIF) by dragging &amp; dropping or #{link_to "selecting them", '#', class: 'markdown-selector', tabindex: -1 }.
+ .pull-right Attach files by dragging &amp; dropping or #{link_to "selecting them", '#', class: 'markdown-selector', tabindex: -1 }.
.note-form-actions
.buttons
diff --git a/app/views/projects/notes/_form.html.haml b/app/views/projects/notes/_form.html.haml
index 1a4e06289f8..fe3dab569f4 100644
--- a/app/views/projects/notes/_form.html.haml
+++ b/app/views/projects/notes/_form.html.haml
@@ -1,4 +1,4 @@
-= form_for [@project, @note], remote: true, html: { :'data-type' => 'json', multipart: true, id: nil, class: "new_note js-new-note-form common-note-form gfm-form" }, authenticity_token: true do |f|
+= form_for [@project, @note], remote: true, html: { :'data-type' => 'json', multipart: true, id: nil, class: "new_note js-new-note-form common-note-form" }, authenticity_token: true do |f|
= note_target_fields
= f.hidden_field :commit_id
= f.hidden_field :line_code
@@ -11,7 +11,7 @@
.comment-hints.clearfix
.pull-left Comments are parsed with #{link_to "GitLab Flavored Markdown", help_page_path("markdown", "markdown"),{ target: '_blank', tabindex: -1 }}
- .pull-right Attach images (JPG, PNG, GIF) by dragging &amp; dropping or #{link_to "selecting them", '#', class: 'markdown-selector', tabindex: -1 }.
+ .pull-right Attach files by dragging &amp; dropping or #{link_to "selecting them", '#', class: 'markdown-selector', tabindex: -1 }.
.note-form-actions
@@ -29,4 +29,4 @@
= f.file_field :attachment, class: "js-note-attachment-input hidden"
:javascript
- window.project_image_path_upload = "#{upload_image_project_path @project}";
+ window.project_file_path_upload = "#{upload_file_project_path @project}";