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
|
cats_translations = [["all",I18n.t(:all)]] + cats_translations
|
||||||
end
|
end
|
||||||
cats_translations = cats_translations.to_h
|
cats_translations = cats_translations.to_h
|
||||||
cats_relations = cats_translations.map{|cat_id,t|
|
if cats.include?("all")
|
||||||
if cat_id == "all"
|
cats_relations = cats_translations.clone
|
||||||
t = "all"
|
cats_relations['all'] = 'all'
|
||||||
end
|
else
|
||||||
[cat_id,t]
|
cats_relations = cats_translations
|
||||||
}.to_h
|
end
|
||||||
home_page = subpart.page_part.page rescue Page.first
|
|
||||||
page_url = (subpart.get_read_more_page_url rescue nil)
|
page_url = (subpart.get_read_more_page_url rescue nil)
|
||||||
locale = I18n.locale.to_s
|
locale = I18n.locale.to_s
|
||||||
if page_url.nil?
|
if page_url.nil?
|
||||||
|
home_page = subpart.page_part.page rescue Page.first
|
||||||
page = nil
|
page = nil
|
||||||
if home_page.respond_to?(:find_page)
|
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
|
page = home_page.find_page(:page_id=> subpart.read_more_page_id,:enabled_for=>locale).first rescue nil
|
||||||
|
|
Loading…
Reference in New Issue