Module: ActiveScaffold::CalendarDateSelectBridge::SearchColumnHelpers
- Defined in:
- lib/six-updater-web/vendor/plugins/active_scaffold/lib/bridges/calendar_date_select/lib/as_cds_bridge.rb
Instance Method Summary collapse
Instance Method Details
#active_scaffold_search_calendar_date_select(column, options) ⇒ Object
AST
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/bridges/calendar_date_select/lib/as_cds_bridge.rb', line 55 def active_scaffold_search_calendar_date_select(column, ) opt_value, from_value, to_value = search_session_column_range_values(column) id_name = [:id] html = [] html << select_tag("#{[:name]}[opt]", (ActiveScaffold::Finder::NumericComparators.collect {|comp| [as_(comp.titleize), comp]}, opt_value), :id => "#{id_name}_opt", :onchange => "Element[this.value == 'BETWEEN' ? 'show' : 'hide']('#{id_name}_between');") = {:name => "#{[:name]}[from]", :help_string => "", :class => "range-input"}.merge((:id => "#{id_name}_from", :size => 10)) [:value] = nil [:value] = from_value html << active_scaffold_input_calendar_date_select(column, ) [:value] = nil [:value] = to_value [:name].gsub!('[from]', '[to]') [:id].gsub!('_from', '_to') html << content_tag(:span, ' - ' + active_scaffold_input_calendar_date_select(column, ), :id => "#{id_name}_between", :style => to_value.blank? ? "display:none" : "") html * ' ' end |