Sha256: 5a3462cda09c456c78a341ce13aa2fae432dea910df498cd989139034834b87f

Contents?: true

Size: 356 Bytes

Versions: 8

Compression:

Stored size: 356 Bytes

Contents

module Admin::Resources::DataTypes::DateHelper

  def date_filter(filter)
    values = %w(today last_few_days last_7_days last_30_days)
    items = [[Typus::I18n.t("Show all dates"), ""]]
    items += values.map { |v| [Typus::I18n.t(v.humanize), v] }
  end

  alias_method :datetime_filter, :date_filter
  alias_method :timestamp_filter, :date_filter

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
typus-3.1.0.rc17 app/helpers/admin/resources/data_types/date_helper.rb
typus-3.1.0.rc16 app/helpers/admin/resources/data_types/date_helper.rb
typus-3.1.0.rc15 app/helpers/admin/resources/data_types/date_helper.rb
typus-3.1.0.rc14 app/helpers/admin/resources/data_types/date_helper.rb
typus-3.1.0.rc13 app/helpers/admin/resources/data_types/date_helper.rb
typus-3.1.0.rc12 app/helpers/admin/resources/data_types/date_helper.rb
typus-3.1.0.rc11 app/helpers/admin/resources/data_types/date_helper.rb
typus-3.1.0.rc10 app/helpers/admin/resources/data_types/date_helper.rb