diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb index a8d5b8f..deba329 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -565,7 +565,7 @@ class AnnouncementsController < ApplicationController } } rescue [] files = announcement.bulletin_files.map do |file| { "file_url" => "/xhr/announcements/file/#{file.id}/#{file['file']}" + "\" title=\"#{file.file_title}", - "file_title" => (file.title.blank? ? URI.unescape(File.basename(file.file.path)) : file.title rescue '') } if file.enabled_for?(locale) + "file_title" => (file.title.blank? ? URI.unescape(File.basename(file.file.path)) : file.title rescue '') } rescue nil if file.enabled_for?(locale) end rescue [] files.delete(nil) files.each do |file| diff --git a/app/views/admin/announcements/_form.html.erb b/app/views/admin/announcements/_form.html.erb index 5c4c563..3dbb71f 100644 --- a/app/views/admin/announcements/_form.html.erb +++ b/app/views/admin/announcements/_form.html.erb @@ -509,6 +509,14 @@ }) <% end %> +