Skip to content

Commit

Permalink
Prefix "ViewHelper" was added to every occurrence of FROM_DAYS
Browse files Browse the repository at this point in the history
  • Loading branch information
europ committed Aug 29, 2017
1 parent 5b9f8b1 commit f372e2e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/controllers/application_controller/filter/expression.rb
Original file line number Diff line number Diff line change
Expand Up @@ -566,8 +566,8 @@ def val_type_for(key, field)
def self.through_choices(from_choice) # Return the through_choices pulldown array for FROM datetime/date operators
tc = if ViewHelper::FROM_HOURS.include?(from_choice)
ViewHelper::FROM_HOURS
elsif FROM_DAYS.include?(from_choice)
FROM_DAYS
elsif ViewHelper::FROM_DAYS.include?(from_choice)
ViewHelper::FROM_DAYS
elsif FROM_WEEKS.include?(from_choice)
FROM_WEEKS
elsif FROM_MONTHS.include?(from_choice)
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/exp_atom/_edit_field.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"data-miq_sparkle_off" => true)
- else
- opts = (@edit[@expkey][:val1][:type] == :datetime ? ViewHelper::FROM_HOURS : [])
- opts += FROM_DAYS + FROM_WEEKS + FROM_MONTHS + FROM_QUARTERS + ViewHelper::FROM_YEARS
- opts += ViewHelper::FROM_DAYS + FROM_WEEKS + FROM_MONTHS + FROM_QUARTERS + ViewHelper::FROM_YEARS
= select_tag('chosen_from_1',
options_for_select(Hash[opts.map {|x| [_(x), x]}], @edit[@expkey][:exp_value][0]),
:class => 'selectpicker',
Expand Down
4 changes: 2 additions & 2 deletions app/views/layouts/exp_atom/_edit_find.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"data-miq_sparkle_off" => true)
- else
- opts = (@edit[@expkey][:val1][:type] == :datetime ? ViewHelper::FROM_HOURS : [])
- opts += FROM_DAYS + FROM_WEEKS + FROM_MONTHS + FROM_QUARTERS + ViewHelper::FROM_YEARS
- opts += ViewHelper::FROM_DAYS + FROM_WEEKS + FROM_MONTHS + FROM_QUARTERS + ViewHelper::FROM_YEARS
= select_tag('chosen_from_1',
options_for_select(Hash[opts.map{|x| [_(x), x]}], @edit[@expkey][:exp_value][0]),
:multiple => false,
Expand Down Expand Up @@ -176,7 +176,7 @@
"data-miq_sparkle_off" => true)
- else
- opts = (@edit[@expkey][:val2][:type] == :datetime ? ViewHelper::FROM_HOURS : [])
- opts += FROM_DAYS + FROM_WEEKS + FROM_MONTHS + FROM_QUARTERS + ViewHelper::FROM_YEARS
- opts += ViewHelper::FROM_DAYS + FROM_WEEKS + FROM_MONTHS + FROM_QUARTERS + ViewHelper::FROM_YEARS
= select_tag('chosen_from_2',
options_for_select(Hash[opts.map {|x| [_(x), x]}], @edit[@expkey][:exp_cvalue][0]),
:multiple => false,
Expand Down
2 changes: 1 addition & 1 deletion app/views/report/_form_styling.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"data-miq_sparkle_off" => true,
"data-miq_observe" => {:url => url}.to_json)
- elsif [:datetime, :date].include?(field_type)
- opts = (field_type == :datetime ? ViewHelper::FROM_HOURS : []) + FROM_DAYS + FROM_WEEKS + FROM_MONTHS + FROM_QUARTERS + ViewHelper::FROM_YEARS
- opts = (field_type == :datetime ? ViewHelper::FROM_HOURS : []) + ViewHelper::FROM_DAYS + FROM_WEEKS + FROM_MONTHS + FROM_QUARTERS + ViewHelper::FROM_YEARS
= select_tag("styleval_#{f_idx}_#{s_idx}",
options_for_select(Hash[opts.map {|x| [_(x), x]}], styles[s_idx][:value]),
:multiple => false,
Expand Down

0 comments on commit f372e2e

Please sign in to comment.