small fix for show page for remote anns
This commit is contained in:
parent
10ed85e4fb
commit
9938585a5a
|
@ -102,7 +102,7 @@ class AnnouncementsController < ApplicationController
|
||||||
"status-class" => "status-source"
|
"status-class" => "status-source"
|
||||||
}
|
}
|
||||||
|
|
||||||
files = fa["bulletin_files"].collect{|bf| { "file_url" => bf["url"], "file_title" => (fa["title_translations"][locale].blank? ? fa["url"] : fa["title_translations"][locale] rescue '') }} rescue []
|
files = fa["bulletin_files"].collect{|bf| { "file_url" => bf["url"], "file_title" => (fa["title_translations"][locale].blank? ? File.basename(fa["url"]) : fa["title_translations"][locale] rescue '') }} rescue []
|
||||||
links = fa["bulletin_links"].map{|link| { "link_url" => link["url"], "link_title" => (link["title_translations"][locale].blank? ? link["url"] : link["title_translations"][locale]) } } rescue []
|
links = fa["bulletin_links"].map{|link| { "link_url" => link["url"], "link_title" => (link["title_translations"][locale].blank? ? link["url"] : link["title_translations"][locale]) } } rescue []
|
||||||
|
|
||||||
x = {
|
x = {
|
||||||
|
@ -290,7 +290,7 @@ class AnnouncementsController < ApplicationController
|
||||||
links = announcement["bulletin_links"].map{|link| { "link_url" => link["url"], "link_title" => (link["title_translations"][locale] == "" ? link["url"] : link["title_translations"][locale]) } } rescue []
|
links = announcement["bulletin_links"].map{|link| { "link_url" => link["url"], "link_title" => (link["title_translations"][locale] == "" ? link["url"] : link["title_translations"][locale]) } } rescue []
|
||||||
|
|
||||||
update_user = announcement["author"]
|
update_user = announcement["author"]
|
||||||
desc = announcement["image_description_translations"][locale]
|
desc = announcement["image_description_translations"][locale] rescue ""
|
||||||
desc = (desc.nil? || desc == "" ? "announcement image" : desc)
|
desc = (desc.nil? || desc == "" ? "announcement image" : desc)
|
||||||
|
|
||||||
request = OrbitHelper.request
|
request = OrbitHelper.request
|
||||||
|
|
Loading…
Reference in New Issue