% params = OrbitHelper.params page = Page.where(url:params['url']).first enable_search_flag = false if page.methods.include? 'select_option_items'.to_sym ModuleApp.all.select{|tmp| tmp.key.to_s=='custom_announcement'}.each do |modile_app| @show_option_items = modile_app.show_option_items rescue nil end page.select_option_items.each do |select_option_item| if !(@show_option_items.nil?) && select_option_item.field_name == @show_option_items.keys[1].to_s value = YAML.load(select_option_item.value) if value[I18n.locale] == t('custom_announcement.yes') enable_search_flag = true end end end end %> <% if enable_search_flag %>
<% end %> <%= render_view %>