<% 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=='event_news'}.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('event_news.yes') enable_search_flag = true end end end end %> <% if enable_search_flag %>
<% cats = Array(page.categories) if cats.include? 'all' cats = ModuleApp.where(key: 'event_news').first.categories else cats = cats.map{|v| Category.where(id: v).first}.compact end all_cat = [[t('event_news.all'),'all']] %>
<%= select_tag('category',options_for_select(all_cat.concat(cats.map{|v| [v.title,v.id.to_s]}),:selected => params['category'].to_s),:id=>"category_select_box",:prompt => t('event_news.select_prompt')) %> " placeholder="<%= t('event_news.keywords') %>">
" placeholder="<%= t('event_news.stime') %>" data-format="yyyy/mm/dd">
~
" placeholder="<%= t('event_news.etime') %>" data-format="yyyy/mm/dd">
<% end %> <%= render_view %>