<% 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 %>
<% cats = Array(page.categories) if cats.include? 'all' cats = ModuleApp.where(key: 'custom_announcement').first.categories else cats = cats.map{|v| Category.where(id: v).first}.compact end all_cat = [[t('custom_announcement.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('custom_announcement.select_prompt')) %> " placeholder="<%= t('custom_announcement.keywords') %>">
" placeholder="<%= t('custom_announcement.stime') %>" data-format="yyyy/mm/dd">
~
" placeholder="<%= t('custom_announcement.etime') %>" data-format="yyyy/mm/dd">
<% end %> <%= render_view %>