4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/active_scaffold/helpers/calendar_date_select_update_column_helpers.rb', line 4
def active_scaffold_update_calendar_date_select(column, options)
current_params = {:value => nil, :number => nil, :unit => nil, :operator => 'NO_UPDATE'}
current_params.merge!(batch_update_values[column.name][:value].symbolize_keys) if batch_update_values[column.name] && batch_update_values[column.name][:value]
Rails.logger.info("update_date column: #{column.name}: #{current_params[:value].inspect}, class: #{current_params[:value].class}")
Rails.logger.info("update_date column: #{column.name}: options #{options.inspect}")
current_params[:value] = nil if current_params[:value].is_a?(String)
Rails.logger.info("update_date2 column: #{column.name}: #{current_params[:value].inspect}, class: #{current_params[:value].class}")
operator_options = active_scaffold_update_generic_operators(column)
operator_options.concat(ActiveScaffold::Actions::BatchUpdate::DateOperators.collect {|comp| [as_(comp.downcase.to_sym), comp]}) if active_scaffold_config.batch_update.process_mode == :update
options = options.merge(:show => ['PLUS', 'MINUS'].exclude?(current_params[:operator]))
tags = []
tags << select_tag("[record][#{column.name}][operator]",
options_for_select(operator_options, current_params[:operator]),
:id => "#{options[:id]}_operator",
:class => "text-input as_update_date_operator")
tags << active_scaffold_search_date_bridge_calendar_control(column, options, current_params[:value], 'value')
tags << active_scaffold_update_date_bridge_trend_tag(column, current_params, options)
tags.join(" ").html_safe
end
|