Fix translation missing in file(en).Fix download_file are not visable in index page problem.

This commit is contained in:
BOHUNG 2020-03-11 18:56:39 +08:00
parent b6c81050d0
commit 0944cd8777
2 changed files with 2 additions and 1 deletions

View File

@ -11,6 +11,7 @@ class AnnouncementsController < ApplicationController
"status-class" => "status-#{status['classname']}" "status-class" => "status-#{status['classname']}"
} }
end end
locale = OrbitHelper.get_site_locale.to_s
files = a.bulletin_files.map{|file| { "file_url" => file.file.url, "file_title" => (file.title.blank? ? File.basename(file.file.path) : file.title rescue '') } if file.enabled_for?(locale) } rescue [] files = a.bulletin_files.map{|file| { "file_url" => file.file.url, "file_title" => (file.title.blank? ? File.basename(file.file.path) : file.title rescue '') } if file.enabled_for?(locale) } rescue []
files.delete(nil) files.delete(nil)
links = a.bulletin_links.map{|link| { "link_url" => link.url, "link_title" => (link.title.blank? ? link.url : link.title) } } rescue [] links = a.bulletin_links.map{|link| { "link_url" => link.url, "link_title" => (link.title.blank? ? link.url : link.title) } } rescue []

View File

@ -28,7 +28,7 @@ en:
category: Category category: Category
author: Author author: Author
link: Link link: Link
File: File file: File
view_count: View Count view_count: View Count
add_new: Add New add_new: Add New
export_to_excel: Export to Excel export_to_excel: Export to Excel