my_forum 0.0.1.beta26 → 0.0.1.beta27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/my_forum/attachments_controller.rb +2 -0
- data/app/helpers/my_forum/application_helper.rb +3 -0
- data/app/models/my_forum/attachment.rb +2 -0
- data/app/views/my_forum/topics/_quick_answer.haml +2 -0
- data/config/locales/ru.yml +4 -0
- data/lib/my_forum/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85befe5d26e8e5dd2cdd6c60b72b8603447b9c5d
|
4
|
+
data.tar.gz: 0edfd26fa58e9b16ec5cbf13210352d732adb120
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55a8479d2f36b42a31b41f686c69a9dd17fdb5ce98e65480c156f88a6d7085770f612b8b8077dfe04c1dafb8b97c6d9af425b328ea6ce1bb1fd77d0cc75e0a28
|
7
|
+
data.tar.gz: a9583685f8dc25443eddd20846f9e35aed13a0323ce27c0ccdba6d06c4410c5e82783631e490a98d1057bbf555304a6d4dbbe0fbb2d93a6d691db657b41ce441
|
@@ -12,6 +12,8 @@ module MyForum
|
|
12
12
|
attachment_ids = []
|
13
13
|
|
14
14
|
params[:files].each do |uploaded_io|
|
15
|
+
next unless Attachment::ALLOWED_FILE_EXTENSIONS.include? File.extname(uploaded_io.original_filename)
|
16
|
+
|
15
17
|
file_name = "#{Time.now.to_i}_#{uploaded_io.original_filename}"
|
16
18
|
File.open(File.join(upload_path, file_name), 'wb') do |file|
|
17
19
|
file.write(uploaded_io.read)
|
@@ -56,6 +56,7 @@
|
|
56
56
|
%h4.modal-title
|
57
57
|
= t('.add_new_photo')
|
58
58
|
.modal-body
|
59
|
+
%p= t('my_forum.attachments.allowed_extensions', ext: upload_allowed_extensions.join(', '))
|
59
60
|
= form_for MyForum::Attachment.new, url: attachments_path, multipart: true, remote: true do |f|
|
60
61
|
= f.file_field 'file[]', multiple: true, id: 'attachment_files'
|
61
62
|
|
@@ -83,6 +84,7 @@
|
|
83
84
|
$('#quick_answer_textarea').append(bbcode_attachments)
|
84
85
|
$('#loaded-content').html('#{t('my_forum.successfull_aploaded')}')
|
85
86
|
$('#add_photo').modal('hide')
|
87
|
+
$('#attachment_files').val('')
|
86
88
|
})
|
87
89
|
|
88
90
|
|
data/config/locales/ru.yml
CHANGED
data/lib/my_forum/version.rb
CHANGED