accelerate announcement
This commit is contained in:
parent
9211ab2cf7
commit
325100664d
|
@ -183,16 +183,16 @@ class AnnouncementsController < ApplicationController
|
|||
cats_translations = [["all",I18n.t(:all)]] + cats_translations
|
||||
end
|
||||
cats_translations = cats_translations.to_h
|
||||
cats_relations = cats_translations.map{|cat_id,t|
|
||||
if cat_id == "all"
|
||||
t = "all"
|
||||
end
|
||||
[cat_id,t]
|
||||
}.to_h
|
||||
home_page = subpart.page_part.page rescue Page.first
|
||||
if cats.include?("all")
|
||||
cats_relations = cats_translations.clone
|
||||
cats_relations['all'] = 'all'
|
||||
else
|
||||
cats_relations = cats_translations
|
||||
end
|
||||
page_url = (subpart.get_read_more_page_url rescue nil)
|
||||
locale = I18n.locale.to_s
|
||||
if page_url.nil?
|
||||
home_page = subpart.page_part.page rescue Page.first
|
||||
page = nil
|
||||
if home_page.respond_to?(:find_page)
|
||||
page = home_page.find_page(:page_id=> subpart.read_more_page_id,:enabled_for=>locale).first rescue nil
|
||||
|
|
Loading…
Reference in New Issue