Sha256: d6c0a65a40dfca96be95a2092f05818ffd64eb524de4d9d821f58f8aedc1b8c0

Contents?: true

Size: 469 Bytes

Versions: 13

Compression:

Stored size: 469 Bytes

Contents

module Admin::Resources::DataTypes::DateHelper

  def date_filter(filter)
    values = { :all_day => "Today",
               :all_week => "This week",
               :all_month => "This month",
               :all_year => "This year" }

    items = [[@resource.human_attribute_name(filter).capitalize, ""]]
    items += values.map { |k, v| [Typus::I18n.t(v), k] }
  end

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

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
brainsome_typus-4.0.0.beta13 app/helpers/admin/resources/data_types/date_helper.rb
brainsome_typus-4.0.0.beta12 app/helpers/admin/resources/data_types/date_helper.rb
brainsome_typus-4.0.0.beta11 app/helpers/admin/resources/data_types/date_helper.rb
brainsome_typus-4.0.0.beta10 app/helpers/admin/resources/data_types/date_helper.rb
brainsome_typus-4.0.0.beta9 app/helpers/admin/resources/data_types/date_helper.rb
brainsome_typus-4.0.0.beta8 app/helpers/admin/resources/data_types/date_helper.rb
brainsome_typus-4.0.0.beta7 app/helpers/admin/resources/data_types/date_helper.rb
brainsome_typus-4.0.0.beta6 app/helpers/admin/resources/data_types/date_helper.rb
brainsome_typus-4.0.0.beta5 app/helpers/admin/resources/data_types/date_helper.rb
brainsome_typus-4.0.0.beta4 app/helpers/admin/resources/data_types/date_helper.rb
brainsome_typus-4.0.0.beta3 app/helpers/admin/resources/data_types/date_helper.rb
brainsome_typus-4.0.0.beta2 app/helpers/admin/resources/data_types/date_helper.rb
brainsome_typus-4.0.0.beta1 app/helpers/admin/resources/data_types/date_helper.rb