Project

General

Profile

Patch #19793 ยป flash_in_files_controller.diff

diff - Juan Manuel Rodulfo Salcedo, 2015-05-08 12:18

View differences:

app/controllers/files_controller.rb (working copy)
attachments = Attachment.attach_files(container, params[:attachments])
render_attachment_warning_if_needed(container)
if !attachments.empty? && !attachments[:files].blank? && Setting.notified_events.include?('file_added')
Mailer.attachments_added(attachments[:files]).deliver
if attachments.any? && !attachments[:files].blank?
if Setting.notified_events.include?('file_added')
Mailer.attachments_added(attachments[:files]).deliver
end
flash[:notice] = l(:label_file_added)
redirect_to project_files_path(@project)
else
flash[:error] = l(:label_file_error)
redirect_to :action => :new
end
redirect_to project_files_path(@project)
end
end
config/locales/en.yml (working copy)
label_attachment_delete: Delete file
label_attachment_plural: Files
label_file_added: File added
label_file_error: Error in File
label_report: Report
label_report_plural: Reports
label_news: News
    (1-1/1)