Skip to content

Commit

Permalink
definitions of 4 constants "TIMER_DAYS,TIMER_HOURS,TIMER_WEEKS,TIMER_…
Browse files Browse the repository at this point in the history
…MONTHS" have been moved from UiConstants to ViewHelper
  • Loading branch information
europ committed Aug 3, 2017
1 parent d77d233 commit 972be2a
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 32 deletions.
32 changes: 0 additions & 32 deletions app/helpers/ui_constants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,38 +165,6 @@ module UiConstants

VIEW_RESOURCES = DEFAULT_SETTINGS[:views].keys.each_with_object({}) { |value, acc| acc[value.to_s] = value }.freeze

TIMER_DAYS = [
[N_("Day"), "1"],
[N_("2 Days"), "2"],
[N_("3 Days"), "3"],
[N_("4 Days"), "4"],
[N_("5 Days"), "5"],
[N_("6 Days"), "6"],
]
TIMER_HOURS = [
[N_("Hour"), "1"],
[N_("2 Hours"), "2"],
[N_("3 Hours"), "3"],
[N_("4 Hours"), "4"],
[N_("6 Hours"), "6"],
[N_("8 Hours"), "8"],
[N_("12 Hours"), "12"],
]
TIMER_WEEKS = [
[N_("Week"), "1"],
[N_("2 Weeks"), "2"],
[N_("3 Weeks"), "3"],
[N_("4 Weeks"), "4"],
]
TIMER_MONTHS = [
[N_("Month"), "1"],
[N_("2 Months"), "2"],
[N_("3 Months"), "3"],
[N_("4 Months"), "4"],
[N_("5 Months"), "5"],
[N_("6 Months"), "6"],
]

# Maximum fields to show for automation engine resolution screens
AE_MAX_RESOLUTION_FIELDS = 5

Expand Down
35 changes: 35 additions & 0 deletions app/helpers/view_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,41 @@ module ViewHelper
"US-Folio" => N_("US Folio - 8.5in x 13.0in")
}.freeze

TIMER_DAYS = [
[N_("Day"), "1"],
[N_("2 Days"), "2"],
[N_("3 Days"), "3"],
[N_("4 Days"), "4"],
[N_("5 Days"), "5"],
[N_("6 Days"), "6"],
].freeze

TIMER_HOURS = [
[N_("Hour"), "1"],
[N_("2 Hours"), "2"],
[N_("3 Hours"), "3"],
[N_("4 Hours"), "4"],
[N_("6 Hours"), "6"],
[N_("8 Hours"), "8"],
[N_("12 Hours"), "12"],
].freeze

TIMER_WEEKS = [
[N_("Week"), "1"],
[N_("2 Weeks"), "2"],
[N_("3 Weeks"), "3"],
[N_("4 Weeks"), "4"],
].freeze

TIMER_MONTHS = [
[N_("Month"), "1"],
[N_("2 Months"), "2"],
[N_("3 Months"), "3"],
[N_("4 Months"), "4"],
[N_("5 Months"), "5"],
[N_("6 Months"), "6"],
].freeze

class << self
def concat_tag(*args, &block)
concat content_tag(*args, &block)
Expand Down

0 comments on commit 972be2a

Please sign in to comment.