New folder icon
This commit is contained in:
parent
bee5ab4340
commit
a4a00828d1
@ -41,7 +41,7 @@ class DmsfUpload
|
||||
end
|
||||
|
||||
def self.create_from_uploaded_attachment(project, folder, uploaded_file)
|
||||
a = Attachment.find_by_token(uploaded_file[:token])
|
||||
a = Attachment.find_by_token(uploaded_file[:token]) if uploaded_file[:token].present?
|
||||
if a
|
||||
uploaded = {
|
||||
disk_filename: DmsfHelper.temp_filename(a.filename),
|
||||
@ -50,7 +50,7 @@ class DmsfUpload
|
||||
comment: uploaded_file[:description],
|
||||
tempfile_path: a.diskfile
|
||||
}
|
||||
DmsfUpload.new(project, folder, uploaded)
|
||||
DmsfUpload.new project, folder, uploaded
|
||||
else
|
||||
Rails.logger.error "An attachment not found by its token: #{uploaded_file[:token]}"
|
||||
nil
|
||||
|
||||
@ -219,10 +219,13 @@ class DmsfControllerTest < RedmineDmsf::Test::TestCase
|
||||
@role.add_permission! :view_dmsf_files
|
||||
@role.add_permission! :view_dmsf_folders
|
||||
@role.add_permission! :file_manipulation
|
||||
@role.add_permission! :folder_manipulation
|
||||
get :show, params: { id: @project.id }
|
||||
assert_response :success
|
||||
# New file link
|
||||
assert_select 'a[href$=?]', '/dmsf/upload/multi_upload'
|
||||
# New folder link
|
||||
assert_select 'a[href$=?]', '/dmsf/new'
|
||||
# Filters
|
||||
assert_select 'fieldset#filters'
|
||||
# Options
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user