Redmine 4.1.1
This commit is contained in:
parent
33e7b881a5
commit
3d976f1b3b
1593 changed files with 36180 additions and 19489 deletions
|
@ -1,5 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Redmine - project management software
|
||||
# Copyright (C) 2006-2017 Jean-Philippe Lang
|
||||
# Copyright (C) 2006-2019 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
|
@ -44,7 +46,7 @@ class FilesController < ApplicationController
|
|||
end
|
||||
|
||||
def new
|
||||
@versions = @project.versions.sort
|
||||
@versions = @project.versions.sorted
|
||||
end
|
||||
|
||||
def create
|
||||
|
@ -55,12 +57,13 @@ class FilesController < ApplicationController
|
|||
|
||||
if attachments[:files].present?
|
||||
if Setting.notified_events.include?('file_added')
|
||||
Mailer.attachments_added(attachments[:files]).deliver
|
||||
Mailer.deliver_attachments_added(attachments[:files])
|
||||
end
|
||||
respond_to do |format|
|
||||
format.html {
|
||||
flash[:notice] = l(:label_file_added)
|
||||
redirect_to project_files_path(@project) }
|
||||
redirect_to project_files_path(@project)
|
||||
}
|
||||
format.api { render_api_ok }
|
||||
end
|
||||
else
|
||||
|
@ -68,7 +71,8 @@ class FilesController < ApplicationController
|
|||
format.html {
|
||||
flash.now[:error] = l(:label_attachment) + " " + l('activerecord.errors.messages.invalid')
|
||||
new
|
||||
render :action => 'new' }
|
||||
render :action => 'new'
|
||||
}
|
||||
format.api { render :status => :bad_request }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue