Fix show page.
This commit is contained in:
parent
6c89f33caa
commit
a704b6a1fd
|
@ -5,12 +5,13 @@
|
|||
page = Page.where(url:params['url']).first
|
||||
@ad_banner_location = 2
|
||||
@show_back_and_next_flag = 0
|
||||
if page.methods.include? 'select_option_items'.to_sym
|
||||
ModuleApp.all.select{|tmp| tmp.key.to_s=='event_news'}.each do |module_app|
|
||||
@show_option_items = module_app.show_option_items rescue nil
|
||||
if Page.instance_methods.include?(:select_option_items) && ModuleApp.instance_methods.include?(:show_option_items)
|
||||
@show_option_items = nil
|
||||
ModuleApp.all.select{|tmp| tmp.key.to_s=='event_news_mod'}.each do |module_app|
|
||||
@show_option_items = module_app.show_option_items
|
||||
end
|
||||
page.select_option_items.each do |select_option_item|
|
||||
if !(@show_option_items.nil?)
|
||||
unless @show_option_items.nil?
|
||||
if select_option_item.field_name == @show_option_items.keys.first.to_s
|
||||
value = YAML.load(select_option_item.value)
|
||||
tmp = value[:en]
|
||||
|
|
Loading…
Reference in New Issue