use text-filter layout for integer-filter to avoid having them rendered as object-filter

pull/6827/head
Philipp Tessenow 14 years ago
parent a5742124be
commit 57540d0c5c
  1. 1
      app/helpers/reporting_helper.rb

@ -8,6 +8,7 @@ module ReportingHelper
# @param [CostQuery::Filter] the filter we want to render # @param [CostQuery::Filter] the filter we want to render
def html_elements(filter) def html_elements(filter)
return text_elements filter if CostQuery::Operator.string_operators.all? { |o| filter.available_operators.include? o } return text_elements filter if CostQuery::Operator.string_operators.all? { |o| filter.available_operators.include? o }
return text_elements filter if CostQuery::Operator.integer_operators.all? { |o| filter.available_operators.include? o } #FIXME: have special filters designed for integer-operators, to give feedback if the user doesn't enter an int etc.
return date_elements filter if CostQuery::Operator.time_operators.all? { |o| filter.available_operators.include? o } return date_elements filter if CostQuery::Operator.time_operators.all? { |o| filter.available_operators.include? o }
return heavy_object_elements filter if filter.heavy? return heavy_object_elements filter if filter.heavy?
object_elements filter object_elements filter

Loading…
Cancel
Save